VM2 Custom Fields Cart Attribute

  • Naisly
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
11 years 1 week ago #27139 by Naisly
Hi there,

Ok, I have been trying to fix a couple issues with custom fields in VM2 with the help of virtuemart forums.

My question was - I cannot publish any custom field if I do not check 'Yes' for - Cart Attribute, how do I fix this?

I have tried:
Did try the default ontop, normal, onbot positions while making a new custom field type - string. Titled it - ontop, Cart Attribute - No, Layout Position - ontop. I did try this for the 3 positions and still nothing would show on the front end until I changed Cart Attribute - Yes.

They suggested that my template probably needs updating after we went through a few ideas.
if (!empty($this->product->customfieldsSorted)) {

$this->position='onbot';

echo $this->loadTemplate('customfields');

} // Product Custom ontop end

?>

I'm not a programer and could be off here, but my code seems to be missing stuff compared to virtuemarts? And shouldn't it be - Product Custom onbot end?

Anyways, I sure hope you can help.

Joomla - 2.5.4
Virtuemart - 2.0.18a
PHP - 5.3.21

rawrain.com/index.php/shop/wedding-favor

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
11 years 1 week ago #27154 by milos
Hello,

VM team just announced new version 2.0.20, so you may try updating. They say it fixes many problems.

Thanks,
Milos

Please Log in to join the conversation.

  • Naisly
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
11 years 1 week ago #27155 by Naisly
Hi there,

I did update and no change. The code is still the same for my custom fields.

Theirs:
Code:
if (!empty($this->product->customfieldsSorted['ontop'])) { ?> <div class="product-fields"> <?php $custom_title = null ; foreach ($this->product->customfieldsSorted['ontop'] as $field){ if ($field->display) { ?><div class="product-field product-field-type-<?php echo $field->field_type ?>"> <?php if ($field->custom_title != $custom_title) { ?> <span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span> <?php if ($field->custom_tip) echo JHTML::tooltip($field->custom_tip, JText::_($field->custom_title), 'tooltip.png'); } ?> <span class="product-field-display"><?php echo $field->display ?></span> <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span> </div> <?php $custom_title = $field->custom_title; } } ?> </div> <?php } // Product Custom ontop end ?>

Mine:
Code:
if (!empty($this->product->customfieldsSorted)) { $this->position='onbot'; echo $this->loadTemplate('customfields'); } // Product Custom ontop end ?>

I'm wondering why there is such a difference. As I said, I'm not a programer.

The fellow I spoke with at VM said it is more than likely a template issue =\

Please Log in to join the conversation.

More
11 years 1 week ago #27161 by ivan.milic
Try this default.php in zipped attachment.

Available fields layout positions:

ontop - above image
normal - this is default when you leave empty (bolow add to chart)
in_desc - in description tab
onbot - bottom
Attachments:

Please Log in to join the conversation.

  • Naisly
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
11 years 1 week ago #27174 by Naisly
Thank you.

I did try, and still no luck. What do you think is causing this issue because it is very annoying =\
There has to be something that is over-riding this?

Again:

Did try the default ontop, normal, onbot positions while making a new custom field type - string. Titled it - ontop, Cart Attribute - No, Layout Position - ontop. I did try this for the 3 positions and still nothing would show on the front end until I changed Cart Attribute - Yes.


And even still, if all Cart Attributes are set to yes - The field shows up, but only in one position.
Attachments:

Please Log in to join the conversation.

More
11 years 1 week ago #27181 by ivan.milic
Use string type for simple text fields

Please Log in to join the conversation.

Time to create page: 0.292 seconds
Powered by Kunena Forum