Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter dEM0nsTAr

    (@dem0nstar)

    Does no one know how to display the shipping class of a product to the customer?

    Did you find a solution for this?

    Thread Starter dEM0nsTAr

    (@dem0nstar)

    No, I have added a new property for this which duplicates the shipping class. Not so convenient but it works. Would be better to show it directly.

    Hi guys,

    You should be able to add something like this to one of your templates:

    Shipping Class: <?php echo $product->get_shipping_class(); ?>

    What if I would like to show the price instead of just the shipping class name? Can anyone help? Thanks.

    For example: “First Class shipping: $1.99”, not just “First Class shipping”

    That would be much harder. Products don’t typically have a shipping cost. You would actually have to run the get shipping methods and figure out what shipping would cost for that product. It would be pretty tricky depending on how you have your shipping costs set up.

    Hi, Patrick:
    Thank you very much for your reply.

    I saw a post here and it only shows “First Class shipping” (the shipping class name), so is this the only way that can show what kind of shipping under each single item???

    I use “flat rate” shipping method, so each item has its own shipping cost, I really would like to add this under each single item.

    For example:
    Product price: $4.99
    Shipping: First Class $1.99

    Hope I can get some idea or answer.

    To put it right by the product price would take a couple hours to find the right filter and write the code. Why not try adding it as an attribute? Then it can show up under the Additional Information tab.

    Hi, Patrick:

    Thanks for your reply again.
    I am not sure I understand how to do it. Can you show me more details about how to do?
    Thank you very much.

    Try this in the backend:
    https://cld.wthms.co/iUJh

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to show shipping classes on the product page?’ is closed to new replies.