poland88 Posted March 1, 2010 Share Posted March 1, 2010 Hello! I would like to sort my products by parameter, which I wrote in column "reference" in table "ps_product".Which file to edit?Thank you in advance! Link to comment Share on other sites More sharing options...
rocky Posted March 2, 2010 Share Posted March 2, 2010 You'll need to modify product-sort.tpl in your theme's directory. Add an option to the <select> like this: {l s='reference'} Link to comment Share on other sites More sharing options...
netman Posted March 3, 2010 Share Posted March 3, 2010 Rocky, is there a way to sort order by date. I want to place the newest products to the top of product listing page. At the moment new entries are added to the bottom of the list. I want to reverse it.Thanks 1 Link to comment Share on other sites More sharing options...
rocky Posted March 3, 2010 Share Posted March 3, 2010 You should be able to add an option like this to the select in product-sort.tpl: {l s='--'} Link to comment Share on other sites More sharing options...
techaspects Posted March 10, 2010 Share Posted March 10, 2010 I tried to do it by position and it failed to work - http://www.premierlogmfg.com/36-white-pine - I moved it via position in admin. The only I am getting this work is by one at a time editing the product and resaving it and that updates the date which puts it at the top. Any suggestions would be helpful. Thanks. Link to comment Share on other sites More sharing options...
rocky Posted March 11, 2010 Share Posted March 11, 2010 Yes, that's because I'm using 'date_add' in my code above. You should use 'position' instead if you want to sort by the position you chose in the Back Office. Link to comment Share on other sites More sharing options...
techaspects Posted March 11, 2010 Share Posted March 11, 2010 I am doing:{l s='--'}then in the backend, I am moving the items up where I want them and it still does not work on the front end.Not sure what I am doing differently.I am still in need for this fix please. Link to comment Share on other sites More sharing options...
techaspects Posted March 11, 2010 Share Posted March 11, 2010 After sorting by 'position' - do you have to save it or something? My front end still shows by date - the url even says 'by position' - http://premierlogmfg.com/36-white-pine?orderby=position&orderway=desc Link to comment Share on other sites More sharing options...
rocky Posted March 12, 2010 Share Posted March 12, 2010 What do you have "Default order by" set to under Preferences > Products? Link to comment Share on other sites More sharing options...
techaspects Posted March 12, 2010 Share Posted March 12, 2010 I did not know that this section existed - this did it for me. Thanks for the help in this. Do you know how to create a separate invoice for shipping? If a customer pays for an item and checks out, then we figure up shipping and resubmit an amended bill or an extra invoice? Link to comment Share on other sites More sharing options...
techaspects Posted March 12, 2010 Share Posted March 12, 2010 I do not see a 'position' option - does anyone know how to put that in under Preferences => Default order by: section. Link to comment Share on other sites More sharing options...
rocky Posted March 12, 2010 Share Posted March 12, 2010 There is already a "position" option under "Default order by". I've attached a screenshot from Prestashop v1.2.5. Are you missing the option? 1 Link to comment Share on other sites More sharing options...
techaspects Posted March 12, 2010 Share Posted March 12, 2010 I choose that as an option but nothing happened. Let me get this straight, you select this option and resort your products from the 'Catalog' page? I did this but still changed nothing on the front end. Link to comment Share on other sites More sharing options...
rocky Posted March 12, 2010 Share Posted March 12, 2010 Yes, that's how it is supposed to work. Perhaps it isn't working since you've previously modified product-sort.tpl. You can try replacing it with an unmodified version. Link to comment Share on other sites More sharing options...
netman Posted March 13, 2010 Share Posted March 13, 2010 I order my product by date of entry so that the newest entry is always listed first. It works fine. However, I also want to move products around once they are ordered by date using the posision arrows. In BO I can shuffle products around, but nothing happens in the front shop. Rocky, is there anything wrong with the software? I use 1.2.5 Link to comment Share on other sites More sharing options...
techaspects Posted March 14, 2010 Share Posted March 14, 2010 Rocky, I too use 1.2.5. Wonder is it a bug or something. Link to comment Share on other sites More sharing options...
rocky Posted March 14, 2010 Share Posted March 14, 2010 I think there was a bug in v1.2.5 with regard to the positioning of products that was fixed in v1.3. Can you try installing v1.3 beta 1 in a separate folder on your site and check whether it has the same problem? Link to comment Share on other sites More sharing options...
deech123 Posted June 1, 2010 Share Posted June 1, 2010 Hi,in the final version 1.3 I added this line in my product_sort.tpl{l s='reference'}but this is not working. check my page on www.degrootste.beand in the bottom of the dropdown there is mentionend : reference but not the translate : referentie.and when you select this option then the sorting is not done and I think he takes the first sort again. Also the dropdown changes it selected position.also the list I have in product_sort is not the same as in the backoffice. see screenshot and code below???any idea?here the select: {l s='--'} {l s='price: lowest first'} {l s='price: highest first'} {l s='name: A to Z'} {l s='name: Z to A'} {l s='in-stock first'} {l s='reference'} Link to comment Share on other sites More sharing options...
paradate Posted August 4, 2010 Share Posted August 4, 2010 I would like to sort my products by out_of_stock in such a way that the products which are out of stock will be in the buttom of the list of each category.How can I do that?Thanks Link to comment Share on other sites More sharing options...
rocky Posted August 4, 2010 Share Posted August 4, 2010 Doesn't the "sort by in-stock first" option already do this? Link to comment Share on other sites More sharing options...
Joe Germann Posted August 28, 2010 Share Posted August 28, 2010 This is related to this thread so I thought I would add my needs here.....I would love to be able to define a sort order for products similar to that used in the categories. i.e. Num.Description or Num.Reference, etc. Is there a good way to do this? If not I could also add another DB field to the product table to indicate "sort_order". Since I use my own software, rather than the PS Admin tool to manage the database content, this would be a very easy thing to add into my side of things. I can load this parameter with my own sort-order. What would have to added into PrestaShop to make this work?Is the solution similar to the one in here for sorting on the Reference or Date fields?Many thanks,Joe Link to comment Share on other sites More sharing options...
rocky Posted August 28, 2010 Share Posted August 28, 2010 You don't need to. Products already have a sort order. It is the 'position' field of the ps_category_product table. You can use the arrows in the Position column on the Catalog tab to change the order of the products. Click an arrow to move a product one position or click and drag the background behind the arrow to move the product multiple positions. You'll need to go to the Preferences > Products tab and change "Default order by" to "Position in category" and "Default order way" to "Ascending" for the products to be sorted by position on your site. Link to comment Share on other sites More sharing options...
Joe Germann Posted August 29, 2010 Share Posted August 29, 2010 I know of that option but that is not how I would really like to manage sort order. I have 2800+ products on my web site and I envision many, many more. In addition, we are in the midst of bringing up another PS store and will face the same issues.Our business infrastructure is built around FileMaker Pro. It is built and designed to support as many PS stores as we want to have. From within that application world, I map in the PS DB tables and can, via ODBC connections, manage all of the database items. I load products, build and load the images, and do virtually everything with my products from the FileMaker world. I know this is contrary to the Admin tool way of things, but it is far more efficient and far more integrated for our needs than the Admin.I really do not want to use the Admin to set the order. I would like to set it externally, like I do with Categories, and then let PS arrange the order based upon my directives. Having a similar option in products as in categories would be ideal, but I am not adverse to using phpMyAdmin to add to a table entry, but would prefer to really use a "standard" PS database layout. Hence, the desire for a Categories-like sort order hook.I saw you note on how to implement sorting on "Reference". Can I just add, via phpMyAdmin, a sort_order field and do pretty much the same?Any suggestions on how to solve the sorting issue outside of the Admin tool?Many thanks,Joewww.MotorheadExtraordinaire.com Link to comment Share on other sites More sharing options...
Joe Germann Posted August 29, 2010 Share Posted August 29, 2010 OOPS!! I guess I missed it in your note. The Position field. Great!!! I'll try that.Thanks,Joe Link to comment Share on other sites More sharing options...
Joe Germann Posted August 29, 2010 Share Posted August 29, 2010 Great!!! I was able to very easily change my software the type or ordering I need and to use the position field to set the proper order.Thanks so much for the guidance. I am not sure how I missed that field, but thanks to you I now have a great solution.Regards,Joe Link to comment Share on other sites More sharing options...
PanMS Posted May 9, 2013 Share Posted May 9, 2013 An old topic but my new question is related. Can you please suggest me code to sort products by number of sales. Link to comment Share on other sites More sharing options...
samuelprabhu Posted March 28, 2014 Share Posted March 28, 2014 Sort by product name is not working in front office, if the product name is given in numbers. For example: if the product names are 1) 1 gram coin 2) 2 gram coin 3) 5 gram coin 4) 10 gram coin It is coming as 1) 1 gram coin 2) 10 gram coin 3) 2 gram coin 4) 5 gram coin incase of alphabets/ alphanumeric it is working fine. Kindly help to sort this issue. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now