X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Custom product display (https://forum.x-cart.com/showthread.php?t=41143)

qrichou 07-16-2008 02:26 AM

Custom product display
 
Hi,

I have created a custom product display products_t_ch.tpl that is to look like a colour chart http://dev.artyfect.com/wn-artists-acrylic-colour-c-25.html

The problem i have is that i want this product display to show 4 products per row but the default for the other product displays to stay the same as set in x-cart 3 per row.

Does anyone know how to achevie this.

Many Thanks

Thedae2k 07-21-2008 09:18 AM

Re: Custom product display
 
Is it that you want this one specific product to use the different products_t_ch.tpl and all the others us the original products_t.tpl? If the only change is the number of products then you could problably try an {if}{else} like below.

I am not sure the correct code for this but I think you would need to use something like this on your products_t.tpl and not use the products_t_ch.tpl

{if} $products[product].XXXX {math equation="floor(100/x)" x=4="width"}
{else}
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{/if}

{section name=product loop=$products}
{assign var="discount" value=0}

{if %product.index% is div by $config.Appearance.products_per_row}
<tr>
{assign var="cell_counter" value=0}
{/if}

{math equation="x+1" x=$cell_counter assign="cell_counter" }


This is just a starting point and certianly not correct. Good luck and if you had a different look and feel between the different products templates you would need to do somehitng completely different.

qrichou 07-22-2008 01:02 AM

Re: Custom product display
 
Hi,

What we want is to use a 4 column layout only on specific categorys and these products will use the products_t_ch.tpl

The custom product display(products_t_ch.tpl) only displays on certain categories due to a if statement in subcategories.tpl (below) but cant figure out how to make these categories display in a 4 column layout.

{if $current_category.categoryid eq "25" or $current_category.categoryid eq "26" or $current_category.categoryid eq "173" or $current_category.categoryid eq "174" or $current_category.categoryid eq "182" or $current_category.categoryid eq "39" or $current_category.categoryid eq "35" or $current_category.categoryid eq "36" or $current_category.categoryid eq "37" or $current_category.categoryid eq "38" or $current_category.categoryid eq "138" or $current_category.categoryid eq "139" or $current_category.categoryid eq "186" or $current_category.categoryid eq "187"}
{include file="customer/main/products_t_ch.tpl" products=$products}
{else}
{include file="customer/main/products.tpl" products=$products}
{/if}

I see if i can try what you have sent to see if it works.

Many Thanks

JWait 07-22-2008 08:29 AM

Re: Custom product display
 
The standard products_t.tpl contains the statement
"{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}"

Have you tried changing the "x" to 4....
"{math equation="floor(100/4)" 4=$config.Appearance.products_per_row assign="width"}"

in your products_t_ch.tpl?

Thedae2k 07-23-2008 10:58 PM

Re: Custom product display
 
I think you may want to look at these mods...

http://www.websitecm.com/_search.php?page=1&q=product+templates

they should be perfect for you.

Tony Pearce 07-24-2008 12:39 AM

Re: Custom product display
 
Hi Thedae2k
seem to see you on the same posts!!

anyway, again we use this mod, very good, here are two examples:

http://www.cableuniverse.co.uk/catalog/cable/cat5e-cables-straight/
with an altered layout

and standard layout:
http://www.cableuniverse.co.uk/catalog/cable/faceplates-modules/

simple to customise with a little playing around and starting points are provided.

Tony

qrichou 07-24-2008 03:01 AM

Re: Custom product display
 
Hi Thedae2k,

Thanks for the mod link, that is what we need.

Thedae2k 07-25-2008 08:28 AM

Re: Custom product display
 
Tony...which of those mods did you use?

Tony Pearce 07-25-2008 08:57 AM

Re: Custom product display
 
Hi Thedae2k

I used this package, made life easy!

http://www.websitecm.com/x-cart-mods/multiple-product-templates-package-for-xcart.html

Cheers

Tony


All times are GMT -8. The time now is 11:49 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.