View Single Post
  #6  
Old 08-25-2014, 09:33 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Product Grid Layout

I just realized while reviewing my own tutorial, that my code does not take into account that the product may not have a market price.

I also want to detail the changes made thus far:
We enabled Market price module
We enabled Custom skin module.

Then we created skins/custom_skin/default/en/items_list/product/parts/common.product-price.tpl

with the following content:
Code:
{t(#Our Price#)}: <widget class="\XLite\View\Price" product="{product}" displayOnlyPrice="true" /> {t(#Market price#)}: <span class="value">{formatPrice(product.getMarketPrice(),null,1)}</span>

If we change this code by wrapping an if statement around the market price:
Code:
{if:product.getMarketPrice()} {t(#Market price#)}: <span class="value">{formatPrice(product.getMarketPrice(),null,1)}</span> {end:}
Then it will only display when the market price exists for the product.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote