Jump to content

Multi Catagories with same product - which one was added?


Recommended Posts

Hi All,

 

I am setting up prestashop as a Catalogue for Car Parts - so, a particular part can fit into several "Categories" -Categories in my case are makes/models of cars.

 

I would like to be able to know from which category an item was added from - as it might appear under more than 2 cat. is this possible ?

 

 

 

 

rgds

Andy

Link to comment
Share on other sites

No, you cannot, at least no without some modification.

Once an item is added to the cart, there is no more reference to it except the product id, so you cannot find out where it was added from.

You would have to modify the ps_cart_product structure to add the category Id it was added from, modify the add to cart function to save that value, and then modify the invoice code to read this new value and print it out.

Link to comment
Share on other sites

No, you cannot, at least no without some modification.

Once an item is added to the cart, there is no more reference to it except the product id, so you cannot find out where it was added from.

You would have to modify the ps_cart_product structure to add the category Id it was added from, modify the add to cart function to save that value, and then modify the invoice code to read this new value and print it out.

 

 

Thanks very much tomerg3, i'l have a play when i get time, not very hopeful though!

Link to comment
Share on other sites

You can have a look at http://www.presto-changeo.com/en/prestashop-modifications/16-special-instructions-textarea.html

It lets you assign any text you want to a product when it is added to the cart.

 

It will require modifications, but it will let you assign any value (you could have to pass the category name instead of the textarea) to a product when you add it to the cart, and then you can decide to display it or not to the customer (again, requires some slight modifications).

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...