Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Customising the Add to Cart button


T_S

Question

Site URL: https://createandempower.com/fashion-dream-job-online-course

Hi

I've  got a sales page with 3 'add to cart' buttons appearing at different sections in the page as you scroll through. All three buttons link to the same product. I have express checkout switched on so clicking on any of these takes the customer straight to checkout.

Is there any way to change the text on each of the buttons while keeping them linked to the same product (and same inventory)?

For example, I'd like the first button to say 'I already know I want to sign up' , the second button to say 'I'm ready! Take me to the checkout page.' and the final button to say 'I'm in!'

Is this possible? How?

Thank you!

Link to post
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0

I think it would not be hard to do what you want. Please provide your site-wide password so that we can take a look at your issue.

Hello I'm Thomas. I've been getting websites up and running for 26 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Link to post
  • 0

Hi, I'd really appreciate help on this please!

I've  got a sales page with 3 'add to cart' buttons appearing at different sections in the page as you scroll through. All three buttons link to the same product. I have express checkout switched on so clicking on any of these takes the customer straight to checkout.

Is there any way to change the text on each of the buttons while keeping them linked to the same product (and same inventory)?

For example, I'd like the first button to say 'I already know I want to sign up' , the second button to say 'I'm ready! Take me to the checkout page.' and the final button to say 'I'm in!'

Is this possible? How?

Here's the link:

https://createandempower.com/fashion-dream-job-online-course

Thank you!

Edited by T_S
Link to post
  • 0

The following uses Javascript and jQuery. Add the following to Settings > Advanced > Code Injection > HEADER.

<script src="//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Add the following to Page Settings > Advanced > PAGE HEADER CODE INJECTION.

<script>

  $( ( ) => {
  
    let buttonsNames = [
    
      /*
      
      need to use a single quote in the button name?
      be sure to proceed the single quote with a backslash
      
      */
      
      'I already know I want to sign up.',
      'I\'m ready! Take me to the checkout page.',
      'I\'m in!'
      
      ];
      
    $( '.sqs-add-to-cart-button-inner' ).each ( ( index, value ) => {
    
      $( value ).text ( buttonsNames [ index ] );
      
      } );
      
    } );
    
  </script>

Change the button names to suite your needs. This script loops through all the product block add to cart buttons on a page and changes their names. One advantage to this approach is that you don't have to customize the add to cart button text on a product item in the store.

Let us know how it goes.

Hello I'm Thomas. I've been getting websites up and running for 26 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...