Re: OUSM: Upsell Multiple Items with Attributes
I just looked into this in a support ticket, and I wanted to offer up the solution in case current or future merchants run into the same challenge.
Here are the steps necessary to allow the customer to select attributes on the multiple upsale page and thus skipping the UATM screen.
1) On the OUSM page template, open the Product Attribute Template element.
2) Verify that the code for attribute templates is near the top of the foreach loop (might not be there by default in older stores). If it isn't there, you'll need to add it. It will look like this by default:
3) You now need to replace every instance of this string:
And make them instead look like this:
You can use a code/text editor with find/replace capability to speed this step up, but be careful if you use MS Word as it adds slanted quote characters which will break the page instead of the HTML-friendly quote characters. Some of the lines will have spaces in them as well so proofread the code afterward to make sure the find/replace didn't miss anything. ~8-12 lines should be updated in total.
4) Double check that all of the prompts, labels and inputs have had the code updated as outlined in steps 2 & 3 and then click Update
5) Go back to the Page tab, find and delete this line:
6) Make sure this line is in the foreach loop for the products (This will render the attributes themselves, so place it where you can make it look pretty):
That should do it. Give it a checkout test afterward to verify. Good luck and feel free to post or email questions if you have any.
I just looked into this in a support ticket, and I wanted to offer up the solution in case current or future merchants run into the same challenge.
Here are the steps necessary to allow the customer to select attributes on the multiple upsale page and thus skipping the UATM screen.
1) On the OUSM page template, open the Product Attribute Template element.
2) Verify that the code for attribute templates is near the top of the foreach loop (might not be there by default in older stores). If it isn't there, you'll need to add it. It will look like this by default:
Code:
<mvt:if expr="l.settings:attribute:template_code NE 0"> <input type="hidden" name="Product_Attributes[&mvt:attribute:index;]:template_code" value="&mvte:attribute:template_code;" /> </mvt:if>
Code:
name="Product_Attributes[&mvt:attribute:index;]:
And make them instead look like this:
Code:
name="Product[&mvt:upsold_product:index;]:Attributes[&mvt:attribute:index;]:
4) Double check that all of the prompts, labels and inputs have had the code updated as outlined in steps 2 & 3 and then click Update
5) Go back to the Page tab, find and delete this line:
Code:
<input type="hidden" name="Attributes" value="Yes" />
6) Make sure this line is in the foreach loop for the products (This will render the attributes themselves, so place it where you can make it look pretty):
Code:
<mvt:item name="product_attributes" param="upsold_product:id" />
Comment