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

Variable number of columns

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-02-2005, 08:38 PM
  Tequilaboy's Avatar 
Tequilaboy Tequilaboy is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 45
 

Default 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.
__________________
Wicked shirts, and other assorted mayhem.
www.MadRagz.com
-----
X-Cart Gold v 4.0.13
Reply With Quote
  #2  
Old 08-03-2005, 05:43 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

This should help you out:

http://forum.x-cart.com/viewtopic.php?t=12234
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-07-2005, 12:37 PM
  Tequilaboy's Avatar 
Tequilaboy Tequilaboy is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 45
 

Default

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?
__________________
Wicked shirts, and other assorted mayhem.
www.MadRagz.com
-----
X-Cart Gold v 4.0.13
Reply With Quote
  #4  
Old 08-07-2005, 09:39 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

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?
Reply With Quote
  #5  
Old 04-07-2008, 01:41 PM
 
jodonnell jodonnell is offline
 

Member
  
Join Date: Sep 2004
Location: Bend, OR
Posts: 14
 

Default 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!
__________________
LC ASPE: 2.1.2
PHP:4.4.4
MySQL server:4.1.22
MySQL client:4.1.22
Web server:Apache
Operation system:FreeBSD
Reply With Quote
  #6  
Old 04-07-2008, 02:04 PM
 
jodonnell jodonnell is offline
 

Member
  
Join Date: Sep 2004
Location: Bend, OR
Posts: 14
 

Default 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.
__________________
LC ASPE: 2.1.2
PHP:4.4.4
MySQL server:4.1.22
MySQL client:4.1.22
Web server:Apache
Operation system:FreeBSD
Reply With Quote
  #7  
Old 04-07-2008, 03:10 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default 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.
__________________
Doms
kube v4.1.9
Reply With Quote
  #8  
Old 04-07-2008, 03:43 PM
 
jodonnell jodonnell is offline
 

Member
  
Join Date: Sep 2004
Location: Bend, OR
Posts: 14
 

Default 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.
__________________
LC ASPE: 2.1.2
PHP:4.4.4
MySQL server:4.1.22
MySQL client:4.1.22
Web server:Apache
Operation system:FreeBSD
Reply With Quote
  #9  
Old 04-07-2008, 03:54 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default 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.
__________________
Doms
kube v4.1.9
Reply With Quote
  #10  
Old 04-07-2008, 04:58 PM
 
jodonnell jodonnell is offline
 

Member
  
Join Date: Sep 2004
Location: Bend, OR
Posts: 14
 

Default 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?
__________________
LC ASPE: 2.1.2
PHP:4.4.4
MySQL server:4.1.22
MySQL client:4.1.22
Web server:Apache
Operation system:FreeBSD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 10:14 PM.

   

 
X-Cart forums © 2001-2020