how do I get the product picture in the shopping cart to reflect the selected attrib?
Hello.
I'm experiencing a bit of a problem that takes a while to explain. I've got products (e-cards) that have a single attribute (design name) and I've modified tpl_product_info_display.php to receive via POST information that will change the product's attribute value from the current database value when generating the page.
I've done this to allow clients to change an e-card's design by clicking a 'customize' button, navigating away from the page, selecting the design via form submission and returning to the page with of the e-card they wanted the design changed.
Upon clicking the 'add to cart' button, a user should see his product, with the now changed attribute displayed. Although everything is fine when the user clicks 'add to cart' without changing the e-card's design, the attribute value is missing if someone does change the design and clicks 'add to cart'.
I've only added code to tpl_product_info_display.php that checks for $_POST and overrides the attribute value with the new one, and the 'value' of the corresponding input field.
I can't post all the changes that I've made because there are quite a few, so the best way I can hope for help is to ask how does Zencart pass the data from product_image to shopping_cart. Or, to be more precise, where is the file where the POSTed form data from product_info is converted to GET for shopping cart, if it isn't converted, where is it computed, or what's the overall flow?
Thank you.
Re: how do I get the product picture in the shopping cart to reflect the selected att
I'll have to thank the moderator that changed the topic name, when I noticed that I submitted it incomplete it was too late. However, I'll have to ask for another title change, to "what is the overall application flow regarding the add-to-cart button?" please.
Quote:
Originally Posted by
altvali
I can't post all the changes that I've made because there are quite a few, so the best way I can hope for help is to ask how does Zencart pass the data from product_image to shopping_cart.
I meant info instead of image.This isn't about the product image.
Bottom line, I just want a parameter passed to the product info page to be shown in the product's attribute values and after clicking the 'add to cart' button, the shopping cart to reflect the selected attribute. I've already found a way to do the first part(a parameter passed to the product info page is shown in the product's attribute values).