Jump to content

[SOLVED] Add to Cart


overbags

Recommended Posts

I need the text to be on the "add to cart" button because many don't read the written reservation

I was thinking of creating an if in the <span> of the <button> "add to cart" type

if $ product-> quantity <= 0

book

else

Add to Cart

/ if

but with $ product-> quantity it gives me the total sum of the attributes of a product and not the quantity of the single attribute

Edited by overbags (see edit history)
Link to comment
Share on other sites

In /public_html/themes/default-bootstrap/js/product.js

function updateDisplay()
{
  //add
    if (quantityAvailable > 0) {
        $('#add_to_cart span').text('Add to cart');
    }  else {
        $('#add_to_cart span').text('Preorder');
    }
  //end add
  .....

 

Link to comment
Share on other sites

  • overbags changed the title to [SOLVED] Add to Cart

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...