Jump to content

Paypal Express checkout ajax response problem


Funtechireland

Recommended Posts

Can anyone check there ajax.php file under paypal/expresscheckout.

As when I click the color of the product image is not switching and ajax response is die("1"); 

Here is the link:

http://www.funtechglobal.com/en/phone-case/478-iphone-66s-leather-wallet-case.html

 
 and the code 
 
if ($quantity && $quantity > 0) {
    /* Ajax response */
    $id_product = (int) Tools::getValue('id_product');
    $id_product_attribute = (int) Tools::getValue('id_product_attribute');
    $product_quantity = Product::getQuantity($id_product, $id_product_attribute);
    $product = new Product($id_product);
 
        //var_dump($id_product);
        //die;
 
 
    if (!$product->available_for_order) {
        die('0');
    }
 
    if ($product_quantity > 0) {
 
      // die;
        die('1');
    }
 
    if ($product_quantity <= 0 && $product->isAvailableWhenOutOfStock((int) $product->out_of_stock)) {
       //    var_dump $product_quantity;
        die('2');
    }
 
}
die('0');
Link to comment
Share on other sites

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...