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)
-   -   Variable number of columns (https://forum.x-cart.com/showthread.php?t=15651)

Tequilaboy 08-02-2005 08:38 PM

Variable number of columns
 
Ok so, by default xcart let's you pick 1,2 or 3 columns to display products... and we went ahead and tweaked ours to display 5 which is what we want for 95% of our products.

However, our bumperstickers are suffering because they are wider and shorter and usually have small lettering on them compaired to most everything else in the store.

My question is:
I'm trying to figure a way to set only the bumpersticker catagory to display 3 columns instead of 5 to allow us to increase the size of the thumbnail without screwing up the way the site is displayed.
I'm sure this involves an if/else someplace, (which I suck at, I do the programing only when I have to) but if there was an easier way, I'm all ears.

balinor 08-03-2005 05:43 AM

This should help you out:

http://forum.x-cart.com/viewtopic.php?t=12234

Tequilaboy 08-07-2005 12:37 PM

ok so, I should replace the line that defines the number of columns with somthing like..

{if $product.categoryid == 248}{(columns = 3)}
{else}{(columns = 5)}
{/if}

So what does the line look like that denotes the number of columns and what file should it be located in?

Dongan 08-07-2005 09:39 PM

Hi,

My guess would be,

Go to skin1/customers/main/products_t.tpl

Find the code...

Code:

{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}

And replace with this
Code:

{if $product.categoryid == 248}
{math equation="floor(100/x)" x=3 assign="width"}
{else}
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{/if}


Let me know if could solve your problem? :o

jodonnell 04-07-2008 01:41 PM

Re: Variable number of columns
 
Quote:

Originally Posted by Tequilaboy
Ok so, by default xcart let's you pick 1,2 or 3 columns to display products... and we went ahead and tweaked ours to display 5 which is what we want for 95% of our products.



Can someone please direct me to where this tweak is done? thanks!

jodonnell 04-07-2008 02:04 PM

Re: Variable number of columns
 
Why is it that I do not ahve Appearance Options under General Settings? I see general, company, email, security, and summary.

kube 04-07-2008 03:10 PM

Re: Variable number of columns
 
Quote:

Originally Posted by jodonnell
Why is it that I do not ahve Appearance Options under General Settings? I see general, company, email, security, and summary.


For version 4.1.9...

When in Admin's General Settings (configuration.php); in the main body of content look at the top box labelled "In this section:", in that box you should see a list of links... the first usually being "Appearance options" (configuration.php?option=Appearance). From pressing that link you should get to a page showing Pagination and Display options.

jodonnell 04-07-2008 03:43 PM

Re: Variable number of columns
 
ok I can't get to configuration.php. When in general settings I do not see "In this section:" either. I am not sure what version this is. When I look in the cpanel at License it says version 2.1.

kube 04-07-2008 03:54 PM

Re: Variable number of columns
 
Try Balinor's post to find your current version...
http://forum.x-cart.com/showthread.php?t=23970

Then we can try our best to help you.

jodonnell 04-07-2008 04:58 PM

Re: Variable number of columns
 
Ok I have put my version number and other info in my sig. Is it because we are using lite version that these options are not available?


All times are GMT -8. The time now is 12:45 PM.

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