Multiple categories, add to basket button issue
-
Hi – I have a wordpress/woocommerce site.
The products can be assigned to more than one category – Cat A and Cat B.
The problem appears when you click on Add to Basket on the product page.
If a product is assigned to multiple categories, and I click on Add to Basket, it successfully adds the correct product (as this is controlled by ‘value’ that is passed), and this is correctly shown on the basket page.
If I have arrived at this product through Cat A page, when I am in the basket and choose to view this product, I would like it to show Cat A in the address bar/breadcrumb – as this is the category I added it from.
It is my understanding that WordPress will retrieve the first one in the list, and not necessarily the one that you have come from.
This is also true of the ‘recently view products’, and also the Add to basket button.
It works off the product ID and not the originating category.
Is there any way to achieve preserving the Category that you added the product from?
The GUID field in the database stores the type and ID (i.e. ?post_type=product&p=110) is there a way to store the full URL of the selected product instead of just the ID?
- The topic ‘Multiple categories, add to basket button issue’ is closed to new replies.