Hello, I am not a developer so any help would be very much appreciated.
Thank you in advance, Iris
I am on a Miva 5.5 PR 8 store which I will be upgrading to PR9 soon.
Right now I have the price for items with attributes set as 0.00 and then each attribute has the actual price for that attribute.
It is confusing for customers to see the product price as 0.00.
Below is what I tried that shows 2 lines in the Basket for each attribute to get to the total price.
Example below of what I tried to implement for attributes for an item.
Product page showing 20.00 for product
Attributes:
10" item (this shows up as 20.00 in the basket because it is taken from the product page)
15" item 30.00 - add 10.00
Doing this shows up in the Basket as 2 lines for each attribute after the first one
for example, the 15" item shows up in the basket as
15" Item 20.00
15" Item 10.00
I am hoping that it can be coded so the two lines are added together and there is one line showing
15" Item 30.00
I have toolkit and found the math calculation below but do not know how to implement it,.
Use the math_add to calculate the sum of two variables to a new number. For example,
<mvt:item name="toolkit" param="math_add|sum|l.all_settings:product:price|l .all_settings:product:cost" />
sum the price plus the cost to get a variable called sum.
Below is the Attribute Template Code
<table>
<mvt:foreach iterator="attribute" array="attributes">
<tr>
<td class="prompt">
<input type="hidden" name="Product_Attributes[ &mvt:attribute:index; ]:code" value="&mvte:attribute: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>
<mvt:if expr="l.settings:attribute:type NE 'checkbox'">
<mvt:if expr="l.settings:attribute:image">
<img src="&mvte:attribute:image;" alt="&mvte:attribute:raw_prompt;" />
<mvt:else>
<mvt:if expr="l.settings:attribute:required">
<span class="required">
<mvt:else>
<span>
</mvt:if>
&mvt:attribute:prompt;
</span>
</mvt:if>
<mvt:else>
</mvt:if>
</td>
<td class="field">
<mvt:if expr="l.settings:attribute:type EQ 'text'">
<input type="text" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:attribute:value;" class="textfield" />
<mvt:elseif expr="l.settings:attribute:type EQ 'memo'">
<textarea name="Product_Attributes[&mvt:attribute:index;]:value">&mvte:attribute:value;</textarea>
<mvt:elseif expr="l.settings:attribute:type EQ 'radio'">
<mvt:foreach iterator="option" array="attribute:options">
<div>
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND
( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" checked />
<mvt:else>
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" />
</mvt:if>
<mvt:if expr="l.settings:option:image">
<img src="&mvte:option:image;" alt="&mvte:option:prompt;" />
<mvt:else>
&mvte:option:prompt;
</mvt:if>
</div>
</mvt:foreach>
<mvt:elseif expr="( l.settings:attribute:type EQ 'select' ) OR ( l.settings:attribute:type EQ 'swatch-select' )">
<select name="Product_Attributes[&mvt:attribute:index;]:value">
<mvt:foreach iterator="option" array="attribute:options">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<option value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
<mvt:else>
<option value="&mvte:option:code;">&mvte:option:prompt;</option>
</mvt:if>
</mvt:foreach>
</select>
<mvt:elseif expr="l.settings:attribute:type EQ 'checkbox'">
<mvt:if expr="g.Product_Attributes[l.settings:attribute:index]:value">
<input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes" checked />
<mvt:else>
<input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" />
</mvt:if>
<mvt:if expr="l.settings:attribute:image">
<img src="&mvte:attribute:image;" alt="&mvte:attribute:raw_prompt;" />
<mvt:else>
<mvt:if expr="l.settings:attribute:required">
<span class="required">
<mvt:else>
<span>
</mvt:if>
&mvt:attribute:prompt;
</span>
</mvt:if>
</mvt:if>
</td>
</tr>
</mvt:foreach>
</table>
<div class="clear"></div>
Thank you in advance, Iris
I am on a Miva 5.5 PR 8 store which I will be upgrading to PR9 soon.
Right now I have the price for items with attributes set as 0.00 and then each attribute has the actual price for that attribute.
It is confusing for customers to see the product price as 0.00.
Below is what I tried that shows 2 lines in the Basket for each attribute to get to the total price.
Example below of what I tried to implement for attributes for an item.
Product page showing 20.00 for product
Attributes:
10" item (this shows up as 20.00 in the basket because it is taken from the product page)
15" item 30.00 - add 10.00
Doing this shows up in the Basket as 2 lines for each attribute after the first one
for example, the 15" item shows up in the basket as
15" Item 20.00
15" Item 10.00
I am hoping that it can be coded so the two lines are added together and there is one line showing
15" Item 30.00
I have toolkit and found the math calculation below but do not know how to implement it,.
Use the math_add to calculate the sum of two variables to a new number. For example,
<mvt:item name="toolkit" param="math_add|sum|l.all_settings:product:price|l .all_settings:product:cost" />
sum the price plus the cost to get a variable called sum.
Below is the Attribute Template Code
<table>
<mvt:foreach iterator="attribute" array="attributes">
<tr>
<td class="prompt">
<input type="hidden" name="Product_Attributes[ &mvt:attribute:index; ]:code" value="&mvte:attribute: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>
<mvt:if expr="l.settings:attribute:type NE 'checkbox'">
<mvt:if expr="l.settings:attribute:image">
<img src="&mvte:attribute:image;" alt="&mvte:attribute:raw_prompt;" />
<mvt:else>
<mvt:if expr="l.settings:attribute:required">
<span class="required">
<mvt:else>
<span>
</mvt:if>
&mvt:attribute:prompt;
</span>
</mvt:if>
<mvt:else>
</mvt:if>
</td>
<td class="field">
<mvt:if expr="l.settings:attribute:type EQ 'text'">
<input type="text" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:attribute:value;" class="textfield" />
<mvt:elseif expr="l.settings:attribute:type EQ 'memo'">
<textarea name="Product_Attributes[&mvt:attribute:index;]:value">&mvte:attribute:value;</textarea>
<mvt:elseif expr="l.settings:attribute:type EQ 'radio'">
<mvt:foreach iterator="option" array="attribute:options">
<div>
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND
( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" checked />
<mvt:else>
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" />
</mvt:if>
<mvt:if expr="l.settings:option:image">
<img src="&mvte:option:image;" alt="&mvte:option:prompt;" />
<mvt:else>
&mvte:option:prompt;
</mvt:if>
</div>
</mvt:foreach>
<mvt:elseif expr="( l.settings:attribute:type EQ 'select' ) OR ( l.settings:attribute:type EQ 'swatch-select' )">
<select name="Product_Attributes[&mvt:attribute:index;]:value">
<mvt:foreach iterator="option" array="attribute:options">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<option value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
<mvt:else>
<option value="&mvte:option:code;">&mvte:option:prompt;</option>
</mvt:if>
</mvt:foreach>
</select>
<mvt:elseif expr="l.settings:attribute:type EQ 'checkbox'">
<mvt:if expr="g.Product_Attributes[l.settings:attribute:index]:value">
<input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes" checked />
<mvt:else>
<input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" />
</mvt:if>
<mvt:if expr="l.settings:attribute:image">
<img src="&mvte:attribute:image;" alt="&mvte:attribute:raw_prompt;" />
<mvt:else>
<mvt:if expr="l.settings:attribute:required">
<span class="required">
<mvt:else>
<span>
</mvt:if>
&mvt:attribute:prompt;
</span>
</mvt:if>
</mvt:if>
</td>
</tr>
</mvt:foreach>
</table>
<div class="clear"></div>
Comment