Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #90371

    Ruben D
    Participant

    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

    #90381

    Nabeel A
    Moderator

    Hey 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/

    #92091

    Ruben D
    Participant

    Yes, 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 ); ?>

    #92321

    Mrinal
    Member

    Hi 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!

    #92764

    Ruben D
    Participant

    No worries! Thanks for your help.

    #92885

    Christian
    Moderator

    You’re welcome Ruben.