diff --git a/admin-dev/tabs/AdminProducts.php b/admin-dev/tabs/AdminProducts.php index 7e7c3b29a..1f8825f67 100644 --- a/admin-dev/tabs/AdminProducts.php +++ b/admin-dev/tabs/AdminProducts.php @@ -2603,10 +2603,22 @@ class AdminProducts extends AdminTab '; } else + { echo ' '.$this->l('The stock management is disabled').' '; + echo ' + + '.$this->l('Minimum quantity:').' + + +

'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'

+ + + '; + } + echo '
diff --git a/classes/Cart.php b/classes/Cart.php index dbb7870a4..0f03bed3c 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -310,9 +310,11 @@ class CartCore extends ObjectModel $row['description'] = $discount->description ? $discount->description : $discount->name; $row['value_real'] = $discount->getValue(sizeof($result), $total_products_wt, $shipping_wt, $this->id); $row['value_tax_exc'] = $discount->getValue(sizeof($result), $total_products, $shipping, $this->id, false); + if ($row['value_real'] !== 0) self::$_discounts[$this->id][] = $row; + else + $this->deleteDiscount($row['id_discount']); } - return isset(self::$_discounts[$this->id]) ? self::$_discounts[$this->id] : NULL; } diff --git a/modules/ebay/config.xml b/modules/ebay/config.xml index 19df444fd..31fd3b958 100755 --- a/modules/ebay/config.xml +++ b/modules/ebay/config.xml @@ -2,7 +2,7 @@ ebay - + diff --git a/modules/ebay/eBayRequest.php b/modules/ebay/eBayRequest.php index 0ebf7fa22..fdc674c06 100755 --- a/modules/ebay/eBayRequest.php +++ b/modules/ebay/eBayRequest.php @@ -57,7 +57,7 @@ class eBayRequest private $compatibilityLevel; - private $debug = true; + private $debug = false; /******************************************************************/ /** Constructor And Request Methods *******************************/ diff --git a/modules/ebay/ebay.php b/modules/ebay/ebay.php index 82327c9f2..f4b480629 100755 --- a/modules/ebay/ebay.php +++ b/modules/ebay/ebay.php @@ -59,7 +59,7 @@ class Ebay extends Module { $this->name = 'ebay'; $this->tab = 'market_place'; - $this->version = '1.2.5'; + $this->version = '1.2.6'; $this->author = 'PrestaShop'; parent::__construct (); $this->displayName = $this->l('eBay'); @@ -476,8 +476,11 @@ class Ebay extends Module Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_order', array('id_order_ref' => pSQL($order['id_order_ref']), 'id_order' => (int)$id_order), 'INSERT'); } else + { + $cartAdd->delete(); $orderList[$korder]['errors'][] = $this->l('Could not add product to cart (maybe your stock quantity is 0)'); } + } else $orderList[$korder]['errors'][] = $this->l('Could not found products in database'); } @@ -1535,9 +1538,9 @@ class Ebay extends Module $images = $product->getImages($this->id_lang); foreach ($images as $image) { - $pictures[] = $prefix.$this->context->link->getImageLink('', $product->id.'-'.$image['id_image'], NULL); - $picturesMedium[] = $prefix.$this->context->link->getImageLink('', $product->id.'-'.$image['id_image'], 'medium'); - $picturesLarge[] = $prefix.$this->context->link->getImageLink('', $product->id.'-'.$image['id_image'], 'large'); + $pictures[] = str_replace('https://', 'http://', $prefix.$this->context->link->getImageLink('', $product->id.'-'.$image['id_image'], null)); + $picturesMedium[] = str_replace('https://', 'http://', $prefix.$this->context->link->getImageLink('', $product->id.'-'.$image['id_image'], 'medium')); + $picturesLarge[] = str_replace('https://', 'http://', $prefix.$this->context->link->getImageLink('', $product->id.'-'.$image['id_image'], 'large')); } // Load Variations @@ -1860,7 +1863,7 @@ class Ebay extends Module if (!Configuration::get('EBAY_PAYPAL_EMAIL')) return '

'.$this->l('You have to configure "General Settings" tab before using this tab.').'


'; - + $dateLastImport = '-'; if (file_exists(dirname(__FILE__).'/log/orders.php')) include(dirname(__FILE__).'/log/orders.php'); diff --git a/modules/mondialrelay/classes/MRCreateTickets.php b/modules/mondialrelay/classes/MRCreateTickets.php index 76d4a8ec0..4d2e04375 100755 --- a/modules/mondialrelay/classes/MRCreateTickets.php +++ b/modules/mondialrelay/classes/MRCreateTickets.php @@ -94,11 +94,11 @@ class MRCreateTickets implements IMondialRelayWSMethod 'Expe_Tel1' => array( 'required' => true, 'value' => '', - 'regexValidation' => '#^((00|\+)33|0)[0-9][0-9]{8}$#'), + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), 'Expe_Tel2' => array( 'required' => false, 'value' => '', - 'regexValidation' => '#^((00|\+)33|0)[0-9][0-9]{8}$#'), + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), 'Expe_Mail' => array( 'required' => false, 'value' => '', @@ -139,11 +139,11 @@ class MRCreateTickets implements IMondialRelayWSMethod 'Dest_Tel1' => array( 'required' => false, 'value' => '', - 'regexValidation' => '#^((00|\+)33|0)[0-9][0-9]{8}$#'), + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), 'Dest_Tel2' => array( 'required' => false, 'value' => '', - 'regexValidation' => '#^((00|\+)33|0)[0-9][0-9]{8}$#'), + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), 'Dest_Mail' => array( 'required' => false, 'value' => '', @@ -331,7 +331,7 @@ class MRCreateTickets implements IMondialRelayWSMethod $tmp['ModeLiv']['value'] = $orderDetail['mr_ModeLiv']; $tmp['NDossier']['value'] = $orderDetail['id_order']; $tmp['NClient']['value'] = $orderDetail['id_customer']; - $tmp['Dest_Langage']['value'] = $destIsoCode; + $tmp['Dest_Langage']['value'] = 'FR'; //Language::getIsoById($orderDetail['id_lang']); $tmp['Dest_Ad1']['value'] = $deliveriesAddress->lastname; $tmp['Dest_Ad2']['value'] = $deliveriesAddress->address2; $tmp['Dest_Ad3']['value'] = $deliveriesAddress->address1; diff --git a/modules/mondialrelay/mondialrelay.php b/modules/mondialrelay/mondialrelay.php index f83dacc9d..512265d2e 100755 --- a/modules/mondialrelay/mondialrelay.php +++ b/modules/mondialrelay/mondialrelay.php @@ -59,7 +59,7 @@ class MondialRelay extends Module { $this->name = 'mondialrelay'; $this->tab = 'shipping_logistics'; - $this->version = '1.7.3'; + $this->version = '1.7.4'; parent::__construct(); @@ -1140,6 +1140,7 @@ class MondialRelay extends Module o.`id_order` as id_order, o.`id_customer` as id_customer, o.`id_cart` as id_cart, + o.`id_lang` as id_lang, mrs.`id_mr_selected` as id_mr_selected, CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`, o.`total_paid_real` as total, o.`total_shipping` as shipping, diff --git a/themes/prestashop/js/order-opc.js b/themes/prestashop/js/order-opc.js index 6d2c572a7..249c31788 100755 --- a/themes/prestashop/js/order-opc.js +++ b/themes/prestashop/js/order-opc.js @@ -66,12 +66,17 @@ function updateCarrierList(json) else var extraHtml = ''; + if (taxEnabled && displayPrice == 0) + var price = carriers[i].price; + else + var price = carriers[i].price_tax_exc; + html = html + ''+ ''+ ''+ ''+carriers[i].delay+''+ - ''+formatCurrency(carriers[i].price, currencyFormat, currencySign, currencyBlank)+''; + ''+formatCurrency(price, currencyFormat, currencySign, currencyBlank)+''; if (taxEnabled && displayPrice == 0) html = html + ' ' + txtWithTax; else