If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Adding top category name to shopping cart

Adding top category name to shopping cart

Started by dannyvarley on 2 Jun 2016, 2:34 PM · Views: 3,634

Results 1 to 8 of 8
2 Jun 2016, 2:34 PM
#1
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Adding top category name to shopping cart

Hi Guys,

What would be the code to add the top category name next to the name of the product on the shopping cart?

Really I would be wanting to add the breadcrumb of each product under the product title on the shopping cart.

Many thanks,
Daniel

2 Jun 2016, 2:50 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding top category name to shopping cart

Really I would be wanting to add the breadcrumb of each product under the product title on the shopping cart.
I see this as your breadcrumb
Home > Replacement Kitchen Doors > High Gloss > High Gloss White

Maybe a more exact explanation of what and where you want this??

Zen-Venom Get Bitten

2 Jun 2016, 3:48 PM
#3
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Adding top category name to shopping cart

Yep, So as well as using the website for people to purchase on, we also use the website to do quotations on. For example if someone wants a quotation for a full kitchen. We will add everything they want to the basket and we have a quotation page that we print out. The problem we are having is that the products are the same in some categories and on the quotation page we cannot tell what category they are from, So I would like to put the breadcrumb of the product in the shopping cart on the shopping cart page. I have attached an image to hopefully make a little more sense!

Before
Attachment 16395
After
Attachment 16394

2 Jun 2016, 8:57 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding top category name to shopping cart

The problem we are having is that the products are the same in some categories and on the quotation page we cannot tell what category they are from
Have you thought of assigning a unique "Model Number" to each product??
This is builtin already

Zen-Venom Get Bitten

2 Jun 2016, 9:12 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Adding top category name to shopping cart

In the case of linked product (which sounds like might be present on this site) the information immediately available while on the shopping cart does not include the category from which the product was chosen but instead the master category can be determined. From there the "path" to the product could be presented, but it again if a linked product then the category "tree" presented would not necessarily be the same as from where it was selected.

To obtain the information from where it was selected would require additional data capture at the time of adding the item to the cart.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Jun 2016, 8:47 AM
#6
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Adding top category name to shopping cart

They not linked products, as they are pretty much the same products in different ranges, they all just have different prices depending on the range so I couldn't use linked products. I could use the product code in the shopping cart but the codes do not make much sense to our customers whereas If I could include the breadcrumb then this would make sense to anyone reading the quotation.

Daniel

11 Jun 2016, 2:10 PM
#7
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Adding top category name to shopping cart

I have been trying to add loads of different things to see if I can find what might make it work. I feel like it should be very simple but I havent gotten anywhere so far? Any ideas guys?

11 Jun 2016, 4:08 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Adding top category name to shopping cart

On the page in question, need to be able to access the products_id for the product for the following to "work":

echo zen_output_generated_category_path(zen_get_products_category_id($products_id)‎);

Such that the $products_id above is replaced by whatever represents the actual products_id for the "row".

On the shopping cart page: $product['id'] is the $products_id.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...