VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: goudmahendra on June 10, 2016, 15:05:21 PM

Title: Custom filed Position is not working.
Post by: goudmahendra on June 10, 2016, 15:05:21 PM
Hello All,
                  My  joomla version is 3.5.0 and virtuemart version is 3.0.12. I have two custom fields and by default their layout position is 'add to cart' but for the layout changes I have create a new custom position 'custom'  on listing page and published custom fields on 'custom' position fields are visible and my layout purpose is solved. But when I choose value in custom fields prices are not updating and again if I choose position 'adddtocart' price is changing.

so, please let me know why price is not updating with custom position or I am missing something.

please help

thanks in advance.
Title: Re: Custom filed Position is not working.
Post by: jenkinhill on June 10, 2016, 15:19:40 PM
So your field code is not placed within the add to cart form?
Title: Re: Custom filed Position is not working.
Post by: PRO on June 10, 2016, 21:36:47 PM
you need to have the position addtocart for price changes.

YOU can display them in the category page
Title: Re: Custom filed Position is not working.
Post by: goudmahendra on June 11, 2016, 08:47:17 AM
No my position in not within addtocart form it is out of the add to cart form and on the product page.
Title: Re: Custom filed Position is not working.
Post by: goudmahendra on June 11, 2016, 08:56:53 AM
my custom field position is in template->mytemplate->html->com_virtuemat->sublayouts->products.php

<?php echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product,'position'=>'custom')); ?>

please help.
Title: Re: Custom filed Position is not working.
Post by: Studio 42 on June 11, 2016, 10:57:46 AM
Hi,
the problem is that your customfieds, need to be inside the <form></form> tags.
If you add it outside add to cart form, vm javascript do not check for it.
A possible solution is to move the add to cart <form></form> that your customfield are called by the javascript in your productdetails layout.
Title: Re: Custom filed Position is not working.
Post by: goudmahendra on June 13, 2016, 13:33:08 PM
Thanks  studio 42 for your replay. now I understand what is the problem.