• Resolved kamilen12

    (@kamilen12)


    Hello, I’ve a problem.
    I want to set ordinal numbers to products in cart, order summary, mail etc. Is it possible? I want to create new column (in the beginning of every table on these pages).
    Something like this:
    No. | Product name | Price | etc.
    1. | Product I | 25$ | …
    2. | Product II | 25$ | …
    3. | Product III | 25$ | …
    and so on…

    Thanks in advance!

    • This topic was modified 5 years ago by kamilen12.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kamilen12

    (@kamilen12)

    Is there any solution for this? :/

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @kamilen12!

    There is no setting to enable this, and no filter available in the code where a short snippet would make this possible either. To get this working, you would need to override the /woocommerce/templates/cart/cart.php template file in your child theme, and add an extra column to the table, then add a counter to add that number on each loop (each product).

    I’ve uploaded an example here:
    https://gist.github.com/dphyled/e75891b607d5ab636cd931be13a25ee7

    Please try copying that to your child theme under /yourtheme/woocommerce/cart/cart.php

    I hope that helps! Have a wonderful day!

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    Sorry, just to clarify, that is just for your Cart page. You would need to do something similar for your other pages/emails/etc where you want to add that ordinal number.

    If you need assistance with coding or custom development, we recommend reaching out to a developer from one of the services at https://woocommerce.com/customizations/.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ordinal number’ is closed to new replies.