Jump to content

Sorting products by different parameter


Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

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

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

  • 2 months later...

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.be
and 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'}

24556_bYCp0VnS6ET1eWmPil00_t

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

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

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

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,
Joe

www.MotorheadExtraordinaire.com

Link to comment
Share on other sites

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

  • 2 years later...
  • 10 months later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...