Site logo

[Support request] Cart vs Basket

Home Forums Support [Support request] Cart vs Basket

Home Forums Support Cart vs Basket

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #942640
    Sam

    Hi, I have noticed something strange I hope you can help me with…

    It seems that in WC there are conflicting terms used for the cart/basket:

    – The add to cart button says “Add To Basket”
    – The mini cart menu has a button that says “View Basket”

    However,

    – Hovering over the cart icon in the menu says “view your shopping cart”
    – The page title on the cart/basket page is “cart”

    Is this a WC issue or something that is set in GP?

    Is there any way to amend this so it is consistent?

    Thanks
    Sam

    #942659
    Sam

    Hi, I solved the page title, it was as simple as changing the page title of the cart page… duh!

    Any help with the other would be appreciated.

    thanks

    #942765
    David
    Staff
    Customer Support

    Glad to hear you got it resolved and thanks for sharing the solution 🙂

    #1907635
    Sam

    Hi Guys, circling back on this again. To summarise:

    – on the cart page, Woo default is “cart” but you can change to “basket” simply by changing the page title.
    – The add to cart button itself seems to say “Basket” by default but you can add a snippet or use a plugin to change this button on both archive or the product page.
    – That leaves one last piece related to GeneratePress. The mini cart. This says “basket” but if you hover the cart icon in the menu it says “view your shipping cart” in the alt text on hover.

    So in the end I stuck to Basket as it seemed the easiest to change. However, if I wanted to change to use “add to cart”, how do I change the add to cart button in the mini cart dropdown and widget?

    Thanks
    Sam

    #1907907
    David
    Staff
    Customer Support

    Not easily as its currently baked in – but it is transtlatable – so try the gettext filter – see here:

    https://generatepress.com/forums/topic/how-do-you-change-the-link-title-of-the-shopping-cart/#post-1430406

    #1907924
    Sam

    Hi David, thanks so your solution here would be to use the gettext filter for both the button and the hover label?

    That would be tricky as if it doesn’t somehow target that button it would change every instance of the word “basket”, no?

    thanks
    Sam

    #1908232
    David
    Staff
    Customer Support

    the gettext filter should apply to any text string that is translatable which the Title attribute of that button is ( which is what the browser uses to show the tooltip hover label ). And it will only apply to strings that 100% match, in the link i provided it looks for that entire text string

    #1908236
    Sam

    Right, understood.

    So how do I change the “basket” button?

    thanks

    #1908268
    David
    Staff
    Customer Support

    Do you mean the Basket Icon in the nav ? As that filter i provided should changes it Title.

    #1908309
    Sam

    No, sorry I mean the #wc-mini-cart .button for the “Basket” button

    #1908918
    David
    Staff
    Customer Support

    Sorry i am a little confused – this is what i see:

    https://www.screencast.com/t/ajECY3nj7s

    The tooltip is still Cart – is that what you mean?

    #1908962
    Sam

    Sorry no I understood your solution for that. I was talking also about changing the “View Basket” button to “View Cart”.

    thanks

    #1909023
    David
    Staff
    Customer Support

    Now i am confused lol

    So you want the View Basket to read View Cart ?

    #1909076
    Sam

    Yes, sorry if that was not explained properly, I did try to explain both issues. That is the second issue I would like to address.

    #1909117
    David
    Staff
    Customer Support

    You would use the same gettext filter:

    https://generatepress.com/forums/topic/how-do-you-change-the-link-title-of-the-shopping-cart/#post-1430406

    The function in that code is anonymous, so you can add it multiple times, just change the

    'View your shopping cart' === $translated_text

    To

    'View Basket' === $translated_text

    Just be mindful of the transients cache on Woo may need clearing to see those changes on the front end – see here:

    https://github.com/woocommerce/woocommerce/issues/15375

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.