So I'm trying to replace a old toolkit function to display all the products in the same category on a product page. All works fine but then I had to do some special coding to get the main image to work and now the pricing tokens don't seem to work. The only token I can get to work is the very basic price token. We use sale pricing from a price group so that the issue. Here is the address:
https://www.terrysjag.com/product/BD25659X.html
Here is the code:
<mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( g.Category_Code, l.settings:current_category )" />
<mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_ProductList_Load_Offset_Category( l.settings:current_category:id, g.Offset, 100, g.NextOffset, l.settings:products )" />
<mvt:foreach iterator="product" array="products">
<div class="o-layout__item u-width-3--l u-text-center x-product-list__item">
<a class="u-block x-product-list__link" href="/product/&mvte:product:code;.html" title="&mvte:product:name;">
<figure class="x-product-list__figure">
<mvt:do name="l.image_count" file="g.Module_Library_DB" value="ProductImageDataList_Load_Product(l.setting s:product:id, l.settings:imagedata)" />
<mvt:foreach iterator="data" array="imagedata">
<img style="max-height: 120px; max-width: 120px;" class="x-product-list__image" src="&mvt:data:image:image;" alt="&mvte:product:name;">
</mvt:foreach> <figcaption>
<strong class="x-product-list__name">&mvte:product:name;</strong>
<mvt:if expr="l.settings:product:base_price GT l.settings:product:price">
<span class="u-text-bold x-product-layout-purchase__name u-font-small u-color-red">
Reg. Price:<s id="price-value-additional">&mvt:product:formatted_base_price;</s>
</span>
</mvt:if>
Sale Price:&mvt:product:formatted_price; &mvt:product:formatted_base_price; $&mvt:product:price;
</figcaption>
</figure>
</a>
</div>
</mvt:foreach>
https://www.terrysjag.com/product/BD25659X.html
Here is the code:
<mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( g.Category_Code, l.settings:current_category )" />
<mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_ProductList_Load_Offset_Category( l.settings:current_category:id, g.Offset, 100, g.NextOffset, l.settings:products )" />
<mvt:foreach iterator="product" array="products">
<div class="o-layout__item u-width-3--l u-text-center x-product-list__item">
<a class="u-block x-product-list__link" href="/product/&mvte:product:code;.html" title="&mvte:product:name;">
<figure class="x-product-list__figure">
<mvt:do name="l.image_count" file="g.Module_Library_DB" value="ProductImageDataList_Load_Product(l.setting s:product:id, l.settings:imagedata)" />
<mvt:foreach iterator="data" array="imagedata">
<img style="max-height: 120px; max-width: 120px;" class="x-product-list__image" src="&mvt:data:image:image;" alt="&mvte:product:name;">
</mvt:foreach> <figcaption>
<strong class="x-product-list__name">&mvte:product:name;</strong>
<mvt:if expr="l.settings:product:base_price GT l.settings:product:price">
<span class="u-text-bold x-product-layout-purchase__name u-font-small u-color-red">
Reg. Price:<s id="price-value-additional">&mvt:product:formatted_base_price;</s>
</span>
</mvt:if>
Sale Price:&mvt:product:formatted_price; &mvt:product:formatted_base_price; $&mvt:product:price;
</figcaption>
</figure>
</a>
</div>
</mvt:foreach>
Comment