API MODIFICATIONS

This commit is contained in:
Christophe LATOUR 2017-10-10 17:41:30 +02:00
parent 2a5b0712e9
commit e53982d90b
3 changed files with 9 additions and 5 deletions

View File

@ -29,6 +29,10 @@ spl_autoload_register(function($className) {
if (function_exists('smartyAutoload') AND smartyAutoload($className))
return true;
if (function_exists('Predis\predisAutoload') AND Predis\predisAutoload($className)) {
return true;
}
$className = str_replace(chr(0), '', $className);
$classDir = dirname(__FILE__).'/../classes/';
$overrideDir = dirname(__FILE__).'/../override/classes/';

View File

@ -161,10 +161,10 @@ class Privatesales_Family_Menu extends Module {
}
// create new format image
$image_menu = imagecreatetruecolor(260, 211);
$image_cat = imagecreatefromjpeg($img_tmp);
imagecopyresampled($image_menu, $image_cat, 0, 0, 0, 0, 260, 211, 260, 211);
imagejpeg($image_menu, _PS_ROOT_DIR_.'/img/menu/'.$sale['id_category'].'.jpg',100);
// $image_menu = imagecreatetruecolor(260, 211);
// $image_cat = imagecreatefromjpeg($img_tmp);
// imagecopyresampled($image_menu, $image_cat, 0, 0, 0, 0, 260, 211, 260, 211);
// imagejpeg($image_menu, _PS_ROOT_DIR_.'/img/menu/'.$sale['id_category'].'.jpg',100);
}
$sales[$key_sale]['img'] = '/img/menu/'.$sale['id_category'].'.jpg';

View File

@ -2,7 +2,7 @@
class PaymentModule extends PaymentModuleCore {
public function validateOrder($id_cart, $id_order_state, $amountPaid, $paymentMethod = 'Unknown', $message = NULL, $extraVars = array(), $currency_special = NULL, $dont_touch_amount = false, $secure_key = false)
{
global $cart;
global $cart, $cookie;
$cart = new Cart((int)($id_cart));
// Does order already exists ?