Jump to content

Products Accesories display order


TinoCas

Recommended Posts

Hi you all!! here is a good one...

Working on PS 1.6.0.5... I have some products that I need some accessories related to them. I do it all through the Back Office on the tab Products > Associations > Accesories... I add some products in a particular order. But when I hit save, they get stored on the DB ordered by the accesories product ID... and on that DB table (ps_accessory) there is only the fields:
"id_products1": where stores the ID of the parent product
"id_products2": where stores the id of the associated products (accessories)

To be a bit more graphical... no matter what order you try to insert them. That allways get stored on the db like this:

"id_products1", "id_products2"

"476","297"

"476","298"

"476","299"

"476","300"

"476","..."

So, when they are displayed on the product view page, the order is the same!!

And I need them to be on the order I want them to be... I use this as an individual "Related Products" list for each product, as I didnt find any module that does that.

I want to try find the MySQL queries that insert the does fields on the DB to try include another field  with some id so I can control de order of insertion? And also the collection query that takes that data to modyfy the "order by" part of the query...

Cant anybody point me on the right direcction? There is some Ajax involved to.. and there I´m a bit lost


Or let me know if there is any module that does what I need, which basically is:
- On the product view page, i need to put a carousel of related products, that could be on different categories, and displayed on a certain order.

Or if any of you can think of a better way to do what I want... It´s a bit odd that we can control that, right?

Thanx!!

EDITED

iN CASE SOMEONE NEED THIS: Found the SQL query where it get the accessories... is on Classes>Product.php... around line 3238. Can´t do much about the order, cause the function works only using product ID, (only fields stored on the DB), but at least I reverted the display order inserting   "ORDER BY `id_product` DESC"   at the end of the query... Normaly the newest products are the ones you would want to display first. REMEMBER USE THE OVERRIDE
 

Edited by TinoCas (see edit history)
  • Like 1
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...