News:

Support the VirtueMart project and become a member

Main Menu

custom fields new position can't show in cart

Started by oualid103, December 21, 2016, 17:29:28 PM

Previous topic - Next topic

oualid103

hi every body:
i use VM3 and joomla 3.6.
i add two custom fields in new position "my_position" i add this position in product detail view perfectly but when i go to "show cart" i don't find this two fields.
how can i display this fields in cart vieww please.

jenkinhill

http://forum.virtuemart.net/index.php?topic=128401

The custom field position must be wthin the add to cart <form> tags within product details to appear in the cart. This is usually the addtocart custom position. You can add your own positions within the form and fix their layout position using css.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

oualid103

thank you very mush jenkinhill for your replay. i insert my new position exactly adjacent addtocart but i still have the same problem.
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product));
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'class'=>'my_positionclass',,'position'=>'my_position'));
how to add my_pistion to the addtocart form.
best wishes.

GJC Web Design

look in the page source

is your new position rendering INSIDE the cart form tags?

if not u need to move further into the sublayouts of the add to cart
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

oualid103

hi thank for all; i resolve the problem by moving form D:\Program Files\EasyPHP-12.1\www\easyweb0\components\com_virtuemart\sublayouts\addtocart.php tag to \components\com_virtuemart\views\productdetails\tmpl\default.php :
<form method="post" class="product js-recalculate" action="<?php echo JRoute::_ ('index.php?option=com_virtuemart',false); ?>">    
....