Added to cart popup doesnt show product's name anymore

This topic has 22 replies, 6 voices, and was last updated 8 years, 1 months ago ago by Eva Kemp

  • Avatar: Royalty
    Royalty
    Participant
    August 2, 2016 at 13:45

    Hello,
    since a few updates, the popup that appears when I add a product to the cart only says “was successfully added to your cart”. Before, it always added the products title before that sentence. Firebug says that there is a h5 tag <h5 class=”emodal-title”></h5> but its empty. Please find my test environment in private content. I have ALL PLUGINS DISABLED, except woocommerce (version 2.6.4)
    Many thanks in advance!

    Please, contact administrator
    for this information.
    21 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 2, 2016 at 14:34

    Hello,

    You can change it in the /royal/js/etheme.js file.
    You need to replace the similar line http://prntscr.com/c0obom to the following: productName = $('.meta-title span').first().text();
    Also we recommended to make all changes in the Child Theme.

    Regards,
    Rose Tyler.

    Avatar: Royalty
    Royalty
    Participant
    August 2, 2016 at 14:41

    Dear Rose, thank you.
    Will this be fixed in the next update?
    I have a childtheme, but switched to parent theme to be sure this bug is not caused by my childtheme.
    I dont see any difference between your screenshot and the code I should replace it by.
    In line 1459, I’ve got:

    productName = $('.product-information .product-name, .product_title').first().text();  
        
     modalWindow.eModal('endLoading')
                         .eModal('setTitle',productName)
                         .eModal('addImage', productImageSrc)
                         .eModal('addText', successfullyAdded)
                         .eModal('addBtn',{
                                title: contBtn,
                                href: 'javascript:void(0);',
                                cssClass: 'btn filled',
                                hideOnClick: true
                            })

    Can you please give me some more advices?
    Many thanks in advance!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 2, 2016 at 15:07

    Hello,

    Yes, you should replace your line productName = $('.product-information .product-name, .product_title').first().text();

    Regards,
    Rose Tyler.

    Avatar: Royalty
    Royalty
    Participant
    August 2, 2016 at 15:31

    Ah ok, I misunderstood your answer, now I got it, thank you!
    So will this be fixed in the next update?

    Avatar: Royalty
    Royalty
    Participant
    August 2, 2016 at 15:33

    And second question: How can I fix this in an update safe way for my childtheme?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 2, 2016 at 16:02

    Hello,

    You’re welcome! This issue will be fixed in the next update.
    Also, you need read these articles https://codex.wordpress.org/Child_Themes
    https://www.8theme.com/demo/docs/royal/#!/2_child_theme
    https://teamtreehouse.com/community/wordpress-how-to-enqueue-script-to-child-theme

    Regards,
    Rose Tyler.

    Avatar: Royalty
    Royalty
    Participant
    August 2, 2016 at 17:36

    Thank you. I thought maybe there is a way to copy the theme structure to childtheme and to override without having to enqueue scripts, like with woocommerce..

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    August 3, 2016 at 12:53

    Hello,

    Please, read WP documentation attentively. Unfortunately, it does not work for scripts. Follow the official WP documentation if you need to add custom scripts.

    Avatar: marlinda
    marlinda
    Participant
    September 19, 2016 at 18:27

    Hi, has this bug been taken care of in the newest update (2.7.3)?
    The mentioned file already says

    productName = $(‘.meta-title span’).first().text();

    but the cart popup still doesn’t show the product name.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 19, 2016 at 19:08

    Hello,

    As I see product title is shown http://storage3.static.itmages.com/i/16/0919/h_1474308532_8317666_fcf4fb797c.png

    Please show a screenshot of the issue you mean.

    Thank you.
    Best regards,
    Jack Richardson.

    Avatar: marlinda
    marlinda
    Participant
    September 19, 2016 at 19:23

    I am not the one who started this thread, so I’m guessing that you are looking at the wrong webshop.
    See private info for my address.
    Thanks!

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 20, 2016 at 08:06

    Hello @marlinda,

    Sorry for misunderstanding.
    Unfortunately it wasn’t fixed in the 2.7.3 version.
    Our developers will resolve it in the next update.
    Please take our apologies.

    Best regards,
    Jack Richardson.

    Avatar: Royalty
    Royalty
    Participant
    October 14, 2016 at 18:43

    It’s still not fixed in version 2.8. Why??

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 14, 2016 at 19:28

    Hello @Royalty,

    It was fixed.

    Clear browser cache and check again.

    Best regards,
    Jack Richardson.

    Avatar: Royalty
    Royalty
    Participant
    October 14, 2016 at 23:50

    Its definetly not fixed, it only works because I edited etheme.js! Please delete the screenshot of my page!

    Avatar: Eva
    Eva Kemp
    Support staff
    October 15, 2016 at 08:09

    Hello @Royalty,

    May we reupload theme files?
    Please provide FTP credentials.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    October 15, 2016 at 08:57

    Hello Eva,
    the screenshot Jack posted (and now deleted – thank you) was taken from my official page, where I still have version 2.7.3 enabled. I uploaded the new version 2.8. to a test environment. Before I give you FTP credentials, let me tell you what I changed to make it work:
    In etheme.js line 1470, there is:

    if ($('.product_title').first().text()) {
     productName = $('.product_title').first().text();
     } else {
     productName = $('h1.title').first().text();
     }

    and I changed the code to:

    if ($('.meta-title span').first().text()) {
     productName = $('.meta-title span').first().text();
     } else {
     productName = $('h1.title').first().text();
     }

    Is it possible that the problem was only fixed for simple products? I have only variable products so I can not check it but maybe you can..

    Avatar: Eva
    Eva Kemp
    Support staff
    October 15, 2016 at 09:49

    Hello @Royalty,

    The problem was fixed both for variable and single products.
    Please provide FTP and WP admin credentials.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    October 15, 2016 at 10:57

    Ok, I have an idea what could cause the problem. I will check and let you know.

    Avatar: Royalty
    Royalty
    Participant
    October 15, 2016 at 11:39

    Ok I could solve it. It’s too complicated to explain in detail but it had something to do with YOAST seo plugin and breadcrumbs (your modification in etheme grabs the product title from a part in breadcrumbs and not just from the product-title, that makes it a bit complicated when using custom breadcrumbs). Sorry that I thought it was not fixed!

    Avatar: Eva
    Eva Kemp
    Support staff
    October 15, 2016 at 12:15

    Hello,

    Thank you for the information.
    Have a nice day.

    Regards,
    Eva Kemp.

  • Viewing 22 results - 1 through 22 (of 22 total)

The issue related to '‘Added to cart popup doesnt show product's name anymore’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.