• Resolved maciejrzeszutko

    (@maciejrzeszutko)


    Hello,
    I use some html tags (<div> and <span>) in the product names. When the product is put in the cart and then validated, these html formatting disappears.
    Could you fix your code in order to not to touch (do not modify) the product name, please ?
    Thank you in advance,
    Maciej

Viewing 8 replies - 1 through 8 (of 8 total)
  • Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @maciejrzeszutko,

    HTML tags are not expected in the product names. If you want to style your product names you can target the element that displays them with custom CSS.

    Thread Starter maciejrzeszutko

    (@maciejrzeszutko)

    I Don’t agree with you. Product names are the same objects as WP article titles.
    When I use the HTML tags in the article titles and when I modify the article then I save it, the HTML tags are NOT skipped.
    Moreover, when I modify the product description (or product name) and then I save it, the HTML tags are NOT skipped. They are skipped ONLY when the product is purchased !!!
    BR,
    Maciej
    Telecom, 4G, 5G, 6G Software Engineer

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @maciejrzeszutko,

    I tested product titles with <div> and <span> HTML tags added to them and the tags display in the title markup of the product pages along with the cart and check out too without being stripped out.

    Product Title with HTML

    Cart

    Checkout

    No tags were skipped/removed when cross testing this for you.

    Thread Starter maciejrzeszutko

    (@maciejrzeszutko)

    Hi Stuart,

    Thank you very much for ypiur cross testing.

    Unfortunatelly, I still e^xperience this issue. If you have a little bit of time (it is not urgent) could you check directly on my website, please ?

    https://maciej.rzeszutko.net/produit/dim-02-septembre-2018-stage-trail-initiation-3-jours-dans-la-vallee-de-chamonix-mont-blanc

    As a paiement method you could use “Virement bancaire” (no PayPal Gateway).

    Please note the exact product name is “Dim 02 Septembre 2018<div class=”stage”>Stage Trail Initiation 3 jours dans la Vallée de Chamonix-Mont-Blanc</div><span class=”level-trail”>Niveau 2/4 Intermédiaire</span>”

    Please note I’m using also the Following plugins:
    WooCommerce – Autocomplete Orders
    WooCommerce Attach Me!
    Woocommerce Catalog
    WooCommerce External Product New Tab
    WooCommerce Menu Cart
    WooCommerce PDF Invoices & Packing Slips
    WooCommerce: Show Empty Categories

    How to be sure it is not bcause I’m using them ? Deactivating one by one ?

    Thank you in advance,
    Best Regards,
    Maciej

    Thread Starter maciejrzeszutko

    (@maciejrzeszutko)

    Hi Stuart,

    I have retested on the fresh WP (4.9.8) + Woocommerce (3.4.5) install.

    It seems that the issue depends on the value of HTM tag !

    I have tested several combinaisons:
    “Product with <div><span>HTML tags</span></div> within the title” : NO ISSUE
    “Product with <div class=”oops-div”>HTML tags</div> within the title” and “.oops-div {background-color: #e5e5e5 ;}” in the style.css file : NO ISSUE
    “Product with <span class=”oops-span”>HTML tags</div> within the title” and “.oops-span {background-color: #e5e5e5 ;}” in the style.css file : NO ISSUE
    “Product with <div class=”oops-div”>HTML tag1</div><span class=”oops-span”>HTML tag2</span> within the title” and “.oops-div {background-color: #e5e5e5 ;} .oops-span {background-color: #a5a5a5 ;}”” in the style.css file : NO ISSUE
    BUT WITH :
    “Product with <div class=”oops-div”>HTML tag1</div><span class=”oops-span”>HTML tag2</span> within the title”
    .oops-div {background-color: #e5e5e5 ;}
    .oops-span {font-weight: 500 !important; color: #303030 !important;}
    I CAN SEE THE ISSUE

    You can try here : https://test.rzeszutko.net/sample-page

    Could you fix this issue, please ?

    Best Regards,
    Maciej

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @maciejrzeszutko

    This issue is caused as a result of the HTML or code applied within the content or the Edit Product page. For this, I’ll mark this issue resolved and you will now be able to reach out to a developer for custom code support, which is not supported here.

    We recommend one of the services listed on this page who can assist with any custom development work:

    https://woocommerce.com/customizations/

    Hopefully, this gets you going in the right direction to get the job done!

    Thread Starter maciejrzeszutko

    (@maciejrzeszutko)

    Hi John,
    I Don’t agree with you. Product names are the same objects as WP article titles.
    When I use the HTML tags in the article titles and when I modify the article then I save it, the HTML tags are NOT skipped.
    Moreover, when I modify the product description (or product name) and then I save it, the HTML tags are NOT skipped. They are skipped ONLY when the product is purchased !!!
    I’ll mark this issue unresolved because it should be fixed by Woocommerce team.
    BR,
    Maciej
    Telecom, 4G, 5G, 6G Software Engineer

    Thread Starter maciejrzeszutko

    (@maciejrzeszutko)

    Hello,
    This issue is still unresolved.
    BR,
    Maciej

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘HTML formatting in product names disappear when the order is validated’ is closed to new replies.