The attributes for products are showing fine in the storefront but on Orders and Email Templates, the code is being pulled, not the prompt. How can I resolve this?
Announcement
Collapse
No announcement yet.
Display Product Attribute Prompts, not Codes (Email Templates and Order Screen)
Collapse
X
-
Would you know what page template to edit for the Orders Screen? (Order Processing)
I think it's the ORDS Page?
Here's the Order Contents code for Product Attributes:
<mvt:foreach iterator="option" array="group:options">
<mvt:assign name="l.settings:group:option_counter" value="l.settings:group:option_counter + 1" />
<mvt:if expr="l.settings:option:attr_code EQ 'giftcert'">
<mvt:assign name="l.settings:option:attr_prompt" value="'Certificate Code'" />
<mvt:else>
<mvt:assign name="l.settings:option:attr_prompt" value="l.settings:option:attr_prompt" />
</mvt:if>
<span class="u-block u-font-tiny">
<mvt:if expr="l.settings:option:option_id">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:option:attr_prompt $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:opt_code" />
&mvt:option:attr_prompt;: &mvt:option:opt_prompt;
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:option:attr_prompt $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:data" />
<mvt:if expr="( l.settings:option:attr_code EQ 'digitaldownload' ) AND ( NOT ISNULL l.settings:option:digital_download_url )">
<a class="o-layout--grow" href="&mvte:option:digital_download_url;" target="_blank">Digital Download</a><br>
<mvt:else>
&mvt:option:attr_prompt;: &mvt:option:data;
</mvt:if>
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:option:attr_prompt $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:data_long" />
&mvt:option:attr_prompt;: &mvt:option:data_long;
<mvt:else>
&mvt:option:attr_prompt;
</mvt:if>Last edited by kajolitz; 02-07-23, 10:24 AM.
Comment
-
Not sure what you mean by the Orders screen. Do you mean order history? Order status? On ORDS the variable in a stock shadows order contents template is l.settings:option:attr_prompt
If you click the three dots (upper right) do you see Tokenize? If not, click the items tab and assign it to the page, then check the three dots. You can see all the variables available in the page that way.
Comment
-
By Order Screen I mean, when you select Order Processing, then select the Order #, the Order displays.
This is the form name I get in the browser HTML Elements when I am on the Order: "https://www.corridorbookstore.com/mm5/admin.mvc?Screen=MORD&Tab=ORDS&Store_Code= CBS"
Not sure if that helps.
Comment
-
The admin order view? We can't edit that screen, but we can use batch reports to create custom order displays that would do what you want.
This brings up a good practice to follow, though. If your attribute codes aren't readable, such as "X123AB" and the prompt is, "Shirt Size" then you're using the wrong kind of attribute codes. Just like variables, name codes something that makes obvious sense when you see them. For the "shirt size" example, the code could be "size_X123AB" or "shirt_size_X123AB" to make things easier to manage. Just something to think about when making codes in miva merchant.
Comment
Comment