Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Product Grid Layout
 
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-22-2014, 02:56 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Product Grid Layout

http://www.2techchicks.com/xc514/

How do edit the product grid? used to be products_t.tpl.

I'd like to add our price before the price, and then the market price after the price.
__________________
xcart 5.1.2
Reply With Quote
  #2  
Old 08-23-2014, 09:16 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Product Grid Layout

bump....
__________________
xcart 5.1.2
Reply With Quote
  #3  
Old 08-25-2014, 06:26 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,423
 

Default Re: Product Grid Layout

Sorry, did not quite get what you are trying to achieve? Once I understand what change you need to apply, I will be able to suggest how to do that.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #4  
Old 08-25-2014, 08:44 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Product Grid Layout

I would like to add the words our price for before the price, then I would like to add the words market price and the market price.

like this:

Our Price: $9.99 market price: $19.99
__________________
xcart 5.1.2
Reply With Quote

The following user thanks ARW VISIONS for this useful post:
totaltec (08-25-2014)
  #5  
Old 08-25-2014, 09:11 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Product Grid Layout

Tony, I think I got this one.

I made a 15 minute tutorial walking you through exactly what to do to add the market price: http://youtu.be/LxpUCoYU_nU

You can see all my X-cart 5 tuts here: http://forum.x-cart.com/showthread.php?t=64668
__________________
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
  #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,825
 

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

The following user thanks totaltec for this useful post:
ARW VISIONS (08-25-2014)
  #7  
Old 08-25-2014, 10:03 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Product Grid Layout

thank you
__________________
xcart 5.1.2
Reply With Quote
  #8  
Old 08-25-2014, 02:56 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Product Grid Layout

Mike, thanks. the tutorial should point me in the right direction.
__________________
xcart 5.1.2
Reply With Quote

The following user thanks ARW VISIONS for this useful post:
totaltec (08-25-2014)
  #9  
Old 08-27-2014, 06:56 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Product Grid Layout

ok a few issues.

contents of my file

Code:
{* vim: set ts=2 sw=2 sts=2 et: *} {** * Item price * * @author Qualiteam software Ltd <info@x-cart.com> * @copyright Copyright (c) 2011-2013 Qualiteam software Ltd <info@x-cart.com>. All rights reserved * @license http://www.x-cart.com/license-agreement.html X-Cart 5 License Agreement * @link http://www.x-cart.com/ * * @ListChild (list="itemsList.product.grid.customer.info", weight="30") * @ListChild (list="itemsList.product.small_thumbnails.customer.details", weight="25") * @ListChild (list="itemsList.product.list.customer.info", weight="40") * @ListChild (list="itemsList.product.table.customer.columns", weight="40") * @ListChild (list="productBlock.info", weight="300") *} {t(#Our Price#)}: <widget class="\XLite\View\Price" product="{product}" displayOnlyPrice="true" /> {if:product.getMarketPrice()} {t(#Market price#)}: <span class="value">{formatPrice(product.getMarketPrice(),null,1)}</span> {end:}

http://www.2techchicks.com/xc514/

stuff showing twice.
If I remove this
* @ListChild (list="itemsList.product.grid.customer.info", weight="30")

the issue goe away. Do i remove all the listchild calls?

Market price is not showing.
If I remove the if statement it shows but on all products.

our price and market price show in left list. Only want this in the grid portion in the middle.

thanks. ash
__________________
xcart 5.1.2
Reply With Quote
  #10  
Old 08-27-2014, 10:24 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Product Grid Layout

Where is the file located? How is it being called? I believe it is essential for this solution of mine, that you being using your own custom skin or the custom skin module. And the path to the file is important too. My file is located at skins/custom_skin/default/en/items_list/product/parts/common.product-price.tpl what is yours?

If you are working with your own custom skin, perhaps it is not setup right. Or maybe the difference is because I am running 515 and I am guessing you are running 514 based on the directory name. But I doubt this is it. Test the solution in custom skin module on a 515 installation.

Are you using a "skin" module or are you using a module and decorating a class with it. How does the file get included? If it is in custom skin, then it should be overwriting the original skin file and not displaying twice. I don't know why if:product.getMarketPrice() statement is not working.
__________________
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
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:49 AM.

   

 
X-Cart forums © 2001-2018