![]() |
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.
|
Re: eliminate sort criteria in products page
Hi,
open "customer/main/search_result.tpl" file, find a string Code:
{if $sort_fields} Code:
{*if $sort_fields} |
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 :)
|
Re: eliminate sort criteria in products page
You'll probably have to alter customer/main/subcategories.tpl as well:
Code:
{* if $sort_fields} Webmaster mode doesn't always work perfectly, but it surely helps point me in the right direction! |
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? |
Re: eliminate sort criteria in products page
Then you might need to look here:
your website shop /admin/configuration.php?option=Search_productsThere are checkboxes to allow sorting by various criteria, which you can alter. Hope this helps! |
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. |
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?
|
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 :(
|
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? |
Re: eliminate sort criteria in products page
Webmaster mode is useful for finding out which template is which, I do not use it for editing text. Al of the text is in your 'languages' area, which is also covered pretty well in the manual.
I'm afraid there isn't a central resource to track down variables, no. You simply need to become familiar with the file structure of X-Cart. Even those of us who have been working with X-Cart for years sometimes get stuck :) |
Re: eliminate sort criteria in products page
I'm not sure exactly what you mean, but many of what X-cart calls labels are editable through the Languages section of the admin interface.
(your site) /admin/languages.php Choose the site language at the top first (under "edit language"), then enter the text you want to change in the search box. When the boxes appear you can edit the text in them. |
All times are GMT -8. The time now is 11:51 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.