-
AuthorPosts
-
August 22, 2014 at 2:50 pm #90371
Hi,
Can you guys provide any tips or advice on how to add the product category to the shopping cart as a table column? I was playing around with the PHP but couldn’t get it to load.
Thanks!
-Ruben
August 22, 2014 at 3:07 pm #90381Hey Ruben,
Can you please provide us an example of what you are trying to achieve? Also please share your website URL with us so we can take a look at your website.
You can also refer to this link as well http://docs.woothemes.com/document/woocommerce-shortcodes/
August 25, 2014 at 4:59 pm #92091Yes, sorry for the lack of links. I have setup Woocommerce and I have very similar product name but in different categories. For example, the product name “1 Class” might appear twice but under different categories e.g. “1 Month” and “2 Months”.
To make it more clear to users that they are buying the right product, I wanted to show the category of their selected product. In the http://worlddanceco.com/wpsite/cart/ I wanted to add a new column with the category of each product and then possibly add it to the checkout page too.
The shortcodes wouldn’t work since it has to tie in to whatever the user has added to the cart. I was looking at cart.php under the woocommerce folder and saw it uses filters to find the right attributes for product. Is there an attribute that could pull the category of the product?
The filter code is usually something like this:
<?php echo apply_filters( ‘woocommerce_cart_item_price’, WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); ?>
August 26, 2014 at 5:54 am #92321Hi Ruben,
Regretfully this isn’t a feature offered by X.
It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer, or a service like WerkPress or Elto to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding. Take care!
August 26, 2014 at 3:34 pm #92764No worries! Thanks for your help.
August 26, 2014 at 7:47 pm #92885You’re welcome Ruben.
-
AuthorPosts