//reorder option in product preferences

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13760 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur
2012-02-29 17:19:45 +00:00
parent 512cc3e73e
commit 7b38b73f0f
2 changed files with 140 additions and 117 deletions
+136 -117
View File
@@ -35,120 +35,9 @@ class AdminPPreferencesControllerCore extends AdminController
parent::__construct();
$this->options = array(
'products' => array(
'title' => $this->l('Products'),
'icon' => 'tab-orders',
'order_by_pagination' => array(
'title' => $this->l('Pagniation'),
'fields' => array(
'PS_CATALOG_MODE' => array(
'title' => $this->l('Catalog mode:'),
'desc' => $this->l('When active, all features for shopping will be disabled'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_ORDER_OUT_OF_STOCK' => array(
'title' => $this->l('Allow ordering out-of-stock product:'),
'desc' => $this->l('Add to cart button is hidden when product is unavailable'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_STOCK_MANAGEMENT' => array(
'title' => $this->l('Enable stock management:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool',
'js' => array(
'on' => 'onchange="stockManagementActivationAuthorization()"',
'off' => 'onchange="stockManagementActivationAuthorization()"'
)
),
'PS_ADVANCED_STOCK_MANAGEMENT' => array(
'title' => $this->l('Enable advanced stock management:'),
'desc' => $this->l('Allows you to manage a physical stock, warehouses and supply orders.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool',
'visibility' => Shop::CONTEXT_ALL
),
'PS_DISPLAY_QTIES' => array(
'title' => $this->l('Display available quantities on product page:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_DISPLAY_JQZOOM' => array(
'title' => $this->l('Enable JqZoom instead of Thickbox on product page:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_DISP_UNAVAILABLE_ATTR' => array(
'title' => $this->l('Display unavailable product attributes on product page:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_ATTRIBUTE_CATEGORY_DISPLAY' => array(
'title' => $this->l('Display "add to cart" button when product has attributes:'),
'desc' => $this->l('Display or hide the "add to cart" button on category pages for products that have attributes to force customers to see the product detail'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
'PS_COMPARATOR_MAX_ITEM' => array(
'title' => $this->l('Max items in the comparator:'),
'desc' => $this->l('Set to 0 to disable this feature'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
'type' => 'text'
),
'PS_PURCHASE_MINIMUM' => array(
'title' => $this->l('Minimum purchase total required in order to validate order:'),
'desc' => $this->l('Set to 0 to disable this feature'),
'validation' => 'isFloat',
'cast' => 'floatval',
'type' => 'price'
),
'PS_LAST_QTIES' => array(
'title' => $this->l('Display last quantities when qty is lower than:'),
'desc' => $this->l('Set to 0 to disable this feature'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
'type' => 'text'
),
'PS_NB_DAYS_NEW_PRODUCT' => array(
'title' => $this->l('Number of days during which the product is considered \'new\':'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'type' => 'text'
),
'PS_CART_REDIRECT' => array(
'title' => $this->l('Re-direction after adding product to cart:'),
'desc' => $this->l('Concerns only the non-AJAX version of the cart'),
'cast' => 'intval',
'show' => true,
'required' => false,
'type' => 'radio',
'validation' => 'isBool',
'choices' => array(
0 => $this->l('previous page'),
1 => $this->l('cart summary')
)
),
'PS_PRODUCTS_PER_PAGE' => array(
'title' => $this->l('Products per page:'),
'desc' => $this->l('Products displayed per page. Default is 10.'),
@@ -185,14 +74,56 @@ class AdminPPreferencesControllerCore extends AdminController
)
),
'identifier' => 'id'
)
)
),
'fo_product_page' => array(
'title' => $this->l('Product page'),
'fields' => array(
'PS_DISPLAY_QTIES' => array(
'title' => $this->l('Display available quantities on product page:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_PRODUCT_SHORT_DESC_LIMIT' => array(
'title' => $this->l('Short description max size'),
'desc' => $this->l('Set the maximum size of product short description'),
'validation' => 'isInt',
'PS_LAST_QTIES' => array(
'title' => $this->l('Display last quantities when qty is lower than:'),
'desc' => $this->l('Set to 0 to disable this feature'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
'type' => 'text'
),
'PS_DISPLAY_JQZOOM' => array(
'title' => $this->l('Enable JqZoom instead of Thickbox on product page:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_DISP_UNAVAILABLE_ATTR' => array(
'title' => $this->l('Display unavailable product attributes on product page:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_ATTRIBUTE_CATEGORY_DISPLAY' => array(
'title' => $this->l('Display "add to cart" button when product has attributes:'),
'desc' => $this->l('Display or hide the "add to cart" button on category pages for products that have attributes to force customers to see the product detail'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
)
)
),
'product_images' => array(
'title' => $this->l('Products images'),
'fields' => array(
'PS_IMAGE_GENERATION_METHOD' => array(
'title' => $this->l('Image generated by:'),
'validation' => 'isUnsignedId',
@@ -252,6 +183,94 @@ class AdminPPreferencesControllerCore extends AdminController
'type' => 'bool',
'visibility' => Shop::CONTEXT_ALL
),
)
),
'stock' => array(
'title' => $this->l('Products stock'),
'fields' => array(
'PS_ORDER_OUT_OF_STOCK' => array(
'title' => $this->l('Allow ordering out-of-stock product:'),
'desc' => $this->l('Add to cart button is hidden when product is unavailable'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_STOCK_MANAGEMENT' => array(
'title' => $this->l('Enable stock management:'),
'desc' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool',
'js' => array(
'on' => 'onchange="stockManagementActivationAuthorization()"',
'off' => 'onchange="stockManagementActivationAuthorization()"'
)
),
'PS_ADVANCED_STOCK_MANAGEMENT' => array(
'title' => $this->l('Enable advanced stock management:'),
'desc' => $this->l('Allows you to manage a physical stock, warehouses and supply orders.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool',
'visibility' => Shop::CONTEXT_ALL
),
)
),
'products' => array(
'title' => $this->l('Products (general)'),
'fields' => array(
'PS_CATALOG_MODE' => array(
'title' => $this->l('Catalog mode:'),
'desc' => $this->l('When active, all features for shopping will be disabled'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool'
),
'PS_COMPARATOR_MAX_ITEM' => array(
'title' => $this->l('Max items in the comparator:'),
'desc' => $this->l('Set to 0 to disable this feature'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
'type' => 'text'
),
'PS_PURCHASE_MINIMUM' => array(
'title' => $this->l('Minimum purchase total required in order to validate order:'),
'desc' => $this->l('Set to 0 to disable this feature'),
'validation' => 'isFloat',
'cast' => 'floatval',
'type' => 'price'
),
'PS_NB_DAYS_NEW_PRODUCT' => array(
'title' => $this->l('Number of days during which the product is considered \'new\':'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'type' => 'text'
),
'PS_CART_REDIRECT' => array(
'title' => $this->l('Re-direction after adding product to cart:'),
'desc' => $this->l('Concerns only the non-AJAX version of the cart'),
'cast' => 'intval',
'show' => true,
'required' => false,
'type' => 'radio',
'validation' => 'isBool',
'choices' => array(
0 => $this->l('previous page'),
1 => $this->l('cart summary')
)
),
'PS_PRODUCT_SHORT_DESC_LIMIT' => array(
'title' => $this->l('Short description max size'),
'desc' => $this->l('Set the maximum size of product short description'),
'validation' => 'isInt',
'cast' => 'intval',
'type' => 'text'
),
'PS_QTY_DISCOUNT_ON_COMBINATION' => array(
'title' => $this->l('Quantity discounts based on:'),
'desc' => $this->l('How to calculate quantity discounts'),
+4
View File
@@ -2234,6 +2234,7 @@ $_LANGADM['AdminPPreferences759892e4fd5da7b789eee82dcca9df45'] = 'Produits par p
$_LANGADM['AdminPPreferences769d0fbed5bbf0bb965e0cf33d1d6334'] = 'Afficher les quantités disponibles sur la page produit :';
$_LANGADM['AdminPPreferences78ed1e99c1143172692db7f58722c93f'] = 'Nombre de jours durant lesquels un produit est considéré comme \"nouveau\" :';
$_LANGADM['AdminPPreferences7c96e8b786ae7bf55d100a864a73b44b'] = 'Activer la gestion des stocks :';
$_LANGADM['AdminPPreferences7dbe88f99044a2b7e37ae992b8651be4'] = 'Produits (general)';
$_LANGADM['AdminPPreferences88694e637431115721b5241e652a178f'] = 'Remises des quantités basées sur :';
$_LANGADM['AdminPPreferences90dc497d9d6686ce91ad5c94524020f0'] = 'Mode catalogue :';
$_LANGADM['AdminPPreferences990f7aaf94657fef90a1326a88958c78'] = 'Concerne uniquement la version non-Ajax du panier';
@@ -2254,6 +2255,7 @@ $_LANGADM['AdminPPreferencesca267c647010fcc8c76e3ccd3fddd572'] = 'Tri par défau
$_LANGADM['AdminPPreferencesca7de506b98e6e8c63285923677507de'] = 'Nombre de produits par page. Valeur par défaut : 10';
$_LANGADM['AdminPPreferencesca9bccbec65b9e333e8896dbe43369df'] = '0 pour désactiver cette fonctionnalité';
$_LANGADM['AdminPPreferencescf3fb1ff52ea1eed3347ac5401ee7f0c'] = 'Croissant';
$_LANGADM['AdminPPreferencescf9694d1337719003737cc35e3c31eb9'] = 'Images produit';
$_LANGADM['AdminPPreferencesd6749853deb2dfe0920371d50fbbb377'] = 'Vous permet de gérer un stock physique, des entrepôts, et des commandes fournisseurs.';
$_LANGADM['AdminPPreferencesd920ec381c352d9d92a53ed3d261e8c6'] = 'Date de modification';
$_LANGADM['AdminPPreferencesdcf765af784bde828a35fc529a1760ef'] = 'Ordre par défaut :';
@@ -2264,6 +2266,8 @@ $_LANGADM['AdminPPreferencese4636eaae9d9044b9ae49392197713ed'] = 'Tri par défau
$_LANGADM['AdminPPreferencese57fbdf001b4b35e6ca7dcdc628ca853'] = 'La taille maximum des images envoyées par les clients (en octets)';
$_LANGADM['AdminPPreferencese7ed00268dc16aecaac5a60aeb6f4c73'] = 'Ce réglage doit rester sur \"Oui\" à moins que vous nayez déplacé avec succès les images dans l\'onglet Préférences, sous-onglet Images';
$_LANGADM['AdminPPreferenceseaae26a6fb20ed3ef54fb23bfa0b1fcc'] = 'largeur';
$_LANGADM['AdminPPreferenceseb763a2e313718f33f55e1f0d84df6ee'] = 'Page produit';
$_LANGADM['AdminPPreferencesff26a60315cd84533d5339ba26617988'] = 'Stocks produit';
$_LANGADM['AdminPayment1b1e7483572e24b802c4f4dec44b7a31'] = 'Restrictions des groupes';
$_LANGADM['AdminPayment1c2e8d60a8f68d08b7009d5e4d5fa137'] = 'Pour chaque module, veuillez cocher la ou les devises à activer.';
$_LANGADM['AdminPayment1f3a05f7b45df8e5c5cafaf0485eedd5'] = 'Cliquez pour voir la liste des modules de paiement.';