• Hi

    I hope someone can help me out there. I am new to wordpress woocommerce and almost dont know anything about this. i Am having two problems with my add to cart button. But the funny thing is the problem is only on this page, not in the single products page

    http://luxshisha.dk/shop/

    problem 1)
    When i press the + button to add a product and the press the add to cart button it takes me to another products page and not the cart page as it is supposed to. it takes me to this page

    http://luxshisha.dk/shop/mix-pakke/#.U3Y1Uk2KCUk

    problem 2)
    how can i change the name on the button from add to cart to something in Danish. on the single products page it is correct in Danish but not on this page.

    i hope someone can help. thank you very much

Viewing 8 replies - 1 through 8 (of 8 total)
  • I’m not entirely sure what’s going on with the add to cart button. But if you want to change the text of the ‘Add To Cart’ to something else, add this to your child themes function.php file:

    add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' );                                // < 2.1
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' );    // 2.1 +
    
    function woo_custom_cart_button_text() {
    
            return __( 'My Custom Button Text', 'woocommerce' );
    
    }

    As a check, have you set up the proper shopping cart page? Confirm that the shopping cart template is set and has been created inside of ‘Pages > Shopping Cart’ or similar (I don’t have it open in front of me)
    Evan

    Thread Starter Ahmad82

    (@ahmad82)

    Hi Evan Herman

    Thanks for your quick replay. It has been set up correctly in the admin page under pages as you described. But it is in Danish and says indkøbskurv and not shopping cart. maybe thats the problem. But then maybe it is the same place i can correct it as the button.

    Another thing. i have found the text you wrote to me, but i dont know which file i have to write it in exactly. the page was created by another person, and not me. i hope you can guide me to the correct file. thank you

    I told you above, it goes into your child themes functions.php file. Outside of that I can’t direct you any further.

    Thread Starter Ahmad82

    (@ahmad82)

    can i find the themes in public_html/wp-content/themes?

    thanks again

    Thread Starter Ahmad82

    (@ahmad82)

    i found the folder and tried you code. but i did not Work on the button in my shop page but only on the buttons on the single products pages 😀

    Thread Starter Ahmad82

    (@ahmad82)

    do you know where i can find the shop.html file? maybe it is there 😀

    Thread Starter Ahmad82

    (@ahmad82)

    i have cleaned up a bit. The one that made this page had a lot of themes, and folders that is not necesary. i have deleted all the ones that is not in use. But i still cant solve the button thing in the shop page. If anyone can help please tell me 😀

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problems with add to cart button’ is closed to new replies.