- Posts: 18
- Thank you received: 0
VM2 Custom Fields Cart Attribute
-
Naisly
Inactive member - Topic Author
- New Member
Less
More
11 years 9 months ago #27139
by Naisly
VM2 Custom Fields Cart Attribute was created 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
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
Less
More
- Posts: 6745
- Thank you received: 716
11 years 9 months ago #27154
by milos
Replied by milos on topic VM2 Custom Fields Cart Attribute
Hello,
VM team just announced new version 2.0.20, so you may try updating. They say it fixes many problems.
Thanks,
Milos
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
Less
More
- Posts: 18
- Thank you received: 0
11 years 9 months ago #27155
by Naisly
Replied by Naisly on topic VM2 Custom Fields Cart Attribute
Hi there,
I did update and no change. The code is still the same for my custom fields.
Theirs:
Mine:
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
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.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 9 months ago #27161
by ivan.milic
Replied by ivan.milic on topic VM2 Custom Fields Cart Attribute
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
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
Please Log in to join the conversation.
-
Naisly
Inactive member - Topic Author
- New Member
Less
More
- Posts: 18
- Thank you received: 0
11 years 9 months ago #27174
by Naisly
Replied by Naisly on topic VM2 Custom Fields Cart Attribute
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:
And even still, if all Cart Attributes are set to yes - The field shows up, but only in one position.
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.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 9 months ago #27181
by ivan.milic
Replied by ivan.milic on topic VM2 Custom Fields Cart Attribute
Use string type for simple text fields
Please Log in to join the conversation.
Time to create page: 0.165 seconds