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

eliminate sort criteria in products page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-27-2008, 06:08 PM
 
spencoid spencoid is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 36
 

Default eliminate sort criteria in products page

I have searched everywhere and can not figure out how to remove sort options from the products page. i am getting more than a little tires of trying to find just about everything in xcart. there should be more options settable from the admin area. looking through thousands of phps and tpls gets old really fast. the forums are great when you can find an answer but there should be some real documentation for this program.
__________________
xcart version 4.1.9
Reply With Quote
  #2  
Old 01-28-2008, 04:09 AM
  SpinyMan's Avatar 
SpinyMan SpinyMan is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 30
 

Default Re: eliminate sort criteria in products page

Hi,
open "customer/main/search_result.tpl" file, find a string
Code:
{if $sort_fields} ... {/if}
and comment it
Code:
{*if $sort_fields} ... {/if*}
__________________
Regards,
SpinyMan

X-Cart Templates Store -
http://www.x-cart-customization.com/shop/

X-Cart Customization Services -
http://www.x-cart-customization.com/
Reply With Quote
  #3  
Old 01-28-2008, 04:11 AM
 
balinor balinor is offline
 

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

Default Re: eliminate sort criteria in products page

spencoid, you really need to learn how to use Webmaster Mode, it will tell you exactly which template are which and save you countless hours. Have a look at the manual on this feature, you will be pleasantly surprised
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 01-28-2008, 08:40 AM
 
nidea nidea is offline
 

Newbie
  
Join Date: Apr 2007
Posts: 7
 

Default Re: eliminate sort criteria in products page

You'll probably have to alter customer/main/subcategories.tpl as well:

Code:
{* if $sort_fields} <div align="right">{include file="main/search_sort_by.tpl" ........ ... {/if *}

Webmaster mode doesn't always work perfectly, but it surely helps point me in the right direction!
__________________
Version 4.1.6

Last edited by nidea : 01-28-2008 at 09:03 AM. Reason: format change
Reply With Quote
  #5  
Old 01-28-2008, 09:08 AM
 
spencoid spencoid is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 36
 

Default Re: eliminate sort criteria in products page

I am using webmaster mode but it tells me that "sort by" is in the search_sort_by.tpl not in search_results.tpl

i do not want to eliminate all of the sort criteria, just some of them so commenting out the whole if statement is not what I need to do. In search_sort_by (if this is the right tpl) it says
{foreach from=$sort_fields key=name item=field} which I think must be what I am looking for but I want to edit the array to include only the categories that I want. How do I edit this array?

Another question about webmaster mode. I can edit a string by clicking on it in the browser and it brings up (most of the time) a dialog box in which I can edit it. This can not be done if the string is within a link as it opens the link instead. How do you edit a variable that is displayed in a link using webmaster mode?
__________________
xcart version 4.1.9
Reply With Quote
  #6  
Old 01-28-2008, 09:30 AM
 
nidea nidea is offline
 

Newbie
  
Join Date: Apr 2007
Posts: 7
 

Default Re: eliminate sort criteria in products page

Then you might need to look here:
your website shop /admin/configuration.php?option=Search_products
There are checkboxes to allow sorting by various criteria, which you can alter.

Hope this helps!
__________________
Version 4.1.6
Reply With Quote
  #7  
Old 01-28-2008, 09:48 AM
 
balinor balinor is offline
 

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

Default Re: eliminate sort criteria in products page

Actually if you just want to remove certain ones, the above solutions won't work. This will require some php editing. Open up include/search.php and you'll see these lines:

"productcode" => func_get_langvar_by_name("lbl_sku"),
"title" => func_get_langvar_by_name("lbl_product"),
"price" => func_get_langvar_by_name("lbl_price"),
"orderby" => func_get_langvar_by_name("lbl_default")

Comment out the ones you don't want using a # in front of them.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 01-28-2008, 10:05 AM
 
spencoid spencoid is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 36
 

Default Re: eliminate sort criteria in products page

only some of the options are available for selecting in the config.php i wanted to eliminate "default" and price. even though price is not checked it shows up anyway. i found that i could edit include/search.php and this worked. i only found this by searching the whole site for soft_fields There must be an easier way?
__________________
xcart version 4.1.9
Reply With Quote
  #9  
Old 01-28-2008, 10:08 AM
 
balinor balinor is offline
 

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

Default Re: eliminate sort criteria in products page

The product search options are not the same as sort by, unchecking those only removes them from the search by options when you search. The sort by options should be part of the admin interface, but they are not
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 01-28-2008, 10:12 AM
 
spencoid spencoid is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 36
 

Default Re: eliminate sort criteria in products page

messages crossed but i still want to know if there is an easy way to find this sort of variable? the forums are great especially considering the lack of detailed documentation but i will soon be using satellite internet which can be painfully slow and i need to be able to find what i need on my own computer as much as possible.

still need to know how to edit a string that is within a link using webmaster mode. for example my products page now has just the two sort criteria that i want sku and products. i was able to find and edit the string for sku after much stumbling around and got that to be what i want but i can not find the string that represents the text on the button for sort by product. i can not click on it to edit because it opens the link instead of the webmaster dialog. there must be some way to do this?
__________________
xcart version 4.1.9
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 04:36 AM.

   

 
X-Cart forums © 2001-2020