Custom fields, code error in productdetails/default.php

GK User
Mon Jan 26, 2015 9:39 am
Hi,

I am reporting some code misconfiguration in template. It took me several hours of research to find out where the problem was.

WHAT DID NOT WORK?

After migrating to VM 3 and J3, custom fields didn't work properly. I had set up custom fields for products variants (shirt dimensions S,L,XL). The problem was, that this data were "lost", when a purchase was made ... Shirts dimensions weren't visible on CHECKOUT, nor ORDERs (in backend), nor ADMIN & SHOPPER emails. This was a huge problem, because we had to call each customer back to ask which type of shirt was ordered.

SOLUTION

1) I had to modify Custom fields -> LAYOUT POSITION to "addtocart" (before "ontop").
2) I also had to modify some code in mytemplate/html/com_virtuemart/productdetails/default.php:
- around line 274 I omitted entire <div class="addtocart-area"> --> this part in template did not work OK.
- after this div I entered this code: <?php echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product)); ?> which I think calls the proper <div class="addtocart-area"> in VM sublayouts folder.

debate on VM forum (starting from reply #8) http://forum.virtuemart.net/index.php?topic=126629.0

Hope it help others!

Best regards
User avatar
Senior Boarder

teitbite
Mon Jan 26, 2015 7:07 pm
Hi

Thank You for shearing. I'll let programmers know about that.
User avatar
Moderator

GK User
Mon Jan 26, 2015 7:21 pm
This thread is about the same subject. There is a fixed file available.

https://www.gavick.com/forums/storefron ... ds#p214105
User avatar
Junior Boarder

teitbite
Mon Jan 26, 2015 7:29 pm
Hi

Och, that's a fantastic thread. Thank You. Will add a link to my report to programmers.
User avatar
Moderator


cron