Version Notes
Commande Express
Download this release
Release Info
Developer | Atol C |
Extension | ATOL_Commande_Express |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/local/Atol/Cmdxpress/Block/Listeproduits.php +61 -0
- app/code/local/Atol/Cmdxpress/controllers/IndexController.php +14 -0
- app/code/local/Atol/Cmdxpress/controllers/ListeController.php +15 -0
- app/code/local/Atol/Cmdxpress/etc/config.xml +66 -0
- app/code/local/Atol/Cmdxpress/sql/cmdxpress_setup/mysql4-install-0.1.0.php +36 -0
- app/design/frontend/base/default/layout/cmdxpress.xml +12 -0
- app/design/frontend/base/default/template/atol_cmdxpress/cmdxpress_block.phtml +140 -0
- app/design/frontend/base/default/template/atol_cmdxpress/listexpress.phtml +65 -0
- app/locale/en_US/Atol_Cmdxpress.csv +6 -0
- app/locale/fr_FR/Atol_Cmdxpress.csv +6 -0
- package.xml +26 -0
app/code/local/Atol/Cmdxpress/Block/Listeproduits.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @category Atol
|
5 |
+
* @package Atol_Cmdxpress
|
6 |
+
* @copyright Copyright (c) 2011 Atol C&D (http://www.atolcd.com)
|
7 |
+
*/
|
8 |
+
class Atol_Cmdxpress_Block_Listeproduits extends Mage_Catalog_Block_Product_View_Type_Grouped
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Récupération de la liste des produits groupés
|
12 |
+
*
|
13 |
+
* @return string
|
14 |
+
*/
|
15 |
+
public function getListe()
|
16 |
+
{
|
17 |
+
$_helper = $this->helper('catalog/output');
|
18 |
+
// liste des produits groupés
|
19 |
+
$_collectionGrouped = Mage::getResourceModel('catalog/product_collection')
|
20 |
+
->addAttributeToFilter('type_id', array('eq' => 'grouped'));
|
21 |
+
|
22 |
+
$options = "";
|
23 |
+
// pour chaque produit groupé
|
24 |
+
foreach ($_collectionGrouped as $_product){
|
25 |
+
$datas = $_product->getData();
|
26 |
+
$product = Mage::getModel('catalog/product')->load($datas['entity_id']);
|
27 |
+
$_productNameStripped = $this->stripTags($product->getName(), null, true);
|
28 |
+
// si les produits sont dispo et en commande xpress, on l'ajoute à la liste
|
29 |
+
if ($product->isAvailable() && $product->getXpress ()){
|
30 |
+
$options .= '<option value="'.$datas['entity_id'].'">'.$_helper->productAttribute($product, $product->getName() , 'name').'</option>';
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
return $options;
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Récupération des produits composants le produit groupé $parent
|
40 |
+
*
|
41 |
+
* @param Mage_Catalog_Model_Product
|
42 |
+
* @return Array Mage_Catalog_Model_Product
|
43 |
+
*/
|
44 |
+
public function getChildenProducts($parent){
|
45 |
+
$_associatedProducts = $parent->getTypeInstance(true)->getAssociatedProducts($parent);
|
46 |
+
return $_associatedProducts;
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Récupérer le produit d'identifiant $product_id
|
52 |
+
*
|
53 |
+
* @param integer
|
54 |
+
* @return Mage_Catalog_Model_Product
|
55 |
+
*/
|
56 |
+
public function getProductById($product_id){
|
57 |
+
$_product = Mage::getModel('catalog/product')->load($product_id);
|
58 |
+
return $_product;
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
app/code/local/Atol/Cmdxpress/controllers/IndexController.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @category Atol
|
5 |
+
* @package Atol_Cmdxpress
|
6 |
+
* @copyright Copyright (c) 2011 Atol C&D (http://www.atolcd.com)
|
7 |
+
*/
|
8 |
+
class Atol_Cmdxpress_IndexController extends Mage_Core_Controller_Front_Action
|
9 |
+
{
|
10 |
+
public function indexAction()
|
11 |
+
{
|
12 |
+
$this->_redirect('/');
|
13 |
+
}
|
14 |
+
}
|
app/code/local/Atol/Cmdxpress/controllers/ListeController.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @category Atol
|
5 |
+
* @package Atol_Cmdxpress
|
6 |
+
* @copyright Copyright (c) 2011 Atol C&D (http://www.atolcd.com)
|
7 |
+
*/
|
8 |
+
class Atol_Cmdxpress_ListeController extends Mage_Core_Controller_Front_Action
|
9 |
+
{
|
10 |
+
public function indexAction()
|
11 |
+
{
|
12 |
+
$this->loadLayout();
|
13 |
+
$this->renderLayout();
|
14 |
+
}
|
15 |
+
}
|
app/code/local/Atol/Cmdxpress/etc/config.xml
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Atol_Cmdxpress>
|
6 |
+
<version>0.1.0</version>
|
7 |
+
</Atol_Cmdxpress>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<frontend>
|
11 |
+
<routers>
|
12 |
+
<cmdxpress>
|
13 |
+
<use>standard</use>
|
14 |
+
<args>
|
15 |
+
<module>Atol_Cmdxpress</module>
|
16 |
+
<frontName>Atol-Cmdxpress</frontName>
|
17 |
+
</args>
|
18 |
+
</cmdxpress>
|
19 |
+
</routers>
|
20 |
+
<translate>
|
21 |
+
<modules>
|
22 |
+
<Atol_Cmdxpress>
|
23 |
+
<files>
|
24 |
+
<default>Atol_Cmdxpress.csv</default>
|
25 |
+
</files>
|
26 |
+
</Atol_Cmdxpress>
|
27 |
+
</modules>
|
28 |
+
</translate>
|
29 |
+
<layout>
|
30 |
+
<updates>
|
31 |
+
<cmdxpress>
|
32 |
+
<file>cmdxpress.xml</file>
|
33 |
+
</cmdxpress>
|
34 |
+
</updates>
|
35 |
+
</layout>
|
36 |
+
</frontend>
|
37 |
+
|
38 |
+
<global>
|
39 |
+
<blocks>
|
40 |
+
<module>
|
41 |
+
<class>Atol_Cmdxpress_Block</class>
|
42 |
+
</module>
|
43 |
+
</blocks>
|
44 |
+
<resources>
|
45 |
+
<cmdxpress_setup>
|
46 |
+
<setup>
|
47 |
+
<module>Atol_Cmdxpress</module>
|
48 |
+
<class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
|
49 |
+
</setup>
|
50 |
+
<connection>
|
51 |
+
<use>core_setup</use>
|
52 |
+
</connection>
|
53 |
+
</cmdxpress_setup>
|
54 |
+
<cmdxpress_write>
|
55 |
+
<connection>
|
56 |
+
<use>core_write</use>
|
57 |
+
</connection>
|
58 |
+
</cmdxpress_write>
|
59 |
+
<cmdxpress_read>
|
60 |
+
<connection>
|
61 |
+
<use>core_read</use>
|
62 |
+
</connection>
|
63 |
+
</cmdxpress_read>
|
64 |
+
</resources>
|
65 |
+
</global>
|
66 |
+
</config>
|
app/code/local/Atol/Cmdxpress/sql/cmdxpress_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
|
3 |
+
|
4 |
+
$installer = $this;
|
5 |
+
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
|
9 |
+
// Ajout du groupe d'attributs
|
10 |
+
$installer->addAttributeGroup('catalog_product', 'Default', 'Commande Express', 1000);
|
11 |
+
|
12 |
+
// Ajout de l'attribut
|
13 |
+
$installer->addAttribute('catalog_product', 'xpress', array(
|
14 |
+
'group' => 'Commande Express',
|
15 |
+
'type' => 'int',
|
16 |
+
'backend' => '',
|
17 |
+
'frontend' => '',
|
18 |
+
'label' => 'Commande Express',
|
19 |
+
'input' => 'boolean',
|
20 |
+
'class' => '',
|
21 |
+
'source' => '',
|
22 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
23 |
+
'visible' => true,
|
24 |
+
'required' => false,
|
25 |
+
'user_defined' => false,
|
26 |
+
'default' => '',
|
27 |
+
'searchable' => false,
|
28 |
+
'filterable' => false,
|
29 |
+
'comparable' => false,
|
30 |
+
'visible_on_front' => false,
|
31 |
+
'visible_in_advanced_search' => false,
|
32 |
+
'apply_to' => 'grouped',
|
33 |
+
));
|
34 |
+
|
35 |
+
|
36 |
+
$installer->endSetup();
|
app/design/frontend/base/default/layout/cmdxpress.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<default>
|
4 |
+
<reference name="right">
|
5 |
+
<block type="module/listeproduits" name="cmdxpress_block" template="atol_cmdxpress/cmdxpress_block.phtml" before="-"/>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
|
9 |
+
<cmdxpress_liste_index>
|
10 |
+
<block type="module/listeproduits" name="root" output="toHtml" template="atol_cmdxpress/listexpress.phtml" />
|
11 |
+
</cmdxpress_liste_index>
|
12 |
+
</layout>
|
app/design/frontend/base/default/template/atol_cmdxpress/cmdxpress_block.phtml
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product view template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_View
|
6 |
+
* @see Mage_Review_Block_Product_View
|
7 |
+
* @see Atol_Cmdxpress_Block_Listeproduits
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<script type="text/javascript">
|
12 |
+
//<![CDATA[
|
13 |
+
|
14 |
+
function loadProducts(val){
|
15 |
+
$('xpress_products').innerHTML = '<img src="<?php echo Mage::getBaseUrl ('skin').'frontend/default/blank/images/opc-ajax-loader.gif'; ?>" />';
|
16 |
+
$('xpress_err').innerHTML = '';
|
17 |
+
$('xpress_err').hide();
|
18 |
+
|
19 |
+
// appel du module de génération le la liste des produits groupés disponibles
|
20 |
+
var reloadurl = '<?php echo $this->getUrl('Atol-Cmdxpress/liste/') ?>';
|
21 |
+
var res = new Ajax.Request(reloadurl, {
|
22 |
+
method:'get',
|
23 |
+
parameters: {id: val},
|
24 |
+
onSuccess: function(transport){
|
25 |
+
var response = transport.responseText || "";
|
26 |
+
$('xpress_products').innerHTML = response;
|
27 |
+
}
|
28 |
+
});
|
29 |
+
}
|
30 |
+
|
31 |
+
function verifQty(){
|
32 |
+
$('xpress_err').innerHTML = '';
|
33 |
+
$('xpress_err').hide();
|
34 |
+
var tables = document.getElementById('cmdxpress_addtocart_form').getElementsByTagName("INPUT");
|
35 |
+
var choix = new Array();
|
36 |
+
var msg = "<?php echo $this->__('Too high quantity for') ?> :<br />";
|
37 |
+
|
38 |
+
var error = false;
|
39 |
+
var qty_zero = true;
|
40 |
+
var qty_negat = false;
|
41 |
+
var qty_vide = false;
|
42 |
+
var qty_carac = false;
|
43 |
+
|
44 |
+
if (tables != null && tables.length != 0){
|
45 |
+
// liste des quantités saisies
|
46 |
+
for (var i=0; i<tables.length; i++){
|
47 |
+
if (tables[i].type == 'text'){
|
48 |
+
choix.push(tables[i]);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
if (choix != null && choix.length != 0){
|
53 |
+
for (var i=0; i<choix.length; i++){
|
54 |
+
if (choix[i] != null){
|
55 |
+
choix[i].value = choix[i].value.replace(/^\s+/g,'').replace(/\s+$/g,''); // trim sur les quantités
|
56 |
+
// si la quantité n'est pas saisie on affiche le warning
|
57 |
+
if (choix[i].value == null || choix[i].value == ""){
|
58 |
+
qty_vide = true;
|
59 |
+
}else{
|
60 |
+
var qty = document.getElementById('qty_'+choix[i].id).value;
|
61 |
+
// vérification des caractères dans les quantités
|
62 |
+
var regex = new RegExp(/[0-9]+/);
|
63 |
+
var regex_p = new RegExp(/\+/);
|
64 |
+
var val = choix[i].value;
|
65 |
+
if (isNaN(choix[i].value) == true || val.match(regex) == null || val.match(regex_p)){
|
66 |
+
qty_carac = true;
|
67 |
+
//choix[i].value = null; // effacer le caractère saisie
|
68 |
+
}
|
69 |
+
// si la quantité saisie est supérieur à la quantité en stock, on ajoute le produit à la liste des erreurs
|
70 |
+
if (parseInt(choix[i].value) > parseInt(qty)){
|
71 |
+
error = true;
|
72 |
+
var name = document.getElementById('name_'+choix[i].id).value;
|
73 |
+
msg += "- "+name+" ("+qty+" dispo.)<br />";
|
74 |
+
}
|
75 |
+
// si une des quantités est supérieur de 0 on n'affiche pas le warning
|
76 |
+
if (parseInt(choix[i].value) > 0){
|
77 |
+
qty_zero = false;
|
78 |
+
}
|
79 |
+
// si une des quantités est inférieur à 0 on affiche le warning
|
80 |
+
if (parseInt(choix[i].value) < 0){
|
81 |
+
qty_negat = true;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
// si une quantité saisie supérieur détectée, on affiche une erreur
|
87 |
+
if (error == true){
|
88 |
+
var my_div = document.createElement('div');
|
89 |
+
my_div.className = "error-msg";
|
90 |
+
my_div.innerHTML = msg;
|
91 |
+
$('xpress_err').appendChild(my_div);
|
92 |
+
}
|
93 |
+
// si toutes les quantités sont à 0 on affiche un warning
|
94 |
+
if(qty_zero == true && qty_negat == false || qty_vide == true){
|
95 |
+
var my_div = document.createElement('div');
|
96 |
+
my_div.className = "notice-msg";
|
97 |
+
my_div.innerHTML = "<?php echo $this->__('Specify product\'s quantity') ?>";
|
98 |
+
$('xpress_err').appendChild(my_div);
|
99 |
+
}
|
100 |
+
// si des lettres sans saisies dans les quantités on affiche un warning
|
101 |
+
if(qty_carac == true || qty_negat == true){
|
102 |
+
var my_div = document.createElement('div');
|
103 |
+
my_div.className = "notice-msg";
|
104 |
+
my_div.innerHTML = "<?php echo $this->__('No character in quantities') ?>";
|
105 |
+
$('xpress_err').appendChild(my_div);
|
106 |
+
}
|
107 |
+
// si il y a une erreur on affiche un warning à afficher
|
108 |
+
if (error == true || qty_zero == true || qty_vide == true || qty_carac == true || qty_negat == true){
|
109 |
+
$('xpress_err').show();
|
110 |
+
$('xpress_title').focus();
|
111 |
+
var top = $('bloc_xpress').offsetTop;
|
112 |
+
window.scrollTo(0,top);
|
113 |
+
// sinon, on envoi le formulaire
|
114 |
+
}else{
|
115 |
+
document.getElementById('cmdxpress_addtocart_form').submit()
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
//]]>
|
122 |
+
</script>
|
123 |
+
|
124 |
+
<div class="block block-xpress" id="bloc_xpress">
|
125 |
+
<div class="block-title" id="xpress_title">
|
126 |
+
<strong><span><?php echo $this->__('Express Command') ?></span></strong>
|
127 |
+
</div>
|
128 |
+
<div id="xpress_err" style="display:none;"></div>
|
129 |
+
<div class="block-content">
|
130 |
+
<p class="block-subtitle"><?php echo $this->__('Command List') ?> :</p>
|
131 |
+
<p class="block-subtitle">
|
132 |
+
<select onchange="javascript:loadProducts(this.value);">
|
133 |
+
<option value="-1"> --- </option>
|
134 |
+
<?php echo $this->getListe(); ?>
|
135 |
+
</select>
|
136 |
+
</p>
|
137 |
+
<br />
|
138 |
+
<div id="xpress_products"></div>
|
139 |
+
</div>
|
140 |
+
</div>
|
app/design/frontend/base/default/template/atol_cmdxpress/listexpress.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product view template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_View
|
6 |
+
* @see Mage_Review_Block_Product_View
|
7 |
+
* @see Atol_Cmdxpress_Block_Listeproduits
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php
|
12 |
+
if ($_GET['id'] > 0):
|
13 |
+
|
14 |
+
$_parent = $this->getProductById($_GET['id']);
|
15 |
+
$_helper = $this->helper('catalog/output');
|
16 |
+
?>
|
17 |
+
|
18 |
+
<form id="cmdxpress_addtocart_form" method="post" action="<?php echo $this->getAddToCartUrl($_parent) ?>" >
|
19 |
+
<?php echo $this->getRequest()->getPost('id'); ?>
|
20 |
+
<?php $_items = $this->getChildenProducts($_parent); ?>
|
21 |
+
<?php if(count($_items)): ?>
|
22 |
+
<ol id="list-cmdxpress" class="mini-products-list">
|
23 |
+
<?php foreach($_items as $_item): ?>
|
24 |
+
<li class="item last odd">
|
25 |
+
<a class="product-image" href="<?php echo $_item->getProductUrl(); ?>" ><img height="50" width="50" alt="<?php echo $_item->getName(); ?>" title="<?php echo $_item->getName(); ?>" src="<?php echo $_item->getThumbnailUrl(50, 50); ?>" /></a>
|
26 |
+
<div class="product-details">
|
27 |
+
<p class="product-name"><a href="<?php echo $_item->getProductUrl(); ?>" ><?php echo $_item->getName(); ?></a></p>
|
28 |
+
<?php
|
29 |
+
$_Price = $_item->getPrice();
|
30 |
+
$_finalPrice = $_item->getFinalPrice();
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php if ($_item->isAvailable()): ?>
|
34 |
+
<input type="text" id="choix_<?php echo $_item->getId(); ?>" class="input-text qty" title="Quantité" value="0" maxlength="12" name="super_group[<?php echo $_item->getId(); ?>]"> x
|
35 |
+
(<?php echo (int)$_item->getStockItem()->getQty(); ?> Max.)
|
36 |
+
<input type="hidden" name="" id="qty_choix_<?php echo $_item->getId(); ?>" value="<?php echo (int)$_item->getStockItem()->getQty(); ?>" />
|
37 |
+
<input type="hidden" name="" id="name_choix_<?php echo $_item->getId(); ?>" value="<?php echo $_item->getName(); ?>" />
|
38 |
+
<?php else: ?>
|
39 |
+
<div class="availability out-of-stock"><span>(<?php echo $this->__('Out of stock'); ?>)</span></div>
|
40 |
+
<?php endif; ?>
|
41 |
+
<span class="price">
|
42 |
+
<?php if ($_Price === $_finalPrice) :?>
|
43 |
+
<?php echo Mage::helper('checkout')->formatPrice($_Price); ?>
|
44 |
+
<?php else: ?>
|
45 |
+
<s><?php echo Mage::helper('checkout')->formatPrice($_Price); ?></s> <?php echo Mage::helper('checkout')->formatPrice($_finalPrice); ?>
|
46 |
+
<?php endif; ?>
|
47 |
+
</span>
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
</ol>
|
52 |
+
<script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
|
53 |
+
|
54 |
+
<div class="actions">
|
55 |
+
<button onclick="javascript:verifQty();" class="button btn-cart" title="<?php echo $this->__('Add to Cart') ?>" type="button"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<?php else: ?>
|
59 |
+
<p class="empty">
|
60 |
+
<img src="<?php echo Mage::getBaseUrl ('skin').'frontend/default/blank/images/i_msg-error.gif'; ?>" />
|
61 |
+
<?php echo $this->__('There is no items in this package') ?>
|
62 |
+
</p>
|
63 |
+
<?php endif ?>
|
64 |
+
</form>
|
65 |
+
<?php endif ?>
|
app/locale/en_US/Atol_Cmdxpress.csv
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Express Command","Express Command"
|
2 |
+
"Command List","Command List"
|
3 |
+
"There is no items in this package","There is no items in this package"
|
4 |
+
"Too high quantity for","Too high quantity for"
|
5 |
+
"Specify product's quantity","Specify product's quantity"
|
6 |
+
"No character in quantities","No character in quantities"
|
app/locale/fr_FR/Atol_Cmdxpress.csv
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Express Command","Commande Express"
|
2 |
+
"Command List","Liste des commandes"
|
3 |
+
"There is no items in this package","Package vide"
|
4 |
+
"Too high quantity for","Quantité trop élevée pour"
|
5 |
+
"Specify product's quantity","Spécifiez la quantité des produits"
|
6 |
+
"No character in quantities","Pas de caractère dans les quantités"
|
package.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>ATOL_Commande_Express</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>GNU General Public License (GPL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Cette extension permet d'ajouter des produits au panier avec un minimum de clics. (Basé sur les produits groupés)</summary>
|
10 |
+
<description>La mise en avant des articles constitue le défi quotidien des magasins et grandes surfaces. Il en
|
11 |
+
va de même pour les boutiques en ligne. La multiplication des chargements de pages a souvent
|
12 |
+
raison de la patience des clients les plus téméraires. La tendance actuelle est donc logiquement à
|
13 |
+
la réduction du nombre de clics pour la composition d'un panier.
|
14 |
+
Les méthodes sont nombreuses pour mettre en avant les articles et faciliter les achats rapides.
|
15 |
+
Néanmoins, cela nécessite bien souvent un travail important d'administration et de présentation.
|
16 |
+
Le module « Commande Express » est né de ce constat et son objectif est alors de permettre
|
17 |
+
aux utilisateurs de réaliser leurs commandes le plus rapidement possible à l'aide de
|
18 |
+
regroupements thématiques des produits. </description>
|
19 |
+
<notes>Commande Express</notes>
|
20 |
+
<authors><author><name>Atol C</name><user>atolcd</user><email>magento@atolcd.com</email></author></authors>
|
21 |
+
<date>2011-09-19</date>
|
22 |
+
<time>11:14:01</time>
|
23 |
+
<contents><target name="magelocal"><dir name="Atol"><dir name="Cmdxpress"><dir><dir name="Block"><file name="Listeproduits.php" hash="d117bb15b228a5f38baa3972214d8f63"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Atol"><dir name="Cmdxpress"><dir><dir name="controllers"><file name="IndexController.php" hash="0f7f1175abf0ab6c47a44caebfcc8e14"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Atol"><dir name="Cmdxpress"><dir><dir name="controllers"><file name="ListeController.php" hash="611e12cc35fac2a800d61541d1ead032"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Atol"><dir name="Cmdxpress"><dir><dir name="etc"><file name="config.xml" hash="a9ed89681ad88a73d5163b8a8f4cc41c"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Atol"><dir name="Cmdxpress"><dir><dir name="sql"><dir name="cmdxpress_setup"><file name="mysql4-install-0.1.0.php" hash="7b9e06ba4682227c6c82d52ae423d03a"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Atol_Cmdxpress.csv" hash="584c09a30c2f379e12453c0bfe1d9d91"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Atol_Cmdxpress.csv" hash="29f05a77058949906f702a22f3ca33ba"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="atol_cmdxpress"><file name="cmdxpress_block.phtml" hash="7a99ebe837d17df64a4a38ed82d79b5e"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="atol_cmdxpress"><file name="listexpress.phtml" hash="3c5e68a72708a734ec0a3c1bde274789"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cmdxpress.xml" hash="ea08deca0d337f5d36224ad93615d962"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="."><file name="Atol_Cmdxpress.xml"/></dir></target></contents>
|
24 |
+
<compatible/>
|
25 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required><required><package><name></name><channel>connect.magentocommerce.com/core</channel><min></min><max></max></package></required><required><extension><name>PDO</name><min></min><max></max></extension></required></dependencies>
|
26 |
+
</package>
|