Version Notes
second official commit
Download this release
Release Info
Developer | FIA-NET |
Extension | Fianet_Core |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 0.9.0 to 1.0.1
- app/code/community/Fianet/Core/Block/{Category/Typeproduct → Adminhtml/Category/ProductType}/Edit.php +53 -61
- app/code/community/Fianet/Core/Block/{Category/Typeproduct → Adminhtml/Category/ProductType}/Edit/Form.php +69 -69
- app/code/community/Fianet/Core/Block/{Configuration.php → Adminhtml/Configuration.php} +4 -4
- app/code/community/Fianet/Core/Block/{Configuration → Adminhtml/Configuration}/Content.php +3 -3
- app/code/community/Fianet/Core/Block/{Configuration → Adminhtml/Configuration}/Edit/Form.php +3 -3
- app/code/community/Fianet/Core/Block/{Configuration → Adminhtml/Configuration}/Tab.php +4 -4
- app/code/community/Fianet/Core/Block/{Fianetadmin.php → Adminhtml/Fianetadmin.php} +27 -31
- app/code/community/Fianet/Core/Block/{Fianetadmingrid.php → Adminhtml/Fianetadmingrid.php} +27 -28
- app/code/community/Fianet/Core/Block/{Log → Adminhtml/Log}/Grid.php +70 -69
- app/code/community/Fianet/Core/Block/Adminhtml/Sales/Order/Grid.php +62 -0
- app/code/community/Fianet/Core/Block/{Store → Adminhtml/Store}/Switcher.php +101 -101
- app/code/community/Fianet/Core/Block/{Tree → Adminhtml/Tree}/Abstract.php +76 -91
- app/code/community/Fianet/Core/Block/Adminhtml/Tree/ProductType.php +43 -0
- app/code/community/Fianet/Core/Block/{Tree/TypeProduct.php → Adminhtml/Tree/Products.php} +42 -45
- app/code/community/Fianet/Core/Block/{Widget → Adminhtml/Widget}/Grid/Column/Filter/Fianet.php +24 -24
- app/code/community/Fianet/Core/Block/Adminhtml/Widget/Grid/Column/Renderer/Fianet.php +412 -0
- app/code/community/Fianet/Core/Block/Sales/Order/Grid.php +0 -75
- app/code/community/Fianet/Core/Block/Widget/Grid/Column/Renderer/Fianet.php +0 -218
- app/code/community/Fianet/Core/Controller/Tree/Abstract.php +4 -10
- app/code/community/Fianet/Core/Controller/Tree/{TypeProduct.php → ProductType.php} +7 -10
- app/code/community/Fianet/Core/Helper/Data.php +57 -31
- app/code/community/Fianet/Core/Model/Carrier/Abstract.php +2 -2
- app/code/community/Fianet/Core/Model/Catproduct/Association.php +29 -29
- app/code/community/Fianet/Core/Model/Configuration.php +3 -3
- app/code/community/Fianet/Core/Model/Configuration/Global.php +2 -2
- app/code/community/Fianet/Core/Model/Configuration/Value.php +2 -2
- app/code/community/Fianet/Core/Model/Fianet/EncodingKey.php +19 -14
- app/code/community/Fianet/Core/Model/Fianet/Hash32bits.php +223 -208
- app/code/community/Fianet/Core/Model/Fianet/Hash64bits.php +238 -219
- app/code/community/Fianet/Core/Model/Fianet/Order/Address/Base.php +60 -0
- app/code/community/Fianet/Core/Model/Fianet/Order/{Adress → Address}/Billing.php +24 -24
- app/code/community/Fianet/Core/Model/Fianet/Order/{Adress → Address}/Delivery.php +24 -24
- app/code/community/Fianet/Core/Model/Fianet/Order/Adress/Base.php +0 -64
- app/code/community/Fianet/Core/Model/Fianet/Order/Info/Productlist.php +52 -55
- app/code/community/Fianet/Core/Model/Fianet/Order/Info/{ProductList → Productlist}/Product.php +55 -58
- app/code/community/Fianet/Core/Model/Fianet/Order/Info/Rnp.php +0 -53
- app/code/community/Fianet/Core/Model/Fianet/Order/Info/Sac.php +0 -59
- app/code/community/Fianet/Core/Model/Fianet/Order/Info/Transport.php +45 -49
- app/code/community/Fianet/Core/Model/Fianet/Order/Optionpayment.php +3 -3
- app/code/community/Fianet/Core/Model/Fianet/Order/Payment.php +10 -10
- app/code/community/Fianet/Core/Model/Fianet/Order/Rnp.php +0 -313
- app/code/community/Fianet/Core/Model/Fianet/Order/Sac.php +0 -191
- app/code/community/Fianet/Core/Model/Fianet/Order/User/Base.php +77 -83
- app/code/community/Fianet/Core/Model/Fianet/Order/User/Billing.php +23 -23
- app/code/community/Fianet/Core/Model/Fianet/Order/User/Delivery.php +24 -24
- app/code/community/Fianet/Core/Model/Fianet/Order/User/Siteconso.php +3 -3
- app/code/community/Fianet/Core/Model/Fianet/Order/Wallet.php +57 -67
- app/code/community/Fianet/Core/Model/Fianet/Paramcallback/Builder.php +11 -15
- app/code/community/Fianet/Core/Model/Fianet/Paramcallback/Element.php +3 -3
- app/code/community/Fianet/Core/Model/Fianet/Parser.php +152 -156
- app/code/community/Fianet/Core/Model/Fianet/Sender.php +80 -151
- app/code/community/Fianet/Core/Model/Functions.php +219 -239
- app/code/community/Fianet/Core/Model/Log.php +31 -32
- app/code/community/Fianet/Core/Model/MageConfiguration.php +39 -36
- app/code/community/Fianet/Core/Model/Mysql4/Abstract.php +58 -63
- app/code/community/Fianet/Core/Model/Mysql4/Catproduct/Association.php +23 -23
- app/code/community/Fianet/Core/Model/Mysql4/Catproduct/Association/Collection.php +33 -33
- app/code/community/Fianet/Core/Model/Mysql4/Configuration.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Configuration/Collection.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Configuration/Global.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Configuration/Value.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Configuration/Value/Collection.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Log.php +23 -23
- app/code/community/Fianet/Core/Model/Mysql4/Log/Collection.php +24 -24
- app/code/community/Fianet/Core/Model/Mysql4/Scope/Abstract.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Setup.php +2 -2
- app/code/community/Fianet/Core/Model/Mysql4/Shipping/Association.php +23 -23
- app/code/community/Fianet/Core/Model/Mysql4/Shipping/Association/Collection.php +2 -2
- app/code/community/Fianet/Core/Model/Product.php +51 -52
- app/code/community/Fianet/Core/Model/Scope/Abstract.php +2 -2
- app/code/community/Fianet/Core/Model/Shipping/Association.php +24 -24
- app/code/community/Fianet/Core/Model/Source/{ModeAction.php → Charset.php} +27 -27
- app/code/community/Fianet/Core/Model/Source/Crypt.php +27 -0
- app/code/community/Fianet/Core/Model/Source/DeliveryTimes.php +26 -26
- app/code/community/Fianet/Core/Model/Source/Mode.php +30 -0
- app/code/community/Fianet/Core/Model/Source/PaymentType.php +3 -3
- app/code/community/Fianet/Core/Model/Source/ProductType.php +43 -43
- app/code/community/Fianet/Core/Model/Source/ShippingType.php +29 -29
- app/code/community/Fianet/Core/Model/Source/TypeProduct.php +0 -44
- app/code/community/Fianet/Core/controllers/{Category/TypeproductController.php → Adminhtml/Category/ProductTypeController.php} +172 -181
- app/code/community/Fianet/Core/controllers/{ConfigurationController.php → Adminhtml/ConfigurationController.php} +5 -5
- app/code/community/Fianet/Core/controllers/{LogController.php → Adminhtml/LogController.php} +81 -84
- app/code/community/Fianet/Core/controllers/Adminhtml/OrderController.php +76 -0
- app/code/community/Fianet/Core/controllers/{ShippingController.php → Adminhtml/ShippingController.php} +57 -61
- app/code/community/Fianet/Core/etc/adminhtml.xml +76 -0
- app/code/community/Fianet/Core/etc/config.xml +9 -60
- app/code/community/Fianet/Core/sql/fianet_setup/mysql4-install-0.2.1.php +2 -2
- app/code/community/Fianet/Core/sql/fianet_setup/mysql4-upgrade-0.2.1-0.2.2.php +2 -2
- app/code/community/Fianet/Core/sql/fianet_setup/mysql4-upgrade-0.2.2-0.5.7.php +8 -12
- app/code/community/Fianet/Core/sql/fianet_setup/mysql4-upgrade-0.9.0-1.0.0.php +31 -0
- app/design/adminhtml/default/default/layout/fianet.xml +17 -18
- app/design/adminhtml/default/default/template/fianet/common/categoriestree.phtml +2 -2
- app/design/adminhtml/default/default/template/fianet/common/categorytreeformcontenair.phtml +2 -2
- app/design/adminhtml/default/default/template/fianet/common/catproduct.phtml +2 -2
- app/design/adminhtml/default/default/template/fianet/common/shipping.phtml +2 -2
- app/design/adminhtml/default/default/template/fianet/common/storeswitcher.phtml +2 -2
- app/design/adminhtml/default/default/template/fianet/common/test.php +5 -5
- app/etc/modules/{ZFianet_Core.xml → Fianet_Core.xml} +3 -3
- app/locale/fr_FR/Fianet_Core.csv +4 -3
- package.xml +5 -5
- skin/adminhtml/default/default/images/fianet/CE_picto_orange.gif +0 -0
- skin/adminhtml/default/default/images/fianet/CE_picto_rouge.gif +0 -0
- skin/adminhtml/default/default/images/fianet/CE_picto_vert.gif +0 -0
app/code/community/Fianet/Core/Block/{Category/Typeproduct → Adminhtml/Category/ProductType}/Edit.php
RENAMED
@@ -1,61 +1,53 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
parent::__construct();
|
22 |
-
$this->_objectId = 'id';
|
23 |
-
$this->_controller = '
|
24 |
-
$this->_mode = 'edit';
|
25 |
-
$this->_blockGroup = 'fianet';
|
26 |
-
|
27 |
-
$this->_updateButton('save', 'label', $this->__('Save'));
|
28 |
-
$this->_updateButton('save', 'url', $this->getSaveUrl());
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getSaveUrl() {
|
57 |
-
$storeId = $this->getRequest()->getParam('store', 0);
|
58 |
-
//return $this->getUrl('*/*/delete', array($this->_objectId => $this->getRequest()->getParam($this->_objectId), 'store' => $storeId));
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Category_ProductType_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
parent::__construct();
|
22 |
+
$this->_objectId = 'id';
|
23 |
+
$this->_controller = 'adminhtml_category_productType';
|
24 |
+
$this->_mode = 'edit';
|
25 |
+
$this->_blockGroup = 'fianet';
|
26 |
+
|
27 |
+
$this->_updateButton('save', 'label', $this->__('Save'));
|
28 |
+
$this->_updateButton('save', 'url', $this->getSaveUrl());
|
29 |
+
|
30 |
+
$categoryId = (int) $this->getRequest()->getParam('id');
|
31 |
+
|
32 |
+
if ($categoryId > 0) {
|
33 |
+
$productType = Mage::getModel('fianet/catproduct_association')->loadByCategoryId($categoryId);
|
34 |
+
if ($productType->getId() == 0) {
|
35 |
+
$this->_removeButton('delete');
|
36 |
+
}
|
37 |
+
} else {
|
38 |
+
$this->_removeButton('save');
|
39 |
+
}
|
40 |
+
$this->_removeButton('reset');
|
41 |
+
}
|
42 |
+
|
43 |
+
public function getHeaderText() {
|
44 |
+
$categoryId = (int) $this->getRequest()->getParam('id');
|
45 |
+
|
46 |
+
if ($categoryId <= 0) {
|
47 |
+
return Mage::helper('fianet')->__('Categories configuration');
|
48 |
+
}
|
49 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
50 |
+
return Mage::helper('fianet')->__("Categorie's %s configuration", $category->getName());
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Block/{Category/Typeproduct → Adminhtml/Category/ProductType}/Edit/Form.php
RENAMED
@@ -1,70 +1,70 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
protected function _prepareForm() {
|
21 |
-
$form = new Varien_Data_Form(
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
);
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$fieldset
|
40 |
-
|
41 |
-
'
|
42 |
-
'
|
43 |
-
|
44 |
-
|
45 |
-
$fieldset->addField('id', 'hidden', array(
|
46 |
-
'required' => true,
|
47 |
-
'name' => 'id',
|
48 |
-
'value' => $categoryId,
|
49 |
-
));
|
50 |
-
|
51 |
-
$fieldset->addField('
|
52 |
-
'label' => Mage::Helper('fianet')->__('Product type'),
|
53 |
-
'class' => 'required-entry',
|
54 |
-
'required' => true,
|
55 |
-
'name' => '
|
56 |
-
'value' => $
|
57 |
-
'values' => Mage::getModel('fianet/
|
58 |
-
));
|
59 |
-
|
60 |
-
|
61 |
-
'
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
$form->setUseContainer(true);
|
66 |
-
$this->setForm($form);
|
67 |
-
return parent::_prepareForm();
|
68 |
-
}
|
69 |
-
|
70 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Category_ProductType_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
|
19 |
+
|
20 |
+
protected function _prepareForm() {
|
21 |
+
$form = new Varien_Data_Form(array(
|
22 |
+
'id' => 'edit_form',
|
23 |
+
'action' => $this->getUrl('*/*/save'),
|
24 |
+
'method' => 'post',
|
25 |
+
'enctype' => 'multipart/form-data'
|
26 |
+
));
|
27 |
+
|
28 |
+
$categoryId = (int) $this->getRequest()->getParam('id');
|
29 |
+
|
30 |
+
if ($categoryId <= 0) {
|
31 |
+
return parent::_prepareForm();
|
32 |
+
}
|
33 |
+
|
34 |
+
$productType = Mage::getModel('fianet/catproduct_association')->loadByCategoryId($categoryId);
|
35 |
+
$storeId = (int) $this->getRequest()->getParam('store');
|
36 |
+
|
37 |
+
$fieldset = $form->addFieldset('fianet_form', array('legend' => Mage::helper('fianet')->__('Categories configuration')));
|
38 |
+
|
39 |
+
$fieldset->addField('storeId', 'hidden', array(
|
40 |
+
'required' => true,
|
41 |
+
'name' => 'storeId',
|
42 |
+
'value' => $storeId,
|
43 |
+
));
|
44 |
+
|
45 |
+
$fieldset->addField('id', 'hidden', array(
|
46 |
+
'required' => true,
|
47 |
+
'name' => 'id',
|
48 |
+
'value' => $categoryId,
|
49 |
+
));
|
50 |
+
|
51 |
+
$fieldset->addField('productType', 'select', array(
|
52 |
+
'label' => Mage::Helper('fianet')->__('Product type'),
|
53 |
+
'class' => 'required-entry',
|
54 |
+
'required' => true,
|
55 |
+
'name' => 'productType',
|
56 |
+
'value' => $productType->getFianet_product_type(),
|
57 |
+
'values' => Mage::getModel('fianet/source_productType')->toOptionArray()
|
58 |
+
));
|
59 |
+
|
60 |
+
$fieldset->addField('applysubcat', 'checkbox', array(
|
61 |
+
'label' => Mage::Helper('fianet')->__('Apply to sub-categories'),
|
62 |
+
'name' => 'applysubcat'
|
63 |
+
));
|
64 |
+
|
65 |
+
$form->setUseContainer(true);
|
66 |
+
$this->setForm($form);
|
67 |
+
return parent::_prepareForm();
|
68 |
+
}
|
69 |
+
|
70 |
}
|
app/code/community/Fianet/Core/Block/{Configuration.php → Adminhtml/Configuration.php}
RENAMED
@@ -10,12 +10,12 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
public function __construct() {
|
21 |
parent::__construct();
|
@@ -23,7 +23,7 @@ class Fianet_Core_Block_Configuration extends Mage_Adminhtml_Block_Widget_Form_C
|
|
23 |
$this->_objectId = 'id';
|
24 |
|
25 |
$this->_blockGroup = 'fianet';
|
26 |
-
$this->_controller = '
|
27 |
$this->_mode = 'edit';
|
28 |
|
29 |
$this->_updateButton('save', 'label', $this->__('Save'));
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Configuration extends Mage_Adminhtml_Block_Widget_Form_Container {
|
19 |
|
20 |
public function __construct() {
|
21 |
parent::__construct();
|
23 |
$this->_objectId = 'id';
|
24 |
|
25 |
$this->_blockGroup = 'fianet';
|
26 |
+
$this->_controller = 'adminhtml_configuration';
|
27 |
$this->_mode = 'edit';
|
28 |
|
29 |
$this->_updateButton('save', 'label', $this->__('Save'));
|
app/code/community/Fianet/Core/Block/{Configuration → Adminhtml/Configuration}/Content.php
RENAMED
@@ -10,12 +10,12 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
protected function _prepareForm() {
|
21 |
$storeId = $this->getRequest()->getParam('store', 0);
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Configuration_Content extends Mage_Adminhtml_Block_Widget_Form {
|
19 |
|
20 |
protected function _prepareForm() {
|
21 |
$storeId = $this->getRequest()->getParam('store', 0);
|
app/code/community/Fianet/Core/Block/{Configuration → Adminhtml/Configuration}/Edit/Form.php
RENAMED
@@ -10,12 +10,12 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
protected function _prepareForm() {
|
21 |
$form = new Varien_Data_Form(array(
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Configuration_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
|
19 |
|
20 |
protected function _prepareForm() {
|
21 |
$form = new Varien_Data_Form(array(
|
app/code/community/Fianet/Core/Block/{Configuration → Adminhtml/Configuration}/Tab.php
RENAMED
@@ -10,12 +10,12 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
public function __construct() {
|
21 |
parent::__construct();
|
@@ -44,7 +44,7 @@ class Fianet_Core_Block_Configuration_Tab extends Mage_Adminhtml_Block_Widget_Ta
|
|
44 |
$Configuration = Mage::getModel('fianet/configuration')
|
45 |
->getCollection()
|
46 |
->setOrder('sort', 'asc');
|
47 |
-
$genericBlock = $this->getLayout()->createBlock('fianet/
|
48 |
->setData('configuration', $Configuration)
|
49 |
->setData('advanced', '0');
|
50 |
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Configuration_Tab extends Mage_Adminhtml_Block_Widget_Tabs {
|
19 |
|
20 |
public function __construct() {
|
21 |
parent::__construct();
|
44 |
$Configuration = Mage::getModel('fianet/configuration')
|
45 |
->getCollection()
|
46 |
->setOrder('sort', 'asc');
|
47 |
+
$genericBlock = $this->getLayout()->createBlock('fianet/adminhtml_configuration_content')
|
48 |
->setData('configuration', $Configuration)
|
49 |
->setData('advanced', '0');
|
50 |
|
app/code/community/Fianet/Core/Block/{Fianetadmin.php → Adminhtml/Fianetadmin.php}
RENAMED
@@ -1,31 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
return $this->getData('fianet');
|
29 |
-
}
|
30 |
-
|
31 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_FianetAdmin extends Mage_Adminhtml_Block_Template {
|
19 |
+
|
20 |
+
public function getFianet() {
|
21 |
+
if (!$this->hasData('fianet')) {
|
22 |
+
$this->setData('fianet', Mage::registry('fianet'));
|
23 |
+
}
|
24 |
+
return $this->getData('fianet');
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Block/{Fianetadmingrid.php → Adminhtml/Fianetadmingrid.php}
RENAMED
@@ -1,28 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->_controller = '
|
22 |
-
$this->_blockGroup = 'fianet';
|
23 |
-
$this->_headerText = Mage::helper('fianet')->__('Log');
|
24 |
-
$this->setTemplate('widget/grid/container.phtml');
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Fianetadmingrid extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->_controller = 'adminhtml_log';
|
22 |
+
$this->_blockGroup = 'fianet';
|
23 |
+
$this->_headerText = Mage::helper('fianet')->__('Log');
|
24 |
+
$this->setTemplate('widget/grid/container.phtml');
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
|
app/code/community/Fianet/Core/Block/{Log → Adminhtml/Log}/Grid.php
RENAMED
@@ -1,69 +1,70 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
parent::__construct();
|
22 |
-
$this->setId('fianetGrid');
|
23 |
-
$this->setDefaultSort('date');
|
24 |
-
$this->setDefaultDir('DESC');
|
25 |
-
$this->setSaveParametersInSession(true);
|
26 |
-
}
|
27 |
-
|
28 |
-
protected function _prepareCollection() {
|
29 |
-
$collection = Mage::getModel('fianet/log')->getCollection();
|
30 |
-
$this->setCollection($collection);
|
31 |
-
return parent::_prepareCollection();
|
32 |
-
}
|
33 |
-
|
34 |
-
protected function _prepareColumns() {
|
35 |
-
$this->addColumn('date', array(
|
36 |
-
'header' => Mage::helper('fianet')->__('Date'),
|
37 |
-
'align' => 'left',
|
38 |
-
'index' => 'date',
|
39 |
-
'type' => 'datetime',
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
'
|
45 |
-
'
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$this->
|
56 |
-
|
57 |
-
|
58 |
-
'
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Log_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
parent::__construct();
|
22 |
+
$this->setId('fianetGrid');
|
23 |
+
$this->setDefaultSort('date');
|
24 |
+
$this->setDefaultDir('DESC');
|
25 |
+
$this->setSaveParametersInSession(true);
|
26 |
+
}
|
27 |
+
|
28 |
+
protected function _prepareCollection() {
|
29 |
+
$collection = Mage::getModel('fianet/log')->getCollection();
|
30 |
+
$this->setCollection($collection);
|
31 |
+
return parent::_prepareCollection();
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function _prepareColumns() {
|
35 |
+
$this->addColumn('date', array(
|
36 |
+
'header' => Mage::helper('fianet')->__('Date'),
|
37 |
+
'align' => 'left',
|
38 |
+
'index' => 'date',
|
39 |
+
'type' => 'datetime',
|
40 |
+
'width' => '125px'
|
41 |
+
));
|
42 |
+
|
43 |
+
$this->addColumn('message', array(
|
44 |
+
'header' => Mage::helper('fianet')->__('Message'),
|
45 |
+
'align' => 'left',
|
46 |
+
'index' => 'message',
|
47 |
+
));
|
48 |
+
|
49 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('fianet')->__('CSV'));
|
50 |
+
$this->addExportType('*/*/exportXml', Mage::helper('fianet')->__('XML'));
|
51 |
+
return parent::_prepareColumns();
|
52 |
+
}
|
53 |
+
|
54 |
+
protected function _prepareMassaction() {
|
55 |
+
$this->setMassactionIdField('id');
|
56 |
+
$this->getMassactionBlock()->setFormFieldName('logform');
|
57 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
58 |
+
'label' => Mage::helper('fianet')->__('Delete'),
|
59 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
60 |
+
'confirm' => Mage::helper('fianet')->__('Are you sure ?')
|
61 |
+
));
|
62 |
+
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
public function getRowUrl($row) {
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
|
70 |
+
}
|
app/code/community/Fianet/Core/Block/Adminhtml/Sales/Order/Grid.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid {
|
19 |
+
|
20 |
+
protected function _prepareColumns() {
|
21 |
+
parent::_prepareColumns();
|
22 |
+
// if Certissim is installed
|
23 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Sac')) {
|
24 |
+
$this->addColumn('fianet', array(
|
25 |
+
'header' => 'FIA-NET',
|
26 |
+
'sortable' => false,
|
27 |
+
'type' => 'fianet',
|
28 |
+
'align' => 'center',
|
29 |
+
'width' => '120',
|
30 |
+
'renderer' => 'fianet/adminhtml_widget_grid_column_renderer_fianet',
|
31 |
+
'filter' => 'fianet/adminhtml_widget_grid_column_filter_fianet'
|
32 |
+
));
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _prepareMassaction() {
|
37 |
+
parent::_prepareMassaction();
|
38 |
+
|
39 |
+
// if Kwixo is installed
|
40 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Kwixo')) {
|
41 |
+
$this->getMassactionBlock()->addItem('transaction_state', array(
|
42 |
+
'label' => Mage::helper('kwixo')->__('KWIXO FIA-NET : get back transaction\'s state'),
|
43 |
+
'url' => $this->getUrl('fianet/adminhtml_order/getTransactionState'),
|
44 |
+
));
|
45 |
+
}
|
46 |
+
|
47 |
+
// if Certissim is installed
|
48 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Sac')) {
|
49 |
+
$this->getMassactionBlock()->addItem('sent_sac', array(
|
50 |
+
'label' => Mage::helper('sac')->__('Sent to CERTISSIM FIA-NET'),
|
51 |
+
'url' => $this->getUrl('fianet/adminhtml_order/sentSac'),
|
52 |
+
));
|
53 |
+
$this->getMassactionBlock()->addItem('get_eval', array(
|
54 |
+
'label' => Mage::helper('sac')->__('CERTISSIM FIA-NET : Get evaluations'),
|
55 |
+
'url' => $this->getUrl('fianet/adminhtml_order/getEvaluation'),
|
56 |
+
));
|
57 |
+
}
|
58 |
+
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Fianet/Core/Block/{Store → Adminhtml/Store}/Switcher.php
RENAMED
@@ -1,102 +1,102 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
protected $_storeIds;
|
21 |
-
|
22 |
-
public function __construct() {
|
23 |
-
parent::__construct();
|
24 |
-
$this->setTemplate('fianet/common/storeswitcher.phtml');
|
25 |
-
$this->setUseConfirm(true);
|
26 |
-
$this->setDefaultStoreName($this->Helper('fianet')->__('All Store'));
|
27 |
-
}
|
28 |
-
|
29 |
-
public function getWebsiteCollection() {
|
30 |
-
$collection = Mage::getModel('core/website')->getResourceCollection();
|
31 |
-
|
32 |
-
$websiteIds = $this->getWebsiteIds();
|
33 |
-
if (!is_null($websiteIds)) {
|
34 |
-
$collection->addIdFilter($this->getWebsiteIds());
|
35 |
-
}
|
36 |
-
|
37 |
-
return $collection->load();
|
38 |
-
}
|
39 |
-
|
40 |
-
public function getGroupCollection($website) {
|
41 |
-
if (!$website instanceof Mage_Core_Model_Website) {
|
42 |
-
$website = Mage::getModel('core/website')->load($website);
|
43 |
-
}
|
44 |
-
return $website->getGroupCollection();
|
45 |
-
}
|
46 |
-
|
47 |
-
public function getStoreCollection($group) {
|
48 |
-
if (!$group instanceof Mage_Core_Model_Store_Group) {
|
49 |
-
$group = Mage::getModel('core/store_group')->load($group);
|
50 |
-
}
|
51 |
-
$stores = $group->getStoreCollection();
|
52 |
-
if (!empty($this->_storeIds)) {
|
53 |
-
$stores->addIdFilter($this->_storeIds);
|
54 |
-
}
|
55 |
-
return $stores;
|
56 |
-
}
|
57 |
-
|
58 |
-
public function getSwitchUrl() {
|
59 |
-
if ($url = $this->getData('switch_url')) {
|
60 |
-
return $url;
|
61 |
-
}
|
62 |
-
return $this->getUrl('*/*/*', array('_current' => true, 'store' => null));
|
63 |
-
}
|
64 |
-
|
65 |
-
public function getStoreId() {
|
66 |
-
return $this->getRequest()->getParam('store');
|
67 |
-
}
|
68 |
-
|
69 |
-
public function setStoreIds($storeIds) {
|
70 |
-
$this->_storeIds = $storeIds;
|
71 |
-
return $this;
|
72 |
-
}
|
73 |
-
|
74 |
-
public function getDefaultStoreName() {
|
75 |
-
$scope =
|
76 |
-
$name = 'All';
|
77 |
-
switch ($scope) {
|
78 |
-
case('website_id'):
|
79 |
-
$name = 'All website';
|
80 |
-
break;
|
81 |
-
case('group_id'):
|
82 |
-
$name = 'All store';
|
83 |
-
break;
|
84 |
-
case('store_id'):
|
85 |
-
$name = 'All store view';
|
86 |
-
break;
|
87 |
-
}
|
88 |
-
return ($this->__($name));
|
89 |
-
}
|
90 |
-
|
91 |
-
public function isShow() {
|
92 |
-
return !Mage::app()->isSingleStoreMode();
|
93 |
-
}
|
94 |
-
|
95 |
-
protected function _toHtml() {
|
96 |
-
if (!Mage::app()->isSingleStoreMode()) {
|
97 |
-
return parent::_toHtml();
|
98 |
-
}
|
99 |
-
return '';
|
100 |
-
}
|
101 |
-
|
102 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Store_Switcher extends Mage_Adminhtml_Block_Template {
|
19 |
+
|
20 |
+
protected $_storeIds;
|
21 |
+
|
22 |
+
public function __construct() {
|
23 |
+
parent::__construct();
|
24 |
+
$this->setTemplate('fianet/common/storeswitcher.phtml');
|
25 |
+
$this->setUseConfirm(true);
|
26 |
+
$this->setDefaultStoreName($this->Helper('fianet')->__('All Store'));
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getWebsiteCollection() {
|
30 |
+
$collection = Mage::getModel('core/website')->getResourceCollection();
|
31 |
+
|
32 |
+
$websiteIds = $this->getWebsiteIds();
|
33 |
+
if (!is_null($websiteIds)) {
|
34 |
+
$collection->addIdFilter($this->getWebsiteIds());
|
35 |
+
}
|
36 |
+
|
37 |
+
return $collection->load();
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getGroupCollection($website) {
|
41 |
+
if (!$website instanceof Mage_Core_Model_Website) {
|
42 |
+
$website = Mage::getModel('core/website')->load($website);
|
43 |
+
}
|
44 |
+
return $website->getGroupCollection();
|
45 |
+
}
|
46 |
+
|
47 |
+
public function getStoreCollection($group) {
|
48 |
+
if (!$group instanceof Mage_Core_Model_Store_Group) {
|
49 |
+
$group = Mage::getModel('core/store_group')->load($group);
|
50 |
+
}
|
51 |
+
$stores = $group->getStoreCollection();
|
52 |
+
if (!empty($this->_storeIds)) {
|
53 |
+
$stores->addIdFilter($this->_storeIds);
|
54 |
+
}
|
55 |
+
return $stores;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getSwitchUrl() {
|
59 |
+
if (($url = $this->getData('switch_url'))) {
|
60 |
+
return $url;
|
61 |
+
}
|
62 |
+
return $this->getUrl('*/*/*', array('_current' => true, 'store' => null));
|
63 |
+
}
|
64 |
+
|
65 |
+
public function getStoreId() {
|
66 |
+
return $this->getRequest()->getParam('store');
|
67 |
+
}
|
68 |
+
|
69 |
+
public function setStoreIds($storeIds) {
|
70 |
+
$this->_storeIds = $storeIds;
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getDefaultStoreName() {
|
75 |
+
$scope = 'group_id';
|
76 |
+
$name = 'All';
|
77 |
+
switch ($scope) {
|
78 |
+
case('website_id'):
|
79 |
+
$name = 'All website';
|
80 |
+
break;
|
81 |
+
case('group_id'):
|
82 |
+
$name = 'All store';
|
83 |
+
break;
|
84 |
+
case('store_id'):
|
85 |
+
$name = 'All store view';
|
86 |
+
break;
|
87 |
+
}
|
88 |
+
return ($this->__($name));
|
89 |
+
}
|
90 |
+
|
91 |
+
public function isShow() {
|
92 |
+
return !Mage::app()->isSingleStoreMode();
|
93 |
+
}
|
94 |
+
|
95 |
+
protected function _toHtml() {
|
96 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
97 |
+
return parent::_toHtml();
|
98 |
+
}
|
99 |
+
return '';
|
100 |
+
}
|
101 |
+
|
102 |
}
|
app/code/community/Fianet/Core/Block/{Tree → Adminhtml/Tree}/Abstract.php
RENAMED
@@ -1,92 +1,77 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
parent::__construct();
|
22 |
-
$this->setTemplate('fianet/common/categoriestree.phtml');
|
23 |
-
$this->setUseAjax(true);
|
24 |
-
$this->_withProductCount = false;
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
return parent
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
$
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
if ($node->hasChildren()) {
|
78 |
-
$item['children'] = array();
|
79 |
-
if (!($this->getUseAjax() && $node->getLevel() > 1 && !$isParent)) {
|
80 |
-
foreach ($node->getChildren() as $child) {
|
81 |
-
$item['children'][] = $this->_getNodeJson($child, $level + 1);
|
82 |
-
}
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
if ($isParent || $node->getLevel() < 2) {
|
87 |
-
$item['expanded'] = true;
|
88 |
-
}
|
89 |
-
return $item;
|
90 |
-
}
|
91 |
-
|
92 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Tree_Abstract extends Mage_Adminhtml_Block_Catalog_Category_Tree {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
parent::__construct();
|
22 |
+
$this->setTemplate('fianet/common/categoriestree.phtml');
|
23 |
+
$this->setUseAjax(true);
|
24 |
+
$this->_withProductCount = false;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getSwitchTreeUrl() {
|
28 |
+
return $this->getUrl("*/*/tree", array('_current' => true, 'store' => null, '_query' => false, 'id' => null, 'parent' => null));
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getNodesUrl() {
|
32 |
+
return $this->getUrl('adminhtml/catalog_category/jsonTree');
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getEditUrl() {
|
36 |
+
return $this->getUrl('*/*/edit', array('_current' => true, '_query' => false, 'id' => null, 'parent' => null));
|
37 |
+
}
|
38 |
+
|
39 |
+
public function buildNodeName($node) {
|
40 |
+
$result = $this->htmlEscape($node->getName());
|
41 |
+
if ($this->_withProductCount) {
|
42 |
+
$result .= ' (' . $node->getProductCount() . ')';
|
43 |
+
}
|
44 |
+
return $result;
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _getNodeJson($node, $level = 0) {
|
48 |
+
$item = array();
|
49 |
+
$item['text'] = $this->buildNodeName($node);
|
50 |
+
//$rootForStores = in_array($node->getEntityId(), $this->getRootIds());
|
51 |
+
|
52 |
+
$item['id'] = $node->getId();
|
53 |
+
$item['cls'] = 'folder ' . ($node->getIsActive() ? 'active-category' : 'no-active-category');
|
54 |
+
$item['store'] = (int) $this->getStore()->getId();
|
55 |
+
$item['path'] = $node->getData('path');
|
56 |
+
$item['allowDrop'] = false;
|
57 |
+
$item['allowDrag'] = false;
|
58 |
+
if ((int) $node->getChildrenCount() > 0) {
|
59 |
+
$item['children'] = array();
|
60 |
+
}
|
61 |
+
$isParent = $this->_isParentSelectedCategory($node);
|
62 |
+
if ($node->hasChildren()) {
|
63 |
+
$item['children'] = array();
|
64 |
+
if (!($this->getUseAjax() && $node->getLevel() > 1 && !$isParent)) {
|
65 |
+
foreach ($node->getChildren() as $child) {
|
66 |
+
$item['children'][] = $this->_getNodeJson($child, $level + 1);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
if ($isParent || $node->getLevel() < 2) {
|
72 |
+
$item['expanded'] = true;
|
73 |
+
}
|
74 |
+
return $item;
|
75 |
+
}
|
76 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
app/code/community/Fianet/Core/Block/Adminhtml/Tree/ProductType.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Tree_ProductType extends Fianet_Core_Block_Adminhtml_Tree_Abstract {
|
19 |
+
|
20 |
+
protected function _getProductTypeLabel($productTypeId) {
|
21 |
+
$res = '';
|
22 |
+
$types = Mage::getModel('fianet/source_productType')->toOptionArray();
|
23 |
+
foreach ($types as $data) {
|
24 |
+
if ($data['value'] == $productTypeId) {
|
25 |
+
$res = $data['label'];
|
26 |
+
break;
|
27 |
+
}
|
28 |
+
}
|
29 |
+
return $res;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function buildNodeName($node) {
|
33 |
+
$result = $this->htmlEscape($node->getName());
|
34 |
+
|
35 |
+
$productType = Mage::getModel('fianet/catproduct_association')->loadByCategoryId($node->getEntityId());
|
36 |
+
if ($productType->getId() > 0) {
|
37 |
+
$result .= ' (' . Fianet_Core_Helper_Data::initials($this->_getProductTypeLabel($productType->getFianetProductType())) . ')';
|
38 |
+
}
|
39 |
+
|
40 |
+
return $result;
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
app/code/community/Fianet/Core/Block/{Tree/TypeProduct.php → Adminhtml/Tree/Products.php}
RENAMED
@@ -1,46 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
parent::__construct();
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
return $result;
|
44 |
-
}
|
45 |
-
|
46 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Tree_Products extends Fianet_Core_Block_Adminhtml_Tree_Abstract {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
parent::__construct();
|
22 |
+
$this->_withProductCount = true;
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function _getProductTypeLabel($productTypeId) {
|
26 |
+
$types = Mage::getModel('fianet/source_productType')->toOptionArray();
|
27 |
+
foreach ($types as $data) {
|
28 |
+
if ($data['value'] == $productTypeId) {
|
29 |
+
return ($data['label']);
|
30 |
+
}
|
31 |
+
}
|
32 |
+
return '';
|
33 |
+
}
|
34 |
+
|
35 |
+
public function buildNodeName($node) {
|
36 |
+
$result = $this->htmlEscape($node->getName());
|
37 |
+
if ($this->_withProductCount) {
|
38 |
+
$result .= ' (' . $node->getProductCount() . ')';
|
39 |
+
}
|
40 |
+
return $result;
|
41 |
+
}
|
42 |
+
|
|
|
|
|
|
|
43 |
}
|
app/code/community/Fianet/Core/Block/{Widget → Adminhtml/Widget}/Grid/Column/Filter/Fianet.php
RENAMED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function getHtml() {
|
21 |
-
$html = ' ';
|
22 |
-
return $html;
|
23 |
-
}
|
24 |
-
|
25 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Widget_Grid_Column_Filter_Fianet extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Abstract {
|
19 |
+
|
20 |
+
public function getHtml() {
|
21 |
+
$html = ' ';
|
22 |
+
return $html;
|
23 |
+
}
|
24 |
+
|
25 |
}
|
app/code/community/Fianet/Core/Block/Adminhtml/Widget/Grid/Column/Renderer/Fianet.php
ADDED
@@ -0,0 +1,412 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Block_Adminhtml_Widget_Grid_Column_Renderer_Fianet extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
19 |
+
|
20 |
+
public function render(Varien_Object $row) {
|
21 |
+
$html = '';
|
22 |
+
if ($row->status == 'pending_rnp') {
|
23 |
+
$html = '<img src="' . $this->getSkinUrl('images/fianet/RnP.gif') . '">';
|
24 |
+
}
|
25 |
+
// if Kwixo is installed
|
26 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Kwixo') && $row->getFianetRnpTag() != null) {
|
27 |
+
$html = $this->_renderKwx($row);
|
28 |
+
}
|
29 |
+
// if ReceiveAndPay is installed
|
30 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_ReceiveAndPay') && $row->getFianetRnpTag() != null) {
|
31 |
+
$html = $this->_renderRnP($row);
|
32 |
+
}
|
33 |
+
// if Cestissim is installed
|
34 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Sac') && $row->getFianetSacSent() != 0) {
|
35 |
+
$html = $this->_renderSac($row);
|
36 |
+
}
|
37 |
+
return ($html);
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function _renderSac(Varien_Object $row) {
|
41 |
+
// utilisable avec le module certissim
|
42 |
+
$evaluation = $row->getFianetSacEvaluation();
|
43 |
+
$reevaluation = $row->getFianetSacReevaluation();
|
44 |
+
$classementID = $row->getFianetSacClassementId();
|
45 |
+
$mode = $row->getFianetSacMode();
|
46 |
+
$html = '';
|
47 |
+
$icon = '';
|
48 |
+
$textCoEx = '';
|
49 |
+
$iconCoEx = '';
|
50 |
+
|
51 |
+
switch ($evaluation) {
|
52 |
+
case('error'):
|
53 |
+
$icon = 'attention.gif';
|
54 |
+
$alt = Mage::helper('fianet')->__('Error on transaction');
|
55 |
+
break;
|
56 |
+
case('100'):
|
57 |
+
$icon = 'rond_vert.gif';
|
58 |
+
$alt = Mage::helper('fianet')->__('Click for details');
|
59 |
+
break;
|
60 |
+
case('-1'):
|
61 |
+
$icon = 'rond_vertclair.gif';
|
62 |
+
$alt = Mage::helper('fianet')->__('Click for details');
|
63 |
+
break;
|
64 |
+
case('0'):
|
65 |
+
$icon = 'rond_rouge.gif';
|
66 |
+
$alt = Mage::helper('fianet')->__('Click for details');
|
67 |
+
break;
|
68 |
+
default:
|
69 |
+
$icon = 'fianet_SAC_icon.gif';
|
70 |
+
$alt = Mage::helper('fianet')->__('Evaluation in progress...');
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
switch ($reevaluation) {
|
74 |
+
case('100'):
|
75 |
+
$icon = 'rond_vert.gif';
|
76 |
+
$alt = Mage::helper('fianet')->__('Click for details');
|
77 |
+
break;
|
78 |
+
case('-1'):
|
79 |
+
$icon = 'rond_vertclair.gif';
|
80 |
+
$alt = Mage::helper('fianet')->__('Click for details');
|
81 |
+
break;
|
82 |
+
case('0'):
|
83 |
+
$icon = 'rond_rouge.gif';
|
84 |
+
$alt = Mage::helper('fianet')->__('Click for details');
|
85 |
+
break;
|
86 |
+
}
|
87 |
+
switch ($classementID) {
|
88 |
+
case('0'):
|
89 |
+
$textCoEx = "à traiter";
|
90 |
+
$iconCoEx = "CE_picto_rouge.gif";
|
91 |
+
break;
|
92 |
+
case('1'):
|
93 |
+
$textCoEx = "Contrôle visuel à réaliser";
|
94 |
+
$iconCoEx = "CE_picto_rouge.gif";
|
95 |
+
break;
|
96 |
+
case('2'):
|
97 |
+
$textCoEx = "Contrôle téléphonique à réaliser";
|
98 |
+
$iconCoEx = "CE_picto_rouge.gif";
|
99 |
+
break;
|
100 |
+
case('3'):
|
101 |
+
$textCoEx = "Demande de justificatifs à réaliser";
|
102 |
+
$iconCoEx = "CE_picto_rouge.gif";
|
103 |
+
break;
|
104 |
+
case('4'):
|
105 |
+
$textCoEx = "Traitement lourd à réaliser";
|
106 |
+
$iconCoEx = "CE_picto_rouge.gif";
|
107 |
+
break;
|
108 |
+
case('5'):
|
109 |
+
$textCoEx = "Contrôle visuel en cours";
|
110 |
+
$iconCoEx = "CE_picto_orange.gif";
|
111 |
+
break;
|
112 |
+
case('6'):
|
113 |
+
$textCoEx = "Contrôle téléphonique en cours";
|
114 |
+
$iconCoEx = "CE_picto_orange.gif";
|
115 |
+
break;
|
116 |
+
case('7'):
|
117 |
+
$textCoEx = "Demande de justificatifs en cours";
|
118 |
+
$iconCoEx = "CE_picto_orange.gif";
|
119 |
+
break;
|
120 |
+
case('8'):
|
121 |
+
$textCoEx = "Traitement lourd en cours";
|
122 |
+
$iconCoEx = "CE_picto_orange.gif";
|
123 |
+
break;
|
124 |
+
case('9'):
|
125 |
+
$textCoEx = "FIA-NET : En attente de traitement interne";
|
126 |
+
$iconCoEx = "CE_picto_orange.gif";
|
127 |
+
break;
|
128 |
+
case('10'):
|
129 |
+
$textCoEx = "FIA-NET : En attente de retour internaute";
|
130 |
+
$iconCoEx = "CE_picto_orange.gif";
|
131 |
+
break;
|
132 |
+
case('11'):
|
133 |
+
$textCoEx = "FIA-NET : En cours de contrôle";
|
134 |
+
$iconCoEx = "CE_picto_orange.gif";
|
135 |
+
break;
|
136 |
+
case('12'):
|
137 |
+
$textCoEx = "FIA-NET : Résultat Négatif";
|
138 |
+
$iconCoEx = "CE_picto_vert.gif";
|
139 |
+
break;
|
140 |
+
case('13'):
|
141 |
+
$textCoEx = "FIA-NET : Résultat Positif";
|
142 |
+
$iconCoEx = "CE_picto_vert.gif";
|
143 |
+
break;
|
144 |
+
case('14'):
|
145 |
+
$textCoEx = "FIA-NET : Résultat Positif, assurance OK";
|
146 |
+
$iconCoEx = "CE_picto_vert.gif";
|
147 |
+
break;
|
148 |
+
case('15'):
|
149 |
+
$textCoEx = "Transaction validée automatiquement";
|
150 |
+
$iconCoEx = "CE_picto_vert.gif";
|
151 |
+
break;
|
152 |
+
case('16'):
|
153 |
+
$textCoEx = "Transaction validée manuellement";
|
154 |
+
$iconCoEx = "CE_picto_vert.gif";
|
155 |
+
break;
|
156 |
+
case('17'):
|
157 |
+
$textCoEx = "Transaction rejetée automatiquement";
|
158 |
+
$iconCoEx = "CE_picto_vert.gif";
|
159 |
+
break;
|
160 |
+
case('18'):
|
161 |
+
$textCoEx = "Transaction rejetée manuellement";
|
162 |
+
$iconCoEx = "CE_picto_vert.gif";
|
163 |
+
break;
|
164 |
+
case('22'):
|
165 |
+
case('23'):
|
166 |
+
case('24'):
|
167 |
+
$textCoEx = "FIA-NET : CoEx en cours";
|
168 |
+
$iconCoEx = "CE_picto_orange.gif";
|
169 |
+
break;
|
170 |
+
case('25'):
|
171 |
+
$textCoEx = "FIA-NET : Transaction validée par CoEx";
|
172 |
+
$iconCoEx = "CE_picto_vert.gif";
|
173 |
+
case('26'):
|
174 |
+
$textCoEx = "FIA-NET : Transaction rejetée par CoEx";
|
175 |
+
$iconCoEx = "CE_picto_vert.gif";
|
176 |
+
break;
|
177 |
+
}
|
178 |
+
|
179 |
+
$url = Mage::getStoreConfig('sac/saclink/testurl', '0');
|
180 |
+
if ($mode == 'PRODUCTION') {
|
181 |
+
$url = Mage::getStoreConfig('sac/saclink/produrl', '0');
|
182 |
+
}
|
183 |
+
|
184 |
+
$url .= Mage::getStoreConfig('sac/saclink/interface', '0');
|
185 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($row->IncrementId);
|
186 |
+
$id = $order->getStore()->getId();
|
187 |
+
|
188 |
+
$siteId = Mage::getStoreConfig('sac/sacconfg/siteid', $id);
|
189 |
+
if ($siteId == null && $id > 0)
|
190 |
+
$siteId = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
|
191 |
+
|
192 |
+
$login = Mage::getStoreConfig('sac/sacconfg/compte', $id);
|
193 |
+
if ($login == null && $id > 0)
|
194 |
+
$login = Mage::getStoreConfig('sac/sacconfg/compte', '0');
|
195 |
+
|
196 |
+
$password = Mage::getStoreConfig('sac/sacconfg/password', $id);
|
197 |
+
if ($password == null && $id > 0)
|
198 |
+
$password = Mage::getStoreConfig('sac/sacconfg/password', '0');
|
199 |
+
|
200 |
+
$url .= '?sid=' . $siteId . '&log=' . $login . '&pwd=' . urlencode($password) . '&rid=' . $row->getIncrementId();
|
201 |
+
$js = 'onclick="javascript: window.open(\'' . $url . '\',\'fianet\',\'toolbar=no, location=no, directories=no, status=no,scrollbars=yes, resizable=yes, copyhistory=no, width=900, height=800, left=200, top=100\'); return false;"';
|
202 |
+
$html .= '<p><a href="#" ' . $js . ' style="text-decoration: none;"><img src="' . $this->getSkinUrl('images/fianet/' . $icon) . '" alt="' . $alt . '"></a></p>';
|
203 |
+
if($textCoEx != '') {
|
204 |
+
$html .= '<p><a href="#" ' . $js . ' style="text-decoration: none;"><img src="' . $this->getSkinUrl('images/fianet/' . $iconCoEx) . '" alt="' . $alt . '"></a><br />';
|
205 |
+
$html .= '<font size="1">'.$textCoEx.'</font></p>';
|
206 |
+
}
|
207 |
+
if ($mode == 'TEST') {
|
208 |
+
$html .= 'TEST';
|
209 |
+
}
|
210 |
+
|
211 |
+
return ($html);
|
212 |
+
}
|
213 |
+
|
214 |
+
protected function _getConfigurationData($incrementId) {
|
215 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
|
216 |
+
$scopeField = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
217 |
+
switch ($scopeField) {
|
218 |
+
case ('store_id'):
|
219 |
+
$id = $order->getStore()->getId();
|
220 |
+
break;
|
221 |
+
case ('group_id'):
|
222 |
+
$id = $order->getStore()->getGroup()->getId();
|
223 |
+
break;
|
224 |
+
case ('website_id'):
|
225 |
+
$id = $order->getStore()->getWebsite()->getId();
|
226 |
+
break;
|
227 |
+
default:
|
228 |
+
$id = $order->getStore()->getGroup()->getId();
|
229 |
+
break;
|
230 |
+
}
|
231 |
+
$configurationData = Mage::getModel('fianet/configuration_value');
|
232 |
+
$configurationData->_scope_field = $scopeField;
|
233 |
+
$configurationData->setScope($id);
|
234 |
+
|
235 |
+
return ($configurationData);
|
236 |
+
}
|
237 |
+
|
238 |
+
protected function _renderKwx(Varien_Object $row) {
|
239 |
+
// utilisable avec le module kwixo
|
240 |
+
$html = '';
|
241 |
+
$icon = '';
|
242 |
+
|
243 |
+
if ($row->getFianetRnpTag() != null) {
|
244 |
+
$rnpTag = $row->getFianetRnpTag();
|
245 |
+
} else {
|
246 |
+
return ($html);
|
247 |
+
}
|
248 |
+
|
249 |
+
$mode = 'TEST';
|
250 |
+
if ($row->getFianetRnpMode() != null) {
|
251 |
+
$mode = $row->getFianetRnpMode();
|
252 |
+
}
|
253 |
+
|
254 |
+
$html = $rnpTag;
|
255 |
+
$options = $this->getColumn()->getRenderoptions();
|
256 |
+
|
257 |
+
if (!isset($options['mode'])) {
|
258 |
+
$options['mode'] = 'mini';
|
259 |
+
}
|
260 |
+
switch ($rnpTag) {
|
261 |
+
case '1':
|
262 |
+
$icon = 'ok';
|
263 |
+
break;
|
264 |
+
case '10':
|
265 |
+
$icon = 'ok';
|
266 |
+
break;
|
267 |
+
case '13':
|
268 |
+
$icon = 'ok';
|
269 |
+
break;
|
270 |
+
case '14':
|
271 |
+
$icon = 'ok';
|
272 |
+
break;
|
273 |
+
case '2':
|
274 |
+
$icon = 'ko';
|
275 |
+
break;
|
276 |
+
case '11':
|
277 |
+
$icon = 'ko';
|
278 |
+
break;
|
279 |
+
case '3':
|
280 |
+
$icon = 'ss';
|
281 |
+
break;
|
282 |
+
case '12':
|
283 |
+
$icon = 'ss';
|
284 |
+
break;
|
285 |
+
case "100":
|
286 |
+
$icon = 'ok';
|
287 |
+
break;
|
288 |
+
case "101":
|
289 |
+
$icon = 'ko';
|
290 |
+
break;
|
291 |
+
case "0":
|
292 |
+
$icon = 'ko';
|
293 |
+
break;
|
294 |
+
}
|
295 |
+
|
296 |
+
//recupere le label du tag
|
297 |
+
foreach (Mage::getModel('kwixo/source_tags')->toOptionArray() as $tag) {
|
298 |
+
if ($tag['value'] == $rnpTag) {
|
299 |
+
$title = $tag['label'];
|
300 |
+
}
|
301 |
+
}
|
302 |
+
$js = "";
|
303 |
+
|
304 |
+
if ($icon != '') {
|
305 |
+
if ($icon == 'ss') {
|
306 |
+
$html = '<a href="#" ' . $js . ' style="text-decoration: none;" title="' . $title . '">' . $this->__('Und. ctrl.') . '</a>';
|
307 |
+
if ($mode == 'TEST' && $options['mode'] == 'mini') {
|
308 |
+
$html .= '<br />TEST';
|
309 |
+
}
|
310 |
+
} else {
|
311 |
+
$html = '<a href="#" ' . $js . ' style="text-decoration: none;"><img src="' . $this->getSkinUrl('images/fianet/' . $icon . '.gif') . '" alt="' . $title . ' (' . $rnpTag . ')"></a>';
|
312 |
+
if ($mode == 'TEST' && $options['mode'] == 'mini') {
|
313 |
+
|
314 |
+
$html .= '<br />TEST';
|
315 |
+
}
|
316 |
+
}
|
317 |
+
} elseif ($options['mode'] == 'full') {
|
318 |
+
$html = '<a href="#" ' . $js . ' style="text-decoration: none;">' . $rnpTag . '</a>';
|
319 |
+
}
|
320 |
+
if ($options['mode'] == 'full') {
|
321 |
+
$html .= ' - ' . $title;
|
322 |
+
}
|
323 |
+
|
324 |
+
return $html;
|
325 |
+
}
|
326 |
+
|
327 |
+
protected function _renderRnP(Varien_Object $row) {
|
328 |
+
$html = '';
|
329 |
+
$icon = '';
|
330 |
+
|
331 |
+
if ($row->getFianetRnpTag() != null) {
|
332 |
+
$tagValue = $row->getFianetRnpTag();
|
333 |
+
} else {
|
334 |
+
return ($html);
|
335 |
+
}
|
336 |
+
|
337 |
+
$mode = 'TEST';
|
338 |
+
//Zend_Debug::dump($row->getFianetRnpMode());
|
339 |
+
if ($row->getFianetRnpMode() != null) {
|
340 |
+
$mode = $row->getFianetRnpMode();
|
341 |
+
}
|
342 |
+
$html = $tagValue;
|
343 |
+
//Zend_Debug::dump($tagValue);
|
344 |
+
//$index = $this->getColumn()->getIndex();
|
345 |
+
$options = $this->getColumn()->getRenderoptions();
|
346 |
+
if (!isset($options['mode'])) {
|
347 |
+
$options['mode'] = 'mini';
|
348 |
+
}
|
349 |
+
switch ($tagValue) {
|
350 |
+
case '1':
|
351 |
+
$icon = 'ok';
|
352 |
+
break;
|
353 |
+
case '10':
|
354 |
+
$icon = 'ok';
|
355 |
+
break;
|
356 |
+
case '13':
|
357 |
+
$icon = 'ok';
|
358 |
+
break;
|
359 |
+
case '14':
|
360 |
+
$icon = 'ok';
|
361 |
+
break;
|
362 |
+
case '2':
|
363 |
+
$icon = 'ko';
|
364 |
+
break;
|
365 |
+
case '11':
|
366 |
+
$icon = 'ko';
|
367 |
+
break;
|
368 |
+
case '3':
|
369 |
+
$icon = 'ss';
|
370 |
+
break;
|
371 |
+
case '12':
|
372 |
+
$icon = 'ss';
|
373 |
+
break;
|
374 |
+
case "100":
|
375 |
+
$icon = 'ok';
|
376 |
+
break;
|
377 |
+
case "101":
|
378 |
+
$icon = 'ko';
|
379 |
+
break;
|
380 |
+
case "0":
|
381 |
+
$icon = 'ko';
|
382 |
+
break;
|
383 |
+
}
|
384 |
+
foreach (Mage::getModel('receiveandpay/source_tags')->toOptionArray() as $tag) {
|
385 |
+
if ($tag['value'] == $tagValue) {
|
386 |
+
$title = $tag['label'];
|
387 |
+
}
|
388 |
+
}
|
389 |
+
$js = "onclick=\"window.open('" . $this->getUrl('receiveandpay/redirect/', array('mode' => $mode)) . "','test'); return false;\"";
|
390 |
+
if ($icon != '') {
|
391 |
+
if ($icon == 'ss') {
|
392 |
+
|
393 |
+
$html = '<a href="#" ' . $js . ' style="text-decoration: none;" title="' . $title . '">' . $this->__('Und. ctrl.') . '</a>';
|
394 |
+
if ($mode == 'TEST' && $options['mode'] == 'mini') {
|
395 |
+
$html .= '<br />TEST';
|
396 |
+
}
|
397 |
+
} else {
|
398 |
+
$html = '<a href="#" ' . $js . ' style="text-decoration: none;"><img src="' . $this->getSkinUrl('images/fianet/' . $icon . '.gif') . '" alt="' . $title . ' (' . $tagValue . ')"></a>';
|
399 |
+
if ($mode == 'TEST' && $options['mode'] == 'mini') {
|
400 |
+
$html .= '<br />TEST';
|
401 |
+
}
|
402 |
+
}
|
403 |
+
} elseif ($options['mode'] == 'full') {
|
404 |
+
$html = '<a href="#" ' . $js . ' style="text-decoration: none;">' . $tagValue . '</a>';
|
405 |
+
}
|
406 |
+
if ($options['mode'] == 'full') {
|
407 |
+
$html .= ' - ' . $title;
|
408 |
+
}
|
409 |
+
return $html;
|
410 |
+
}
|
411 |
+
|
412 |
+
}
|
app/code/community/Fianet/Core/Block/Sales/Order/Grid.php
DELETED
@@ -1,75 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid {
|
19 |
-
|
20 |
-
/*protected function _prepareCollection() {
|
21 |
-
parent::_prepareCollection();
|
22 |
-
$collection = $this->getCollection()->clear();
|
23 |
-
//$collection->joinAttribute('fianet_rnp_tag', 'order/fianet_rnp_tag', 'entity_id', null, 'left');
|
24 |
-
//$collection->addAttributeToSelect('fianet_rnp_tag', 'outer');
|
25 |
-
$this->getCollection()->load();
|
26 |
-
$this->setCollection($collection);
|
27 |
-
}*/
|
28 |
-
|
29 |
-
protected function _prepareColumns() {
|
30 |
-
parent::_prepareColumns();
|
31 |
-
$this->addColumn('fianet', array(
|
32 |
-
'header' => 'FIA-NET',
|
33 |
-
'sortable' => false,
|
34 |
-
'type' => 'fianet',
|
35 |
-
'align' => 'center',
|
36 |
-
'width' => '20',
|
37 |
-
'renderer' => 'fianet/widget_grid_column_renderer_fianet',
|
38 |
-
'filter' => 'fianet/widget_grid_column_filter_fianet'
|
39 |
-
));
|
40 |
-
}
|
41 |
-
|
42 |
-
protected function _prepareMassaction() {
|
43 |
-
parent::_prepareMassaction();
|
44 |
-
|
45 |
-
if (Fianet_Core_Model_Configuration::CheckModuleIsInstalled('Fianet_Sac')) {
|
46 |
-
//Retiré la reception des évaluations et des reevaluations dans la page commande pour éviter des lenteurs é l'ouverture de la page
|
47 |
-
//le cron est utilisé en remplacement
|
48 |
-
|
49 |
-
/*
|
50 |
-
$nb = 0;
|
51 |
-
try {
|
52 |
-
$nb = Mage::getModel('sac/action')->getEvaluation();
|
53 |
-
} catch (Exception $e) {
|
54 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
55 |
-
}
|
56 |
-
if ($nb > 0) {
|
57 |
-
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('%s evaluation(s) successfully receipted', $nb));
|
58 |
-
}
|
59 |
-
|
60 |
-
Mage::getModel('sac/action')->GetReevaluation();
|
61 |
-
*/
|
62 |
-
|
63 |
-
$this->getMassactionBlock()->addItem('sent_sac', array(
|
64 |
-
'label' => Mage::helper('fianet')->__('Sent to SAC FIA-NET'),
|
65 |
-
'url' => $this->getUrl('sac/order/sentSac'),
|
66 |
-
));
|
67 |
-
$this->getMassactionBlock()->addItem('get_eval', array(
|
68 |
-
'label' => Mage::helper('fianet')->__('Get evaluations'),
|
69 |
-
'url' => $this->getUrl('sac/order/getEvaluation'),
|
70 |
-
));
|
71 |
-
}
|
72 |
-
return $this;
|
73 |
-
}
|
74 |
-
|
75 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Block/Widget/Grid/Column/Renderer/Fianet.php
DELETED
@@ -1,218 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Block_Widget_Grid_Column_Renderer_Fianet extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
19 |
-
|
20 |
-
public function render(Varien_Object $row) {
|
21 |
-
$html = '';
|
22 |
-
//Zend_Debug::dump($row, '$row');
|
23 |
-
if ($row->status == 'pending_rnp') {
|
24 |
-
$html = '<img src="' . $this->getSkinUrl('images/fianet/RnP.gif') . '">';
|
25 |
-
}
|
26 |
-
if ($row->Fianet_rnp_tag != null) {
|
27 |
-
$html = $this->_renderRnP($row);
|
28 |
-
}
|
29 |
-
if ($row->Fianet_sac_sent != 0) {
|
30 |
-
$html = $this->_renderSac($row);
|
31 |
-
}
|
32 |
-
|
33 |
-
return ($html);
|
34 |
-
}
|
35 |
-
|
36 |
-
protected function _renderSac(Varien_Object $row) {
|
37 |
-
$evaluation = $row->Fianet_sac_evaluation;
|
38 |
-
$reevaluation = $row->Fianet_sac_reevaluation;
|
39 |
-
$mode = $row->Fianet_sac_mode;
|
40 |
-
$html = '';
|
41 |
-
$icon = '';
|
42 |
-
switch ($evaluation) {
|
43 |
-
case('error'):
|
44 |
-
$icon = 'attention.gif';
|
45 |
-
$alt = Mage::helper('fianet')->__('Error on transaction');
|
46 |
-
break;
|
47 |
-
case('100'):
|
48 |
-
$icon = 'rond_vert.gif';
|
49 |
-
$alt = Mage::helper('fianet')->__('Click for details');
|
50 |
-
break;
|
51 |
-
case('-1'):
|
52 |
-
$icon = 'rond_vertclair.gif';
|
53 |
-
$alt = Mage::helper('fianet')->__('Click for details');
|
54 |
-
break;
|
55 |
-
case('0'):
|
56 |
-
$icon = 'rond_rouge.gif';
|
57 |
-
$alt = Mage::helper('fianet')->__('Click for details');
|
58 |
-
break;
|
59 |
-
default:
|
60 |
-
$icon = 'fianet_SAC_icon.gif';
|
61 |
-
$alt = Mage::helper('fianet')->__('Evaluation in progress...');
|
62 |
-
break;
|
63 |
-
}
|
64 |
-
switch ($reevaluation) {
|
65 |
-
case('100'):
|
66 |
-
$icon = 'rond_vert.gif';
|
67 |
-
$alt = Mage::helper('fianet')->__('Click for details');
|
68 |
-
break;
|
69 |
-
case('-1'):
|
70 |
-
$icon = 'rond_vertclair.gif';
|
71 |
-
$alt = Mage::helper('fianet')->__('Click for details');
|
72 |
-
break;
|
73 |
-
case('0'):
|
74 |
-
$icon = 'rond_rouge.gif';
|
75 |
-
$alt = Mage::helper('fianet')->__('Click for details');
|
76 |
-
break;
|
77 |
-
}
|
78 |
-
$url = $url = Mage::getModel('fianet/configuration')->getGlobalValue('SAC_BASEURL_TEST');
|
79 |
-
if ($mode == 'PRODUCTION') {
|
80 |
-
$url = $url = Mage::getModel('fianet/configuration')->getGlobalValue('SAC_BASEURL_PRODUCTION');
|
81 |
-
}
|
82 |
-
$url .= Mage::getModel('fianet/configuration')->getGlobalValue('SAC_URL_BOMERCHANT');
|
83 |
-
|
84 |
-
$config = $this->GetConfigurationData($row->IncrementId);
|
85 |
-
|
86 |
-
$siteid = $config->load('SAC_SITEID')->Value;
|
87 |
-
$login = $config->load('SAC_LOGIN')->Value;
|
88 |
-
$password = $config->load('SAC_PASSWORD')->Value;
|
89 |
-
|
90 |
-
if ($siteid == null) {
|
91 |
-
$config->setScope(0);
|
92 |
-
$siteid = $config->load('SAC_SITEID')->Value;
|
93 |
-
$login = $config->load('SAC_LOGIN')->Value;
|
94 |
-
$password = $config->load('SAC_PASSWORD')->Value;
|
95 |
-
}
|
96 |
-
|
97 |
-
$url .= '?sid=' . $siteid . '&log=' . $login . '&pwd=' . urlencode($password) . '&rid=' . $row->IncrementId;
|
98 |
-
$js = 'onclick="javascript: window.open(\'' . $url . '\',\'fianet\',\'toolbar=no, location=no, directories=no, status=no,scrollbars=yes, resizable=yes, copyhistory=no, width=900, height=800, left=200, top=100\'); return false;"';
|
99 |
-
$html .= '<a href="#" ' . $js . ' style="text-decoration: none;"><img src="' . $this->getSkinUrl('images/fianet/' . $icon) . '" alt="' . $alt . '"></a>';
|
100 |
-
|
101 |
-
if ($mode == 'TEST') {
|
102 |
-
$html .= '<br />TEST';
|
103 |
-
}
|
104 |
-
|
105 |
-
return ($html);
|
106 |
-
}
|
107 |
-
|
108 |
-
protected function GetConfigurationData($incrementId) {
|
109 |
-
//Zend_Debug::dump($incrementId);
|
110 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
|
111 |
-
$scope_field = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
112 |
-
switch ($scope_field) {
|
113 |
-
case ('store_id'):
|
114 |
-
$id = $order->getStore()->getId();
|
115 |
-
break;
|
116 |
-
case ('group_id'):
|
117 |
-
$id = $order->getStore()->getGroup()->getId();
|
118 |
-
break;
|
119 |
-
case ('website_id'):
|
120 |
-
$id = $order->getStore()->getWebsite()->getId();
|
121 |
-
break;
|
122 |
-
default:
|
123 |
-
$id = $order->getStore()->getGroup()->getId();
|
124 |
-
break;
|
125 |
-
}
|
126 |
-
$configurationData = Mage::getModel('fianet/configuration_value');
|
127 |
-
$configurationData->_scope_field = $scope_field;
|
128 |
-
$configurationData->setScope($id);
|
129 |
-
|
130 |
-
return ($configurationData);
|
131 |
-
}
|
132 |
-
|
133 |
-
protected function _renderRnP(Varien_Object $row) {
|
134 |
-
$html = '';
|
135 |
-
$icon = '';
|
136 |
-
|
137 |
-
if ($row->Fianet_rnp_tag != null) {
|
138 |
-
$Tag = $row->Fianet_rnp_tag;
|
139 |
-
} else {
|
140 |
-
return ($html);
|
141 |
-
}
|
142 |
-
|
143 |
-
$Mode = 'TEST';
|
144 |
-
//Zend_Debug::dump($row->Fianet_rnp_mode);
|
145 |
-
if ($row->Fianet_rnp_mode != null) {
|
146 |
-
$Mode = $row->Fianet_rnp_mode;
|
147 |
-
}
|
148 |
-
$html = $Tag;
|
149 |
-
//Zend_Debug::dump($Tag);
|
150 |
-
//$index = $this->getColumn()->getIndex();
|
151 |
-
$options = $this->getColumn()->getRenderoptions();
|
152 |
-
if (!isset($options['mode'])) {
|
153 |
-
$options['mode'] = 'mini';
|
154 |
-
}
|
155 |
-
switch ($Tag) {
|
156 |
-
case '1':
|
157 |
-
$icon = 'ok';
|
158 |
-
break;
|
159 |
-
case '10':
|
160 |
-
$icon = 'ok';
|
161 |
-
break;
|
162 |
-
case '13':
|
163 |
-
$icon = 'ok';
|
164 |
-
break;
|
165 |
-
case '14':
|
166 |
-
$icon = 'ok';
|
167 |
-
break;
|
168 |
-
case '2':
|
169 |
-
$icon = 'ko';
|
170 |
-
break;
|
171 |
-
case '11':
|
172 |
-
$icon = 'ko';
|
173 |
-
break;
|
174 |
-
case '3':
|
175 |
-
$icon = 'ss';
|
176 |
-
break;
|
177 |
-
case '12':
|
178 |
-
$icon = 'ss';
|
179 |
-
break;
|
180 |
-
case "100":
|
181 |
-
$icon = 'ok';
|
182 |
-
break;
|
183 |
-
case "101":
|
184 |
-
$icon = 'ko';
|
185 |
-
break;
|
186 |
-
case "0":
|
187 |
-
$icon = 'ko';
|
188 |
-
break;
|
189 |
-
}
|
190 |
-
foreach (Mage::getModel('receiveandpay/source_tags')->toOptionArray() as $tag) {
|
191 |
-
if ($tag['value'] == $Tag) {
|
192 |
-
$title = $tag['label'];
|
193 |
-
}
|
194 |
-
}
|
195 |
-
$js = "onclick=\"window.open('" . $this->getUrl('receiveandpay/redirect/', array('mode' => $Mode)) . "','test'); return false;\"";
|
196 |
-
if ($icon != '') {
|
197 |
-
if ($icon == 'ss') {
|
198 |
-
|
199 |
-
$html = '<a href="#" ' . $js . ' style="text-decoration: none;" title="' . $title . '">' . $this->__('Und. ctrl.') . '</a>';
|
200 |
-
if ($Mode == 'TEST' && $options['mode'] == 'mini') {
|
201 |
-
$html .= '<br />TEST';
|
202 |
-
}
|
203 |
-
} else {
|
204 |
-
$html = '<a href="#" ' . $js . ' style="text-decoration: none;"><img src="' . $this->getSkinUrl('images/fianet/' . $icon . '.gif') . '" alt="' . $title . ' (' . $Tag . ')"></a>';
|
205 |
-
if ($Mode == 'TEST' && $options['mode'] == 'mini') {
|
206 |
-
$html .= '<br />TEST';
|
207 |
-
}
|
208 |
-
}
|
209 |
-
} elseif ($options['mode'] == 'full') {
|
210 |
-
$html = '<a href="#" ' . $js . ' style="text-decoration: none;">' . $Tag . '</a>';
|
211 |
-
}
|
212 |
-
if ($options['mode'] == 'full') {
|
213 |
-
$html .= ' - ' . $title;
|
214 |
-
}
|
215 |
-
return $html;
|
216 |
-
}
|
217 |
-
|
218 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Controller/Tree/Abstract.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
interface IFianetTree {
|
@@ -24,14 +24,9 @@ interface IFianetTree {
|
|
24 |
|
25 |
abstract class Fianet_Core_Controller_Tree_Abstract extends Mage_Adminhtml_Controller_Action implements IFianetTree {
|
26 |
|
27 |
-
private $_block = 'fianet/
|
28 |
-
|
29 |
-
protected function _construct() {
|
30 |
-
parent::_construct();
|
31 |
-
}
|
32 |
|
33 |
protected function _initCategory($getRootInstead = false) {
|
34 |
-
//Zend_Debug::dump('Fianet_Core_Controller_Tree_Abstract::_initCategory()');
|
35 |
$categoryId = (int) $this->getRequest()->getParam('id', false);
|
36 |
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
37 |
$category = Mage::getModel('catalog/category');
|
@@ -55,8 +50,7 @@ abstract class Fianet_Core_Controller_Tree_Abstract extends Mage_Adminhtml_Contr
|
|
55 |
|
56 |
Mage::register('category', $category);
|
57 |
Mage::register('current_category', $category);
|
58 |
-
//Zend_Debug::dump("Mage::register('current_category', ".$category->getId().")");
|
59 |
return $category;
|
60 |
}
|
61 |
|
62 |
-
}
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
interface IFianetTree {
|
24 |
|
25 |
abstract class Fianet_Core_Controller_Tree_Abstract extends Mage_Adminhtml_Controller_Action implements IFianetTree {
|
26 |
|
27 |
+
private $_block = 'fianet/adminhtml_tree_abstract';
|
|
|
|
|
|
|
|
|
28 |
|
29 |
protected function _initCategory($getRootInstead = false) {
|
|
|
30 |
$categoryId = (int) $this->getRequest()->getParam('id', false);
|
31 |
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
32 |
$category = Mage::getModel('catalog/category');
|
50 |
|
51 |
Mage::register('category', $category);
|
52 |
Mage::register('current_category', $category);
|
|
|
53 |
return $category;
|
54 |
}
|
55 |
|
56 |
+
}
|
app/code/community/Fianet/Core/Controller/Tree/{TypeProduct.php → ProductType.php}
RENAMED
@@ -10,16 +10,16 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
protected function _construct() {
|
21 |
parent::_construct();
|
22 |
-
$this->_block = 'fianet/
|
23 |
}
|
24 |
|
25 |
public function treeAction() {
|
@@ -57,17 +57,14 @@ class Fianet_Core_Controller_Tree_TypeProduct extends Fianet_Core_Controller_Tre
|
|
57 |
} else {
|
58 |
Mage::getSingleton('admin/session')->setIsTreeWasExpanded(false);
|
59 |
}
|
60 |
-
if ($categoryId = (int) $this->getRequest()->getPost('id')) {
|
61 |
$this->getRequest()->setParam('id', $categoryId);
|
62 |
|
63 |
if (!$category = $this->_initCategory()) {
|
64 |
return;
|
65 |
}
|
66 |
-
$this->getResponse()->setBody(
|
67 |
-
$this->getLayout()->createBlock($this->_block)
|
68 |
-
->getTreeJson($category)
|
69 |
-
);
|
70 |
}
|
71 |
}
|
72 |
|
73 |
-
}
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
+
class Fianet_Core_Controller_Tree_ProductType extends Fianet_Core_Controller_Tree_Abstract {
|
19 |
|
20 |
protected function _construct() {
|
21 |
parent::_construct();
|
22 |
+
$this->_block = 'fianet/adminhtml_tree_productType';
|
23 |
}
|
24 |
|
25 |
public function treeAction() {
|
57 |
} else {
|
58 |
Mage::getSingleton('admin/session')->setIsTreeWasExpanded(false);
|
59 |
}
|
60 |
+
if (($categoryId = (int) $this->getRequest()->getPost('id'))) {
|
61 |
$this->getRequest()->setParam('id', $categoryId);
|
62 |
|
63 |
if (!$category = $this->_initCategory()) {
|
64 |
return;
|
65 |
}
|
66 |
+
$this->getResponse()->setBody($this->getLayout()->createBlock($this->_block)->getTreeJson($category));
|
|
|
|
|
|
|
67 |
}
|
68 |
}
|
69 |
|
70 |
+
}
|
app/code/community/Fianet/Core/Helper/Data.php
CHANGED
@@ -1,31 +1,57 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Return Magento version
|
22 |
+
*
|
23 |
+
* @return int
|
24 |
+
*/
|
25 |
+
public function getMagentoVersion() {
|
26 |
+
$version = Mage::getVersion();
|
27 |
+
$version = substr($version, 0, 5);
|
28 |
+
$version = str_replace('.', '', $version);
|
29 |
+
while (strlen($version) < 3) {
|
30 |
+
$version .= "0";
|
31 |
+
}
|
32 |
+
return (int) $version;
|
33 |
+
}
|
34 |
+
|
35 |
+
public static function initials($string) {
|
36 |
+
$string = trim($string);
|
37 |
+
$init = strtoupper($string[0]);
|
38 |
+
for ($i = 1; $i < strlen($string); $i++) {
|
39 |
+
if ($string[$i - 1] == ' ' && $string[$i] != ' ') {
|
40 |
+
$init .= strtoupper($string[$i]);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
return $init;
|
44 |
+
}
|
45 |
+
|
46 |
+
public static function checkModuleIsInstalled($name) {
|
47 |
+
$modules = array_keys((array) Mage::getConfig()->getNode('modules')->children());
|
48 |
+
sort($modules);
|
49 |
+
foreach ($modules as $moduleName) {
|
50 |
+
if ($moduleName == $name) {
|
51 |
+
return (true);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
return (false);
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
app/code/community/Fianet/Core/Model/Carrier/Abstract.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Carrier_Abstract extends Mage_Shipping_Model_Carrier_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Carrier_Abstract extends Mage_Shipping_Model_Carrier_Abstract {
|
app/code/community/Fianet/Core/Model/Catproduct/Association.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Catproduct_Association extends Mage_Core_Model_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
parent::_construct();
|
22 |
-
$this->_init('fianet/catproduct_association');
|
23 |
-
}
|
24 |
-
|
25 |
-
public function
|
26 |
-
$this->_getResource()->load($this, $id, 'catalog_category_entity_id');
|
27 |
-
return ($this);
|
28 |
-
}
|
29 |
-
|
30 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Catproduct_Association extends Mage_Core_Model_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
parent::_construct();
|
22 |
+
$this->_init('fianet/catproduct_association');
|
23 |
+
}
|
24 |
+
|
25 |
+
public function loadByCategoryId($id) {
|
26 |
+
$this->_getResource()->load($this, $id, 'catalog_category_entity_id');
|
27 |
+
return ($this);
|
28 |
+
}
|
29 |
+
|
30 |
}
|
app/code/community/Fianet/Core/Model/Configuration.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Configuration extends Mage_Core_Model_Abstract {
|
@@ -37,7 +37,7 @@ class Fianet_Core_Model_Configuration extends Mage_Core_Model_Abstract {
|
|
37 |
|
38 |
public function getStoreValue($key, $store_id = 0) {
|
39 |
$value = null;
|
40 |
-
$value = Mage::getModel('fianet/
|
41 |
->setScope((integer) $store_id)
|
42 |
->load($key)
|
43 |
->Value;
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Configuration extends Mage_Core_Model_Abstract {
|
37 |
|
38 |
public function getStoreValue($key, $store_id = 0) {
|
39 |
$value = null;
|
40 |
+
$value = Mage::getModel('fianet/configuration_value')
|
41 |
->setScope((integer) $store_id)
|
42 |
->load($key)
|
43 |
->Value;
|
app/code/community/Fianet/Core/Model/Configuration/Global.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Configuration_Global extends Mage_Core_Model_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Configuration_Global extends Mage_Core_Model_Abstract {
|
app/code/community/Fianet/Core/Model/Configuration/Value.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Configuration_Value extends Fianet_Core_Model_Scope_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Configuration_Value extends Fianet_Core_Model_Scope_Abstract {
|
app/code/community/Fianet/Core/Model/Fianet/EncodingKey.php
CHANGED
@@ -10,24 +10,21 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_EncodingKey {
|
19 |
|
20 |
-
private $
|
21 |
|
22 |
function __construct() {
|
23 |
-
$cryptage = Mage::
|
24 |
-
|
25 |
-
->Value;
|
26 |
-
$this->clMD5 = Mage::getModel('fianet/fianet_' . $cryptage);
|
27 |
}
|
28 |
|
29 |
-
public function giveHashCode($pkey, $second, $email, $
|
30 |
-
|
31 |
$modulo = $second % 4;
|
32 |
|
33 |
switch ($modulo) {
|
@@ -38,7 +35,7 @@ class Fianet_Core_Model_Fianet_EncodingKey {
|
|
38 |
$select = $email;
|
39 |
break;
|
40 |
case 2:
|
41 |
-
$select = $
|
42 |
break;
|
43 |
case 3:
|
44 |
$select = $nom;
|
@@ -47,10 +44,10 @@ class Fianet_Core_Model_Fianet_EncodingKey {
|
|
47 |
break;
|
48 |
}
|
49 |
|
50 |
-
return $this->
|
51 |
}
|
52 |
|
53 |
-
public function giveHashCode2($pkey, $second, $email, $
|
54 |
$modulo = $second % 4;
|
55 |
|
56 |
$montant = sprintf("%01.2f", $montant);
|
@@ -63,7 +60,7 @@ class Fianet_Core_Model_Fianet_EncodingKey {
|
|
63 |
$select = $email;
|
64 |
break;
|
65 |
case 2:
|
66 |
-
$select = $
|
67 |
break;
|
68 |
case 3:
|
69 |
$select = $nom;
|
@@ -72,7 +69,15 @@ class Fianet_Core_Model_Fianet_EncodingKey {
|
|
72 |
break;
|
73 |
}
|
74 |
|
75 |
-
return $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
}
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_EncodingKey {
|
19 |
|
20 |
+
private $_clMD5;
|
21 |
|
22 |
function __construct() {
|
23 |
+
$cryptage = Mage::getStoreConfig('kwixo/kwixoconfg/encryptmode');
|
24 |
+
$this->_clMD5 = Mage::getModel(strtolower('fianet/fianet_' . $cryptage));
|
|
|
|
|
25 |
}
|
26 |
|
27 |
+
public function giveHashCode($pkey, $second, $email, $refId, $montant, $nom) {
|
|
|
28 |
$modulo = $second % 4;
|
29 |
|
30 |
switch ($modulo) {
|
35 |
$select = $email;
|
36 |
break;
|
37 |
case 2:
|
38 |
+
$select = $refId;
|
39 |
break;
|
40 |
case 3:
|
41 |
$select = $nom;
|
44 |
break;
|
45 |
}
|
46 |
|
47 |
+
return $this->_clMD5->hash($pkey . $refId . $select);
|
48 |
}
|
49 |
|
50 |
+
public function giveHashCode2($pkey, $second, $email, $refId, $montant, $nom) {
|
51 |
$modulo = $second % 4;
|
52 |
|
53 |
$montant = sprintf("%01.2f", $montant);
|
60 |
$select = $email;
|
61 |
break;
|
62 |
case 2:
|
63 |
+
$select = $refId;
|
64 |
break;
|
65 |
case 3:
|
66 |
$select = $nom;
|
69 |
break;
|
70 |
}
|
71 |
|
72 |
+
return $this->_clMD5->hash($pkey . $refId . $montant . $email . $select);
|
73 |
+
}
|
74 |
+
|
75 |
+
public function giveHashRemoteControl($pkey, $actionCode, $transactionId, $cmplt) {
|
76 |
+
return $this->_clMD5->hash($pkey . $actionCode . $transactionId . $cmplt);
|
77 |
+
}
|
78 |
+
|
79 |
+
public function giveHashTagline($pkey, $refId, $transactionId) {
|
80 |
+
return $this->_clMD5->hash($pkey . $refId . $transactionId);
|
81 |
}
|
82 |
|
83 |
}
|
app/code/community/Fianet/Core/Model/Fianet/Hash32bits.php
CHANGED
@@ -1,208 +1,223 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
$this->
|
45 |
-
$this->
|
46 |
-
|
47 |
-
$this->
|
48 |
-
|
49 |
-
$this->
|
50 |
-
$this->
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
$this->
|
57 |
-
$this->
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
$
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
$
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
$
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
$
|
143 |
-
$
|
144 |
-
$
|
145 |
-
$
|
146 |
-
|
147 |
-
$this->
|
148 |
-
|
149 |
-
$this->
|
150 |
-
$this->
|
151 |
-
$this->
|
152 |
-
$this->
|
153 |
-
$this->
|
154 |
-
$this->
|
155 |
-
$this->
|
156 |
-
$this->
|
157 |
-
$this->
|
158 |
-
$this->
|
159 |
-
$this->
|
160 |
-
$this->
|
161 |
-
$this->
|
162 |
-
$this->
|
163 |
-
|
164 |
-
$this->
|
165 |
-
|
166 |
-
$this->
|
167 |
-
$this->
|
168 |
-
$this->
|
169 |
-
$this->
|
170 |
-
$this->
|
171 |
-
$this->
|
172 |
-
$this->
|
173 |
-
$this->
|
174 |
-
$this->
|
175 |
-
$this->
|
176 |
-
$this->
|
177 |
-
$this->
|
178 |
-
$this->
|
179 |
-
$this->
|
180 |
-
|
181 |
-
$this->
|
182 |
-
|
183 |
-
$this->
|
184 |
-
$this->
|
185 |
-
$this->
|
186 |
-
$this->
|
187 |
-
$this->
|
188 |
-
$this->
|
189 |
-
$this->
|
190 |
-
$this->
|
191 |
-
$this->
|
192 |
-
$this->
|
193 |
-
$this->
|
194 |
-
$this->
|
195 |
-
$this->
|
196 |
-
$this->
|
197 |
-
|
198 |
-
$this->
|
199 |
-
|
200 |
-
$this->
|
201 |
-
$this->b = $this->
|
202 |
-
$this->
|
203 |
-
$this->d = $this->
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
/*
|
19 |
+
* * PHP implementation of the RSA Data Security, Inc. MD5 Message
|
20 |
+
* * Digest Algorithm, as defined in RFC 1321.
|
21 |
+
*
|
22 |
+
* * Version 1.1
|
23 |
+
* * Copyright 2004 Marcus Campbell
|
24 |
+
* * http://www.tecknik.net/md5/
|
25 |
+
*
|
26 |
+
* * This code is available under the GNU Lesser General Public License:
|
27 |
+
* * http://www.gnu.org/licenses/lgpl.txt
|
28 |
+
*
|
29 |
+
* * Based on the JavaScript implementation by Paul Johnston
|
30 |
+
* * http://pajhome.org.uk/
|
31 |
+
*/
|
32 |
+
Class Fianet_Core_Model_Fianet_Hash32bits {
|
33 |
+
|
34 |
+
var $a;
|
35 |
+
var $b;
|
36 |
+
var $c;
|
37 |
+
var $d;
|
38 |
+
var $Save_a;
|
39 |
+
var $Save_b;
|
40 |
+
var $Save_c;
|
41 |
+
var $Save_d;
|
42 |
+
|
43 |
+
function __construct() {
|
44 |
+
$this->a = -279229019;
|
45 |
+
$this->b = -1875190530;
|
46 |
+
$this->c = 1737040641;
|
47 |
+
$this->d = 315143286;
|
48 |
+
|
49 |
+
$this->Save_a = $this->a;
|
50 |
+
$this->Save_b = $this->b;
|
51 |
+
$this->Save_c = $this->c;
|
52 |
+
$this->Save_d = $this->d;
|
53 |
+
}
|
54 |
+
|
55 |
+
function FlushKey($k0, $k1, $k2, $k3) {
|
56 |
+
$this->a = $k0;
|
57 |
+
$this->b = $k1;
|
58 |
+
$this->c = $k2;
|
59 |
+
$this->d = $k3;
|
60 |
+
|
61 |
+
$this->Save_a = $this->a;
|
62 |
+
$this->Save_b = $this->b;
|
63 |
+
$this->Save_c = $this->c;
|
64 |
+
$this->Save_d = $this->d;
|
65 |
+
}
|
66 |
+
|
67 |
+
function Init() {
|
68 |
+
$this->a = $this->Save_a;
|
69 |
+
$this->b = $this->Save_b;
|
70 |
+
$this->c = $this->Save_c;
|
71 |
+
$this->d = $this->Save_d;
|
72 |
+
}
|
73 |
+
|
74 |
+
function rhex($num) {
|
75 |
+
$hex_chr = "0123456789abcdef";
|
76 |
+
$str = "";
|
77 |
+
for ($j = 0; $j <= 3; $j++)
|
78 |
+
$str .= substr($hex_chr, ($num >> ($j * 8 + 4)) & 0x0F, 1) . substr($hex_chr, ($num >> ($j * 8)) & 0x0F, 1);
|
79 |
+
return $str;
|
80 |
+
}
|
81 |
+
|
82 |
+
function str2blks_MD5($str) {
|
83 |
+
$blks = array();
|
84 |
+
$nblk = ((strlen($str) + 8) >> 6) + 1;
|
85 |
+
for ($i = 0; $i < $nblk * 16; $i++)
|
86 |
+
$blks[$i] = 0;
|
87 |
+
for ($i = 0; $i < strlen($str); $i++)
|
88 |
+
$blks[$i >> 2] |= ord(substr($str, $i, 1)) << (($i % 4) * 8);
|
89 |
+
$blks[$i >> 2] |= 0x80 << (($i % 4) * 8);
|
90 |
+
$blks[$nblk * 16 - 2] = strlen($str) * 8;
|
91 |
+
return $blks;
|
92 |
+
}
|
93 |
+
|
94 |
+
function add($x, $y) {
|
95 |
+
$lsw = ($x & 0xFFFF) + ($y & 0xFFFF);
|
96 |
+
$msw = ($x >> 16) + ($y >> 16) + ($lsw >> 16);
|
97 |
+
return ($msw << 16) | ($lsw & 0xFFFF);
|
98 |
+
}
|
99 |
+
|
100 |
+
function rol($num, $cnt) {
|
101 |
+
return ($num << $cnt) | $this->zeroFill($num, 32 - $cnt);
|
102 |
+
}
|
103 |
+
|
104 |
+
function zeroFill($a, $b) {
|
105 |
+
$bin = decbin($a);
|
106 |
+
if (strlen($bin) < $b)
|
107 |
+
$bin = 0;
|
108 |
+
else
|
109 |
+
$bin = substr($bin, 0, strlen($bin) - $b);
|
110 |
+
for ($i = 0; $i < $b; $i++) {
|
111 |
+
$bin = "0" . $bin;
|
112 |
+
}
|
113 |
+
return bindec($bin);
|
114 |
+
}
|
115 |
+
|
116 |
+
function cmn($q, $a, $b, $x, $s, $t) {
|
117 |
+
return $this->add($this->rol($this->add($this->add($a, $q), $this->add($x, $t)), $s), $b);
|
118 |
+
}
|
119 |
+
|
120 |
+
function ff($a, $b, $c, $d, $x, $s, $t) {
|
121 |
+
return $this->cmn(($b & $c) | ((~$b) & $d), $a, $b, $x, $s, $t);
|
122 |
+
}
|
123 |
+
|
124 |
+
function gg($a, $b, $c, $d, $x, $s, $t) {
|
125 |
+
return $this->cmn(($b & $d) | ($c & (~$d)), $a, $b, $x, $s, $t);
|
126 |
+
}
|
127 |
+
|
128 |
+
function hh($a, $b, $c, $d, $x, $s, $t) {
|
129 |
+
return $this->cmn($b ^ $c ^ $d, $a, $b, $x, $s, $t);
|
130 |
+
}
|
131 |
+
|
132 |
+
function ii($a, $b, $c, $d, $x, $s, $t) {
|
133 |
+
return $this->cmn($c ^ ($b | (~$d)), $a, $b, $x, $s, $t);
|
134 |
+
}
|
135 |
+
|
136 |
+
function hash($str) {
|
137 |
+
$x = $this->str2blks_MD5($str);
|
138 |
+
|
139 |
+
$this->Init();
|
140 |
+
|
141 |
+
for ($i = 0; $i < sizeof($x); $i += 16) {
|
142 |
+
$olda = $this->a;
|
143 |
+
$oldb = $this->b;
|
144 |
+
$oldc = $this->c;
|
145 |
+
$oldd = $this->d;
|
146 |
+
|
147 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 0], 7, -680876936);
|
148 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 1], 12, -389564586);
|
149 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 2], 17, 606105819);
|
150 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 3], 22, -1044525330);
|
151 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 4], 7, -176418897);
|
152 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 5], 12, 1200080426);
|
153 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 6], 17, -1473231341);
|
154 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 7], 22, -45705983);
|
155 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 8], 7, 1770035416);
|
156 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 9], 12, -1958414417);
|
157 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 10], 17, -42063);
|
158 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 11], 22, -1990404162);
|
159 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 12], 7, 1804603682);
|
160 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 13], 12, -40341101);
|
161 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 14], 17, -1502002290);
|
162 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 15], 22, 1236535329);
|
163 |
+
|
164 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 1], 5, -165796510);
|
165 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 6], 9, -1069501632);
|
166 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 11], 14, 643717713);
|
167 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 0], 20, -373897302);
|
168 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 5], 5, -701558691);
|
169 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 10], 9, 38016083);
|
170 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 15], 14, -660478335);
|
171 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 4], 20, -405537848);
|
172 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 9], 5, 568446438);
|
173 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 14], 9, -1019803690);
|
174 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 3], 14, -187363961);
|
175 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 8], 20, 1163531501);
|
176 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 13], 5, -1444681467);
|
177 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 2], 9, -51403784);
|
178 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 7], 14, 1735328473);
|
179 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 12], 20, -1926607734);
|
180 |
+
|
181 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 5], 4, -378558);
|
182 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 8], 11, -2022574463);
|
183 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 11], 16, 1839030562);
|
184 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 14], 23, -35309556);
|
185 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 1], 4, -1530992060);
|
186 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 4], 11, 1272893353);
|
187 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 7], 16, -155497632);
|
188 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 10], 23, -1094730640);
|
189 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 13], 4, 681279174);
|
190 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 0], 11, -358537222);
|
191 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 3], 16, -722521979);
|
192 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 6], 23, 76029189);
|
193 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 9], 4, -640364487);
|
194 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 12], 11, -421815835);
|
195 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 15], 16, 530742520);
|
196 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 2], 23, -995338651);
|
197 |
+
|
198 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 0], 6, -198630844);
|
199 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 7], 10, 1126891415);
|
200 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 14], 15, -1416354905);
|
201 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 5], 21, -57434055);
|
202 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 12], 6, 1700485571);
|
203 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 3], 10, -1894986606);
|
204 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 10], 15, -1051523);
|
205 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 1], 21, -2054922799);
|
206 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 8], 6, 1873313359);
|
207 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 15], 10, -30611744);
|
208 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 6], 15, -1560198380);
|
209 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 13], 21, 1309151649);
|
210 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 4], 6, -145523070);
|
211 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 11], 10, -1120210379);
|
212 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 2], 15, 718787259);
|
213 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 9], 21, -343485551);
|
214 |
+
|
215 |
+
$this->a = $this->add($this->a, $olda);
|
216 |
+
$this->b = $this->add($this->b, $oldb);
|
217 |
+
$this->c = $this->add($this->c, $oldc);
|
218 |
+
$this->d = $this->add($this->d, $oldd);
|
219 |
+
}
|
220 |
+
return $this->rhex($this->a) . $this->rhex($this->b) . $this->rhex($this->c) . $this->rhex($this->d);
|
221 |
+
}
|
222 |
+
|
223 |
+
}
|
app/code/community/Fianet/Core/Model/Fianet/Hash64bits.php
CHANGED
@@ -1,219 +1,238 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
$this->
|
49 |
-
$this->
|
50 |
-
$this->
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
$this->
|
55 |
-
$this->
|
56 |
-
$this->
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
$
|
75 |
-
$
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
$
|
81 |
-
|
82 |
-
$
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
$
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
$
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
$
|
157 |
-
$
|
158 |
-
|
159 |
-
$
|
160 |
-
|
161 |
-
$this->
|
162 |
-
$this->
|
163 |
-
$this->
|
164 |
-
$this->
|
165 |
-
$this->
|
166 |
-
$this->
|
167 |
-
$this->
|
168 |
-
$this->
|
169 |
-
$this->
|
170 |
-
$this->
|
171 |
-
$this->
|
172 |
-
$this->
|
173 |
-
$this->
|
174 |
-
$this->
|
175 |
-
|
176 |
-
$this->
|
177 |
-
|
178 |
-
$this->
|
179 |
-
$this->
|
180 |
-
$this->
|
181 |
-
$this->
|
182 |
-
$this->
|
183 |
-
$this->
|
184 |
-
$this->
|
185 |
-
$this->
|
186 |
-
$this->
|
187 |
-
$this->
|
188 |
-
$this->
|
189 |
-
$this->
|
190 |
-
$this->
|
191 |
-
$this->
|
192 |
-
|
193 |
-
$this->
|
194 |
-
|
195 |
-
$this->
|
196 |
-
$this->
|
197 |
-
$this->
|
198 |
-
$this->
|
199 |
-
$this->
|
200 |
-
$this->
|
201 |
-
$this->
|
202 |
-
$this->
|
203 |
-
$this->
|
204 |
-
$this->
|
205 |
-
$this->
|
206 |
-
$this->
|
207 |
-
$this->
|
208 |
-
$this->
|
209 |
-
|
210 |
-
$this->
|
211 |
-
|
212 |
-
$this->
|
213 |
-
$this->d = $this->
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
/*
|
19 |
+
* * PHP implementation of the RSA Data Security, Inc. MD5 Message
|
20 |
+
* * Digest Algorithm, as defined in RFC 1321.
|
21 |
+
*
|
22 |
+
* * Version 1.1
|
23 |
+
* * Copyright 2004 Marcus Campbell
|
24 |
+
* * http://www.tecknik.net/md5/
|
25 |
+
*
|
26 |
+
* * This code is available under the GNU Lesser General Public License:
|
27 |
+
* * http://www.gnu.org/licenses/lgpl.txt
|
28 |
+
*
|
29 |
+
* * Based on the JavaScript implementation by Paul Johnston
|
30 |
+
* * http://pajhome.org.uk/
|
31 |
+
*
|
32 |
+
* * Modified by PJ ALBERT
|
33 |
+
* * for 64bit system
|
34 |
+
*/
|
35 |
+
|
36 |
+
Class Fianet_Core_Model_Fianet_Hash64bits {
|
37 |
+
|
38 |
+
var $a;
|
39 |
+
var $b;
|
40 |
+
var $c;
|
41 |
+
var $d;
|
42 |
+
var $Save_a;
|
43 |
+
var $Save_b;
|
44 |
+
var $Save_c;
|
45 |
+
var $Save_d;
|
46 |
+
|
47 |
+
function __construct() {
|
48 |
+
$this->a = -279229019;
|
49 |
+
$this->b = -1875190530;
|
50 |
+
$this->c = 1737040641;
|
51 |
+
$this->d = 315143286;
|
52 |
+
|
53 |
+
$this->Save_a = $this->a;
|
54 |
+
$this->Save_b = $this->b;
|
55 |
+
$this->Save_c = $this->c;
|
56 |
+
$this->Save_d = $this->d;
|
57 |
+
}
|
58 |
+
|
59 |
+
function FlushKey($k0, $k1, $k2, $k3) {
|
60 |
+
$this->a = $k0;
|
61 |
+
$this->b = $k1;
|
62 |
+
$this->c = $k2;
|
63 |
+
$this->d = $k3;
|
64 |
+
|
65 |
+
$this->Save_a = $this->a;
|
66 |
+
$this->Save_b = $this->b;
|
67 |
+
$this->Save_c = $this->c;
|
68 |
+
$this->Save_d = $this->d;
|
69 |
+
}
|
70 |
+
|
71 |
+
function Init() {
|
72 |
+
$this->a = $this->Save_a;
|
73 |
+
$this->b = $this->Save_b;
|
74 |
+
$this->c = $this->Save_c;
|
75 |
+
$this->d = $this->Save_d;
|
76 |
+
}
|
77 |
+
|
78 |
+
function rhex($num) {
|
79 |
+
$hex_chr = "0123456789abcdef";
|
80 |
+
$str = "";
|
81 |
+
for ($j = 0; $j <= 3; $j++)
|
82 |
+
$str .= substr($hex_chr, ($num >> ($j * 8 + 4)) & 0x0F, 1) . substr($hex_chr, ($num >> ($j * 8)) & 0x0F, 1);
|
83 |
+
return $str;
|
84 |
+
}
|
85 |
+
|
86 |
+
function str2blks_MD5($str) {
|
87 |
+
$nblk = ((strlen($str) + 8) >> 6) + 1;
|
88 |
+
$blks = array();
|
89 |
+
for ($i = 0; $i < $nblk * 16; $i++)
|
90 |
+
$blks[$i] = 0;
|
91 |
+
for ($i = 0; $i < strlen($str); $i++)
|
92 |
+
$blks[$i >> 2] |= ord(substr($str, $i, 1)) << (($i % 4) * 8);
|
93 |
+
$blks[$i >> 2] |= 0x80 << (($i % 4) * 8);
|
94 |
+
$blks[$nblk * 16 - 2] = strlen($str) * 8;
|
95 |
+
return $blks;
|
96 |
+
}
|
97 |
+
|
98 |
+
function parse_unsigned_int($s) {
|
99 |
+
$x = (float) $s;
|
100 |
+
if ($x > (float) 2147483647)
|
101 |
+
$x -= (float) "4294967296";
|
102 |
+
if ($x < (float) -2147483648)
|
103 |
+
$x += (float) "4294967296";
|
104 |
+
return (int) $x;
|
105 |
+
}
|
106 |
+
|
107 |
+
function add($x, $y) {
|
108 |
+
$lsw = ($x & 0xFFFF) + ($y & 0xFFFF);
|
109 |
+
$msw = ($x >> 16) + ($y >> 16) + ($lsw >> 16);
|
110 |
+
return $this->parse_unsigned_int(($msw << 16) | ($lsw & 0xFFFF));
|
111 |
+
}
|
112 |
+
|
113 |
+
function rol($num, $cnt) {
|
114 |
+
$num = $num & 0xFFFFFFFF;
|
115 |
+
return $this->parse_unsigned_int(($num << $cnt) & 0xFFFFFFFF | $this->zeroFill($num, 32 - $cnt));
|
116 |
+
}
|
117 |
+
|
118 |
+
function zeroFill($a, $b) {
|
119 |
+
$bin = decbin($a);
|
120 |
+
if (strlen($bin) < $b)
|
121 |
+
$bin = 0;
|
122 |
+
else
|
123 |
+
$bin = substr($bin, 0, strlen($bin) - $b);
|
124 |
+
for ($i = 0; $i < $b; $i++) {
|
125 |
+
$bin = "0" . $bin;
|
126 |
+
}
|
127 |
+
return bindec($bin);
|
128 |
+
}
|
129 |
+
|
130 |
+
function cmn($q, $a, $b, $x, $s, $t) {
|
131 |
+
return $this->add($this->rol($this->add($this->add($a, $q), $this->add($x, $t)), $s), $b);
|
132 |
+
}
|
133 |
+
|
134 |
+
function ff($a, $b, $c, $d, $x, $s, $t) {
|
135 |
+
return $this->cmn(($b & $c) | ((~$b) & $d), $a, $b, $x, $s, $t);
|
136 |
+
}
|
137 |
+
|
138 |
+
function gg($a, $b, $c, $d, $x, $s, $t) {
|
139 |
+
return $this->cmn(($b & $d) | ($c & (~$d)), $a, $b, $x, $s, $t);
|
140 |
+
}
|
141 |
+
|
142 |
+
function hh($a, $b, $c, $d, $x, $s, $t) {
|
143 |
+
return $this->cmn($b ^ $c ^ $d, $a, $b, $x, $s, $t);
|
144 |
+
}
|
145 |
+
|
146 |
+
function ii($a, $b, $c, $d, $x, $s, $t) {
|
147 |
+
return $this->cmn($c ^ ($b | (~$d)), $a, $b, $x, $s, $t);
|
148 |
+
}
|
149 |
+
|
150 |
+
function hash($str) {
|
151 |
+
|
152 |
+
$x = $this->str2blks_MD5($str);
|
153 |
+
$this->Init();
|
154 |
+
|
155 |
+
for ($i = 0; $i < sizeof($x); $i += 16) {
|
156 |
+
$olda = $this->a;
|
157 |
+
$oldb = $this->b;
|
158 |
+
$oldc = $this->c;
|
159 |
+
$oldd = $this->d;
|
160 |
+
|
161 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 0], 7, -680876936);
|
162 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 1], 12, -389564586);
|
163 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 2], 17, 606105819);
|
164 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 3], 22, -1044525330);
|
165 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 4], 7, -176418897);
|
166 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 5], 12, 1200080426);
|
167 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 6], 17, -1473231341);
|
168 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 7], 22, -45705983);
|
169 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 8], 7, 1770035416);
|
170 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 9], 12, -1958414417);
|
171 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 10], 17, -42063);
|
172 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 11], 22, -1990404162);
|
173 |
+
$this->a = $this->ff($this->a, $this->b, $this->c, $this->d, $x[$i + 12], 7, 1804603682);
|
174 |
+
$this->d = $this->ff($this->d, $this->a, $this->b, $this->c, $x[$i + 13], 12, -40341101);
|
175 |
+
$this->c = $this->ff($this->c, $this->d, $this->a, $this->b, $x[$i + 14], 17, -1502002290);
|
176 |
+
$this->b = $this->ff($this->b, $this->c, $this->d, $this->a, $x[$i + 15], 22, 1236535329);
|
177 |
+
|
178 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 1], 5, -165796510);
|
179 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 6], 9, -1069501632);
|
180 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 11], 14, 643717713);
|
181 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 0], 20, -373897302);
|
182 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 5], 5, -701558691);
|
183 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 10], 9, 38016083);
|
184 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 15], 14, -660478335);
|
185 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 4], 20, -405537848);
|
186 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 9], 5, 568446438);
|
187 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 14], 9, -1019803690);
|
188 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 3], 14, -187363961);
|
189 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 8], 20, 1163531501);
|
190 |
+
$this->a = $this->gg($this->a, $this->b, $this->c, $this->d, $x[$i + 13], 5, -1444681467);
|
191 |
+
$this->d = $this->gg($this->d, $this->a, $this->b, $this->c, $x[$i + 2], 9, -51403784);
|
192 |
+
$this->c = $this->gg($this->c, $this->d, $this->a, $this->b, $x[$i + 7], 14, 1735328473);
|
193 |
+
$this->b = $this->gg($this->b, $this->c, $this->d, $this->a, $x[$i + 12], 20, -1926607734);
|
194 |
+
|
195 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 5], 4, -378558);
|
196 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 8], 11, -2022574463);
|
197 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 11], 16, 1839030562);
|
198 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 14], 23, -35309556);
|
199 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 1], 4, -1530992060);
|
200 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 4], 11, 1272893353);
|
201 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 7], 16, -155497632);
|
202 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 10], 23, -1094730640);
|
203 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 13], 4, 681279174);
|
204 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 0], 11, -358537222);
|
205 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 3], 16, -722521979);
|
206 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 6], 23, 76029189);
|
207 |
+
$this->a = $this->hh($this->a, $this->b, $this->c, $this->d, $x[$i + 9], 4, -640364487);
|
208 |
+
$this->d = $this->hh($this->d, $this->a, $this->b, $this->c, $x[$i + 12], 11, -421815835);
|
209 |
+
$this->c = $this->hh($this->c, $this->d, $this->a, $this->b, $x[$i + 15], 16, 530742520);
|
210 |
+
$this->b = $this->hh($this->b, $this->c, $this->d, $this->a, $x[$i + 2], 23, -995338651);
|
211 |
+
|
212 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 0], 6, -198630844);
|
213 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 7], 10, 1126891415);
|
214 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 14], 15, -1416354905);
|
215 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 5], 21, -57434055);
|
216 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 12], 6, 1700485571);
|
217 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 3], 10, -1894986606);
|
218 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 10], 15, -1051523);
|
219 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 1], 21, -2054922799);
|
220 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 8], 6, 1873313359);
|
221 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 15], 10, -30611744);
|
222 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 6], 15, -1560198380);
|
223 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 13], 21, 1309151649);
|
224 |
+
$this->a = $this->ii($this->a, $this->b, $this->c, $this->d, $x[$i + 4], 6, -145523070);
|
225 |
+
$this->d = $this->ii($this->d, $this->a, $this->b, $this->c, $x[$i + 11], 10, -1120210379);
|
226 |
+
$this->c = $this->ii($this->c, $this->d, $this->a, $this->b, $x[$i + 2], 15, 718787259);
|
227 |
+
$this->b = $this->ii($this->b, $this->c, $this->d, $this->a, $x[$i + 9], 21, -343485551);
|
228 |
+
|
229 |
+
$this->a = $this->add($this->a, $olda);
|
230 |
+
$this->b = $this->add($this->b, $oldb);
|
231 |
+
$this->c = $this->add($this->c, $oldc);
|
232 |
+
$this->d = $this->add($this->d, $oldd);
|
233 |
+
}
|
234 |
+
|
235 |
+
return $this->rhex($this->a) . $this->rhex($this->b) . $this->rhex($this->c) . $this->rhex($this->d);
|
236 |
+
}
|
237 |
+
|
238 |
+
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/Address/Base.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Address_Base {
|
19 |
+
|
20 |
+
protected $_type;
|
21 |
+
protected $_format = 1;
|
22 |
+
public $rue1;
|
23 |
+
public $rue2;
|
24 |
+
public $cpostal;
|
25 |
+
public $ville;
|
26 |
+
public $pays;
|
27 |
+
|
28 |
+
public function getXml() {
|
29 |
+
$xml = '';
|
30 |
+
if ($this->_type != null) {
|
31 |
+
$xml .= "\t" . '<adresse type="' . $this->_type . '" format="' . $this->_format . '">' . "\n";
|
32 |
+
if ($this->rue1 != '') {
|
33 |
+
$xml .= "\t\t" . '<rue1><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->rue1) . ']]></rue1>' . "\n";
|
34 |
+
} else {
|
35 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Adress_Base::getXml() - rue1 is undefined");
|
36 |
+
}
|
37 |
+
if ($this->rue2 != "") {
|
38 |
+
$xml .= "\t\t" . '<rue2><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->rue2) . ']]></rue2>' . "\n";
|
39 |
+
}
|
40 |
+
if ($this->cpostal != "") {
|
41 |
+
$xml .= "\t\t" . '<cpostal><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->cpostal) . ']]></cpostal>' . "\n";
|
42 |
+
} else {
|
43 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Adress_Base::getXml() - cpostal is undefined");
|
44 |
+
}
|
45 |
+
if ($this->ville != "") {
|
46 |
+
$xml .= "\t\t" . '<ville><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->ville) . ']]></ville>' . "\n";
|
47 |
+
} else {
|
48 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Adress_Base::getXml() - ville is undefined");
|
49 |
+
}
|
50 |
+
if ($this->pays != "") {
|
51 |
+
$xml .= "\t\t" . '<pays><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->pays) . ']]></pays>' . "\n";
|
52 |
+
} else {
|
53 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Adress_Base::getXml() - pays is undefined");
|
54 |
+
}
|
55 |
+
$xml .= "\t" . '</adresse>' . "\n";
|
56 |
+
}
|
57 |
+
return ($xml);
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/{Adress → Address}/Billing.php
RENAMED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct(
|
21 |
-
$this->
|
22 |
-
}
|
23 |
-
|
24 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Address_Billing extends Fianet_Core_Model_Fianet_Order_Address_Base {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->_type = 'facturation';
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/{Adress → Address}/Delivery.php
RENAMED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->
|
22 |
-
}
|
23 |
-
|
24 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Address_Delivery extends Fianet_Core_Model_Fianet_Order_Address_Base {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->_type = 'livraison';
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/Adress/Base.php
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Adress_Base {
|
19 |
-
|
20 |
-
protected $type;
|
21 |
-
protected $format = 1;
|
22 |
-
public $rue1;
|
23 |
-
public $rue2;
|
24 |
-
public $cpostal;
|
25 |
-
public $ville;
|
26 |
-
public $pays;
|
27 |
-
|
28 |
-
protected function __construct() {
|
29 |
-
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_xml() {
|
33 |
-
$xml = '';
|
34 |
-
if ($this->type != null) {
|
35 |
-
$xml .= "\t" . '<adresse type="' . $this->type . '" format="' . $this->format . '">' . "\n";
|
36 |
-
if ($this->rue1 != '') {
|
37 |
-
$xml .= "\t\t" . '<rue1>' . Mage::getModel('fianet/functions')->clean_invalid_char($this->rue1) . '</rue1>' . "\n";
|
38 |
-
} else {
|
39 |
-
Mage::throwException("Mage_Fianet_Model_Fianet_Order_Adress_Base::get_xml() - rue1 is undefined");
|
40 |
-
}
|
41 |
-
if ($this->rue2 != "") {
|
42 |
-
$xml .= "\t\t" . '<rue2>' . Mage::getModel('fianet/functions')->clean_invalid_char($this->rue2) . '</rue2>' . "\n";
|
43 |
-
}
|
44 |
-
if ($this->cpostal != "") {
|
45 |
-
$xml .= "\t\t" . '<cpostal>' . Mage::getModel('fianet/functions')->clean_invalid_char($this->cpostal) . '</cpostal>' . "\n";
|
46 |
-
} else {
|
47 |
-
Mage::throwException("Mage_Fianet_Model_Fianet_Order_Adress_Base::get_xml() - cpostal is undefined");
|
48 |
-
}
|
49 |
-
if ($this->ville != "") {
|
50 |
-
$xml .= "\t\t" . '<ville>' . Mage::getModel('fianet/functions')->clean_invalid_char($this->ville) . '</ville>' . "\n";
|
51 |
-
} else {
|
52 |
-
Mage::throwException("Mage_Fianet_Model_Fianet_Order_Adress_Base::get_xml() - ville is undefined");
|
53 |
-
}
|
54 |
-
if ($this->pays != "") {
|
55 |
-
$xml .= "\t\t" . '<pays>' . Mage::getModel('fianet/functions')->clean_invalid_char($this->pays) . '</pays>' . "\n";
|
56 |
-
} else {
|
57 |
-
Mage::throwException("Mage_Fianet_Model_Fianet_Order_Adress_Base::get_xml() - pays is undefined");
|
58 |
-
}
|
59 |
-
$xml .= "\t" . '</adresse>' . "\n";
|
60 |
-
}
|
61 |
-
return ($xml);
|
62 |
-
}
|
63 |
-
|
64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Info/Productlist.php
CHANGED
@@ -1,55 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Info_Productlist {
|
19 |
-
|
20 |
-
protected $
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Info_Productlist {
|
19 |
+
|
20 |
+
protected $productsList = array();
|
21 |
+
|
22 |
+
|
23 |
+
public function addProduct($product) {
|
24 |
+
if ($product instanceof Fianet_Core_Model_Fianet_Order_Info_Productlist_Product) {
|
25 |
+
$this->productsList[] = $product;
|
26 |
+
} else {
|
27 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Info_Productlist::addProduct() - Data are not a valid Fianet_Core_Model_Fianet_Order_Info_Productlist_Product type");
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getXml() {
|
32 |
+
$xml = '';
|
33 |
+
if (count($this->productsList) > 0) {
|
34 |
+
|
35 |
+
$xml .= "\t\t" . '<list nbproduit="' . $this->_countNbProducts() . '">' . "\n";
|
36 |
+
foreach ($this->productsList as $product) {
|
37 |
+
$xml .= $product->getXml();
|
38 |
+
}
|
39 |
+
$xml .= "\t\t" . '</list>' . "\n";
|
40 |
+
}
|
41 |
+
return ($xml);
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _countNbProducts() {
|
45 |
+
$n = 0;
|
46 |
+
foreach ($this->productsList as $product) {
|
47 |
+
$n += $product->nb;
|
48 |
+
}
|
49 |
+
return ($n);
|
50 |
+
}
|
51 |
+
|
52 |
+
}
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Info/{ProductList → Productlist}/Product.php
RENAMED
@@ -1,58 +1,55 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public $type;
|
21 |
-
public $ref;
|
22 |
-
public $nb = 0;
|
23 |
-
public $prixunit;
|
24 |
-
public $name;
|
25 |
-
|
26 |
-
public function
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
Mage::getModel('fianet/
|
39 |
-
}
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
}
|
45 |
-
if ($this->
|
46 |
-
$
|
47 |
-
}
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Info_Productlist_Product {
|
19 |
+
|
20 |
+
public $type;
|
21 |
+
public $ref;
|
22 |
+
public $nb = 0;
|
23 |
+
public $prixunit;
|
24 |
+
public $name;
|
25 |
+
|
26 |
+
public function getXml() {
|
27 |
+
$xml = '';
|
28 |
+
if ($this->name != null) {
|
29 |
+
$nb = '';
|
30 |
+
$prixunit = '';
|
31 |
+
$type = '';
|
32 |
+
if ($this->type != null) {
|
33 |
+
$type = ' type="' . $this->type . '"';
|
34 |
+
} else {
|
35 |
+
Mage::getModel('fianet/log')->log("Fianet_Core_Model_Fianet_Order_Info_Productlist_Product::getXml() <br />\nproduct type is missing");
|
36 |
+
}
|
37 |
+
if ($this->ref != null) {
|
38 |
+
$ref = ' ref="' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->ref) . '"';
|
39 |
+
} else {
|
40 |
+
Mage::getModel('fianet/log')->log("Fianet_Core_Model_Fianet_Order_Info_Productlist_Product::getXml() <br />\nproduct ref is missing");
|
41 |
+
}
|
42 |
+
if ($this->nb != null) {
|
43 |
+
$nb = ' nb="' . $this->nb . '"';
|
44 |
+
}
|
45 |
+
if ($this->prixunit != null) {
|
46 |
+
$prixunit = ' prixunit="' . number_format($this->prixunit, 2, '.', '') . '"';
|
47 |
+
}
|
48 |
+
$xml .= "\t\t\t<produit$type$ref$nb$prixunit><![CDATA[" . Mage::getModel('fianet/functions')->cleanInvalidChar($this->name) . "]]></produit>\n";
|
49 |
+
} else {
|
50 |
+
Mage::getModel('fianet/log')->log("Fianet_Core_Model_Fianet_Order_Info_Productlist_Product::getXml() <br />\nproduct name is missing");
|
51 |
+
}
|
52 |
+
return ($xml);
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Info/Rnp.php
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Info_Rnp {
|
19 |
-
|
20 |
-
public $siteid;
|
21 |
-
public $refid;
|
22 |
-
public $montant = 0;
|
23 |
-
public $devise = "EUR";
|
24 |
-
public $transport;
|
25 |
-
public $list;
|
26 |
-
|
27 |
-
public function __construct() {
|
28 |
-
$store = Mage::getModel('fianet/functions')->getStore();
|
29 |
-
$this->list = Mage::getModel('fianet/fianet_order_info_productlist');
|
30 |
-
$this->transport = Mage::getModel('fianet/fianet_order_info_transport');
|
31 |
-
$this->siteid = Mage::getModel('fianet/configuration')->getStoreValue('RNP_SITEID', $store);
|
32 |
-
if ($this->siteid == null && $store > 0) {
|
33 |
-
$this->siteid = Mage::getModel('fianet/configuration')->getStoreValue('RNP_SITEID', 0);
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
public function get_xml() {
|
38 |
-
$xml = '';
|
39 |
-
|
40 |
-
if (trim($this->siteid) == '' || trim($this->refid) == '' || $this->montant <= 0 || trim($this->devise) == '') {
|
41 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Info_Rnp - get_xml() <br />Somes values are undefined\n");
|
42 |
-
}
|
43 |
-
$xml .= "\t" . '<infocommande>' . "\n";
|
44 |
-
$xml .= "\t\t" . '<siteid>' . $this->siteid . '</siteid>' . "\n";
|
45 |
-
$xml .= "\t\t" . '<refid>' . $this->refid . '</refid>' . "\n";
|
46 |
-
$xml .= "\t\t" . '<montant devise="' . $this->devise . '">' . number_format($this->montant, 2, '.', '') . '</montant>' . "\n";
|
47 |
-
$xml .= $this->transport->get_xml();
|
48 |
-
$xml .= $this->list->get_xml();
|
49 |
-
$xml .= "\t" . '</infocommande>' . "\n";
|
50 |
-
return ($xml);
|
51 |
-
}
|
52 |
-
|
53 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Info/Sac.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Info_Sac {
|
19 |
-
|
20 |
-
public $siteid = "";
|
21 |
-
public $refid = "";
|
22 |
-
public $montant = 0;
|
23 |
-
public $devise = "EUR";
|
24 |
-
public $ip;
|
25 |
-
public $timestamp;
|
26 |
-
public $transport;
|
27 |
-
public $list;
|
28 |
-
|
29 |
-
public function __construct() {
|
30 |
-
$this->list = Mage::getModel('fianet/fianet_order_info_productlist');
|
31 |
-
$this->transport = Mage::getModel('fianet/fianet_order_info_transport');
|
32 |
-
$this->siteid = Mage::getModel('fianet/configuration')->getValue('SAC_SITEID');
|
33 |
-
}
|
34 |
-
|
35 |
-
public function get_xml() {
|
36 |
-
$xml = '';
|
37 |
-
if (trim($this->siteid) == "" && trim($this->refid) == "" && ((integer) $this->montant) <= 0 && trim($this->devise) == "") {
|
38 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Info_Sac - get_xml() <br />Somes values are undefined\n");
|
39 |
-
}
|
40 |
-
if ($this->transport == null) {
|
41 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Info_Sac - get_xml() <br />Transport is undefined\n");
|
42 |
-
}
|
43 |
-
if ($this->list == null) {
|
44 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Info_Sac - get_xml() <br />List products is undefined\n");
|
45 |
-
}
|
46 |
-
$xml .= "\t" . '<infocommande>' . "\n";
|
47 |
-
$xml .= "\t\t" . '<siteid>' . $this->siteid . '</siteid>' . "\n";
|
48 |
-
$xml .= "\t\t" . '<refid>' . $this->refid . '</refid>' . "\n";
|
49 |
-
$xml .= "\t\t" . '<montant devise="' . $this->devise . '">' . number_format($this->montant, 2, '.', '') . '</montant>' . "\n";
|
50 |
-
if ($this->ip != null && $this->timestamp != null) {
|
51 |
-
$xml .= "\t\t" . '<ip timestamp="' . $this->timestamp . '">' . $this->ip . '</ip>' . "\n";
|
52 |
-
}
|
53 |
-
$xml .= $this->transport->get_xml();
|
54 |
-
$xml .= $this->list->get_xml();
|
55 |
-
$xml .= "\t" . '</infocommande>' . "\n";
|
56 |
-
return ($xml);
|
57 |
-
}
|
58 |
-
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Info/Transport.php
CHANGED
@@ -1,49 +1,45 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Info_Transport {
|
19 |
-
|
20 |
-
public $type;
|
21 |
-
public $nom;
|
22 |
-
public $rapidite;
|
23 |
-
|
24 |
-
public function
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
$
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$xml .= "\t\t" . '<
|
40 |
-
|
41 |
-
$xml .= "\t\t
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
return ($xml);
|
47 |
-
}
|
48 |
-
|
49 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Info_Transport {
|
19 |
+
|
20 |
+
public $type;
|
21 |
+
public $nom;
|
22 |
+
public $rapidite;
|
23 |
+
|
24 |
+
public function getXml() {
|
25 |
+
$xml = '';
|
26 |
+
if ($this->type == null) {
|
27 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Info_Transport::getXml() - Transport type undefined");
|
28 |
+
}
|
29 |
+
if ($this->nom == null) {
|
30 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Info_Transport::getXml() - Transport name undefined");
|
31 |
+
}
|
32 |
+
if ($this->rapidite == null) {
|
33 |
+
Mage::throwException("Fianet_Core_Model_Fianet_Order_Info_Transport::getXml() - Transport time undefined");
|
34 |
+
}
|
35 |
+
$xml .= "\t\t" . '<transport>' . "\n";
|
36 |
+
|
37 |
+
$xml .= "\t\t\t" . '<type><![CDATA[' . $this->type . ']]></type>' . "\n";
|
38 |
+
$xml .= "\t\t\t" . '<nom><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->nom) . ']]></nom>' . "\n";
|
39 |
+
$xml .= "\t\t\t" . '<rapidite><![CDATA[' . $this->rapidite . ']]></rapidite>' . "\n";
|
40 |
+
|
41 |
+
$xml .= "\t\t" . '</transport>' . "\n";
|
42 |
+
return ($xml);
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Optionpayment.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Order_Optionpayment {
|
@@ -21,7 +21,7 @@ class Fianet_Core_Model_Fianet_Order_Optionpayment {
|
|
21 |
public $comptantrnp = null;
|
22 |
public $comptantrnpoffert = null;
|
23 |
|
24 |
-
public function
|
25 |
$xml = "";
|
26 |
if ($this->typpayment == "comptant" && ($this->comptantrnp == '1' || $this->comptantrnp == '0')) {
|
27 |
//comptant
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Order_Optionpayment {
|
21 |
public $comptantrnp = null;
|
22 |
public $comptantrnpoffert = null;
|
23 |
|
24 |
+
public function getXml() {
|
25 |
$xml = "";
|
26 |
if ($this->typpayment == "comptant" && ($this->comptantrnp == '1' || $this->comptantrnp == '0')) {
|
27 |
//comptant
|
app/code/community/Fianet/Core/Model/Fianet/Order/Payment.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Order_Payment {
|
@@ -41,32 +41,32 @@ class Fianet_Core_Model_Fianet_Order_Payment {
|
|
41 |
}
|
42 |
}
|
43 |
|
44 |
-
public function
|
45 |
$xml = '';
|
46 |
if ($this->type != null) {
|
47 |
$xml .= "\t" . '<paiement>' . "\n";
|
48 |
|
49 |
-
$xml .= "\t\t" . '<type
|
50 |
if ($this->type == 'carte' || $this->type == 'paypal') {
|
51 |
if ($this->numcb != null) {
|
52 |
-
$xml .= "\t\t" . '<numcb
|
53 |
}
|
54 |
if ($this->dateval != null) {
|
55 |
-
$xml .= "\t\t" . '<dateval
|
56 |
}
|
57 |
if ($this->bin != null) {
|
58 |
-
$xml .= "\t\t" . '<bin
|
59 |
}
|
60 |
if ($this->bin4 != null) {
|
61 |
-
$xml .= "\t\t" . '<bin4
|
62 |
}
|
63 |
if ($this->bin42 != null) {
|
64 |
-
$xml .= "\t\t" . '<bin42
|
65 |
}
|
66 |
}
|
67 |
$xml .= "\t" . '</paiement>' . "\n";
|
68 |
} else {
|
69 |
-
Mage::throwException("Mage_Fianet_Model_Fianet_Order_Payment::
|
70 |
}
|
71 |
return ($xml);
|
72 |
}
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Order_Payment {
|
41 |
}
|
42 |
}
|
43 |
|
44 |
+
public function getXml() {
|
45 |
$xml = '';
|
46 |
if ($this->type != null) {
|
47 |
$xml .= "\t" . '<paiement>' . "\n";
|
48 |
|
49 |
+
$xml .= "\t\t" . '<type><![CDATA[' . $this->type . ']]></type>' . "\n";
|
50 |
if ($this->type == 'carte' || $this->type == 'paypal') {
|
51 |
if ($this->numcb != null) {
|
52 |
+
$xml .= "\t\t" . '<numcb><![CDATA[' . $this->numcb . ']]></numcb>' . "\n";
|
53 |
}
|
54 |
if ($this->dateval != null) {
|
55 |
+
$xml .= "\t\t" . '<dateval><![CDATA[' . $this->dateval . ']]></dateval>' . "\n";
|
56 |
}
|
57 |
if ($this->bin != null) {
|
58 |
+
$xml .= "\t\t" . '<bin><![CDATA[' . $this->bin . ']]></bin>' . "\n";
|
59 |
}
|
60 |
if ($this->bin4 != null) {
|
61 |
+
$xml .= "\t\t" . '<bin4><![CDATA[' . $this->bin4 . ']]></bin4>' . "\n";
|
62 |
}
|
63 |
if ($this->bin42 != null) {
|
64 |
+
$xml .= "\t\t" . '<bin42><![CDATA[' . $this->bin42 . ']]></bin42>' . "\n";
|
65 |
}
|
66 |
}
|
67 |
$xml .= "\t" . '</paiement>' . "\n";
|
68 |
} else {
|
69 |
+
Mage::throwException("Mage_Fianet_Model_Fianet_Order_Payment::getXml() - Type is undefined");
|
70 |
}
|
71 |
return ($xml);
|
72 |
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/Rnp.php
DELETED
@@ -1,313 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Rnp {
|
19 |
-
|
20 |
-
public $billing_user = null;
|
21 |
-
public $billing_adress = null;
|
22 |
-
public $info_commande = null;
|
23 |
-
public $wallet = null;
|
24 |
-
public $optionpaiement = null;
|
25 |
-
public $delivery_user = null;
|
26 |
-
public $delivery_adress = null;
|
27 |
-
protected $version = null;
|
28 |
-
protected $encoding = null;
|
29 |
-
protected $siteId = null;
|
30 |
-
|
31 |
-
public function __construct() {
|
32 |
-
$store = Mage::getModel('fianet/functions')->getStore();
|
33 |
-
$this->billing_user = Mage::getModel('fianet/fianet_order_user_billing');
|
34 |
-
$this->billing_adress = Mage::getModel('fianet/fianet_order_adress_billing');
|
35 |
-
$this->info_commande = Mage::getModel('fianet/fianet_order_info_rnp');
|
36 |
-
$this->wallet = Mage::getModel('fianet/fianet_order_wallet');
|
37 |
-
$this->optionpaiement = Mage::getModel('fianet/fianet_order_optionpayment');
|
38 |
-
$this->version = (string) Mage::getConfig()->getModuleConfig('Fianet_Core')->version;
|
39 |
-
$this->encoding = Mage::getModel('fianet/configuration_global')
|
40 |
-
->load('XML_ENCODING')
|
41 |
-
->Value;
|
42 |
-
$this->siteId = Mage::getModel('fianet/configuration_value')
|
43 |
-
->setScope($store)
|
44 |
-
->load('RNP_SITEID')
|
45 |
-
->Value;
|
46 |
-
if ($this->siteId == null && $store > 0) {
|
47 |
-
$this->siteId = Mage::getModel('fianet/configuration_value')
|
48 |
-
->setScope(0)
|
49 |
-
->load('RNP_SITEID')
|
50 |
-
->Value;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
public function reset() {
|
55 |
-
$this->billing_user = Mage::getModel('fianet/fianet_order_user_billing');
|
56 |
-
$this->billing_adress = Mage::getModel('fianet/fianet_order_adress_billing');
|
57 |
-
$this->info_commande = Mage::getModel('fianet/fianet_order_info_rnp');
|
58 |
-
$this->wallet = Mage::getModel('fianet/fianet_order_wallet');
|
59 |
-
$this->optionpaiement = Mage::getModel('fianet/fianet_order_optionpayment');
|
60 |
-
$this->delivery_user = null;
|
61 |
-
$this->delivery_adress = null;
|
62 |
-
}
|
63 |
-
|
64 |
-
public function get_xml() {
|
65 |
-
$xml = '';
|
66 |
-
$xml .= '<?xml version="1.0" encoding="' . $this->encoding . '" ?>' . "\n";
|
67 |
-
$xml .= '<control fianetmodule="Magento_RNP" version="' . $this->version . '">' . "\n";
|
68 |
-
$xml .= $this->billing_user->get_xml();
|
69 |
-
$xml .= $this->billing_adress->get_xml();
|
70 |
-
if ($this->delivery_user != null) {
|
71 |
-
if (Mage::getModel('fianet/functions')->var_is_object_of_class($this->delivery_user, 'Fianet_Core_Model_Fianet_Order_User_Delivery')) {
|
72 |
-
$xml .= $this->delivery_user->get_xml();
|
73 |
-
} else {
|
74 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Rnp::get_xml() <br />\nDelivery user is not an object of type Fianet_Core_Model_Fianet_Order_User_Delivery");
|
75 |
-
}
|
76 |
-
}
|
77 |
-
if ($this->delivery_adress != null) {
|
78 |
-
if (Mage::getModel('fianet/functions')->var_is_object_of_class($this->delivery_adress, 'Fianet_Core_Model_Fianet_Order_Adress_Delivery')) {
|
79 |
-
$xml .= $this->delivery_adress->get_xml();
|
80 |
-
} else {
|
81 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Rnp::get_xml() <br />\nDelivery adress is not an object of type Fianet_Core_Model_Fianet_Order_Adress_Delivery");
|
82 |
-
}
|
83 |
-
}
|
84 |
-
$xml .= $this->info_commande->get_xml();
|
85 |
-
|
86 |
-
$this->wallet->generate_wallet_crypt_data($this->info_commande->refid, $this->billing_user->nom, $this->billing_user->email, $this->info_commande->montant);
|
87 |
-
$xml .= $this->wallet->get_xml();
|
88 |
-
$xml .= $this->optionpaiement->get_xml();
|
89 |
-
$xml .= '</control>';
|
90 |
-
|
91 |
-
//save_flux_xml($xml, $this->info_commande->refid);
|
92 |
-
return ($xml);
|
93 |
-
}
|
94 |
-
|
95 |
-
/*
|
96 |
-
Cette fonction génére le formulaire de redirection vers ReceiveAndPay
|
97 |
-
Elle prends des paramétres optionnels
|
98 |
-
url_call : url de retour sur le site marchand
|
99 |
-
url_sys : url de réponse des tags asynchrone pour le serveur ReceiveAndPay
|
100 |
-
ParamCallBack : tableau associatif des données que vous souhaitez voir retourner par le serveur ReceiveAndPay sur url_sys et url_call
|
101 |
-
typeIHM : 1 pour carte bancaire seulement, 2 pour à crédit uniquement, 3 pour les deux en méme temps
|
102 |
-
enProd : mettre à true pour rediriger vers ReceiveAndPay de production
|
103 |
-
auto_send : si true : génére un javascript qui soumettra immédiatement le formulaire
|
104 |
-
*/
|
105 |
-
|
106 |
-
public function get_formular($url_call = null, $url_sys = null, $ParamCallBack = array(), $auto_send = true, $mode) {
|
107 |
-
$flux = $this->get_xml();
|
108 |
-
$flux = Mage::getModel('fianet/functions')->clean_xml($flux);
|
109 |
-
$flux = str_replace('"', "'", $flux);
|
110 |
-
|
111 |
-
if (is_array($ParamCallBack) && count($ParamCallBack) > 0) {
|
112 |
-
$XMLParam = Mage::getModel('fianet/fianet_paramcallback_builder');
|
113 |
-
foreach ($ParamCallBack as $index => $value) {
|
114 |
-
$XMLParam->add_param(Mage::getModel('fianet/fianet_paramcallback_element')->setValues($index, urlencode(htmlentities($value))));
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
if ($mode == 'PRODUCTION')
|
119 |
-
$url = Mage::getModel('fianet/configuration')->getGlobalValue('RNP_PROD_URL_FRONTLINE');
|
120 |
-
else
|
121 |
-
$url = Mage::getModel('fianet/configuration')->getGlobalValue('RNP_TEST_URL_FRONTLINE');
|
122 |
-
|
123 |
-
$form = '';
|
124 |
-
$form .= '<form name="rnp_form" id="rnp_form" action="' . $url . '" method="post">';
|
125 |
-
$form .= '<input type="hidden" name="MerchID" value="' . $this->siteId . '">' . "\n";
|
126 |
-
$form .= '<input type="hidden" name="XMLInfo" value="' . $flux . '">' . "\n";
|
127 |
-
if ($url_call != null && $url_call != '') {
|
128 |
-
$form .= '<input type="hidden" name="URLCall" value="' . $url_call . '">' . "\n";
|
129 |
-
}
|
130 |
-
if ($url_sys != null && $url_sys != '') {
|
131 |
-
$form .= '<input type="hidden" name="URLSys" value="' . $url_sys . '">' . "\n";
|
132 |
-
}
|
133 |
-
if (isset($XMLParam)) {
|
134 |
-
$form .= '<input type="hidden" name="XMLParam" value="' . Mage::getModel('fianet/functions')->clean_xml(str_replace('"', "'", $XMLParam->get_xml())) . '">' . "\n";
|
135 |
-
}
|
136 |
-
$form .= '</form>';
|
137 |
-
if ($auto_send) {
|
138 |
-
$form .= '<script>document.rnp_form.submit();</script>';
|
139 |
-
}
|
140 |
-
|
141 |
-
return ($form);
|
142 |
-
}
|
143 |
-
|
144 |
-
public static function GenerateRnPOrder(Mage_Sales_Model_Order $order) {
|
145 |
-
$scope_field = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
146 |
-
switch ($scope_field) {
|
147 |
-
case ('store_id'):
|
148 |
-
$id = $order->getStore()->getId();
|
149 |
-
break;
|
150 |
-
case ('group_id'):
|
151 |
-
$id = $order->getStore()->getGroup()->getId();
|
152 |
-
break;
|
153 |
-
case ('website_id'):
|
154 |
-
$id = $order->getStore()->getWebsite()->getId();
|
155 |
-
break;
|
156 |
-
default:
|
157 |
-
$id = $order->getStore()->getGroup()->getId();
|
158 |
-
break;
|
159 |
-
}
|
160 |
-
$configurationData = Mage::getModel('fianet/configuration_value');
|
161 |
-
$configurationData->_scope_field = $scope_field;
|
162 |
-
$configurationData->setScope($id);
|
163 |
-
|
164 |
-
$RnPOrder = Mage::getModel('fianet/fianet_order_rnp');
|
165 |
-
|
166 |
-
$RnPOrder->scope_field = $scope_field;
|
167 |
-
$RnPOrder->scope_id = $id;
|
168 |
-
|
169 |
-
$billing_address = $order->getBillingAddress();
|
170 |
-
$shipping_address = $order->getShippingAddress();
|
171 |
-
|
172 |
-
$RnPOrder->billing_user->nom = $billing_address->getLastname();
|
173 |
-
$RnPOrder->billing_user->prenom = $billing_address->getFirstname();
|
174 |
-
$RnPOrder->billing_user->telhome = preg_replace("/[^0-9]/", "", $billing_address->getTelephone());
|
175 |
-
$RnPOrder->billing_user->telfax = preg_replace("/[^0-9]/", "", $billing_address->getFax());
|
176 |
-
$RnPOrder->billing_user->email = $billing_address->getEmail() == '' ? $order->getCustomer_email() : $billing_address->getEmail();
|
177 |
-
$RnPOrder->billing_user->societe = $billing_address->getCompany();
|
178 |
-
|
179 |
-
if (trim($billing_address->getCompany()) != '') {
|
180 |
-
$RnPOrder->billing_user->set_quality_professional();
|
181 |
-
}
|
182 |
-
|
183 |
-
$RnPOrder->billing_adress->rue1 = $billing_address->getStreet(1);
|
184 |
-
$RnPOrder->billing_adress->rue2 = $billing_address->getStreet(2);
|
185 |
-
$RnPOrder->billing_adress->cpostal = $billing_address->getPostcode();
|
186 |
-
$RnPOrder->billing_adress->ville = $billing_address->getCity();
|
187 |
-
$RnPOrder->billing_adress->pays = $billing_address->getCountry();
|
188 |
-
|
189 |
-
//Zend_Debug::dump(Mage::getModel('fianet/carrier_abstract')->getCode($order->getShippingCarrier()));
|
190 |
-
//$shipping_code = $order->getShippingCarrier()->getCarrierCode();
|
191 |
-
$shipping = Mage::getModel('fianet/shipping_association')->load($order->getShippingCarrier()->getCarrierCode());
|
192 |
-
|
193 |
-
if ($shipping->fianet_shipping_type != '1' && $shipping->fianet_shipping_type != '2') {
|
194 |
-
if (!Fianet_Core_Model_Functions::compare_billing_and_shipping($billing_address, $shipping_address)) {
|
195 |
-
$RnPOrder->delivery_user = Mage::getModel('fianet/fianet_order_user_delivery');
|
196 |
-
$RnPOrder->delivery_adress = Mage::getModel('fianet/fianet_order_adress_delivery');
|
197 |
-
|
198 |
-
$RnPOrder->delivery_user->qualite = $RnPOrder->billing_user->qualite;
|
199 |
-
|
200 |
-
$RnPOrder->delivery_user->nom = $shipping_address->getLastname();
|
201 |
-
$RnPOrder->delivery_user->prenom = $shipping_address->getFirstname();
|
202 |
-
$RnPOrder->delivery_user->telhome = preg_replace("/[^0-9]/", "", $shipping_address->getTelephone());
|
203 |
-
$RnPOrder->delivery_user->telfax = preg_replace("/[^0-9]/", "", $shipping_address->getFax());
|
204 |
-
$RnPOrder->delivery_user->email = $shipping_address->getEmail();
|
205 |
-
$RnPOrder->delivery_user->societe = $shipping_address->getCompany();
|
206 |
-
|
207 |
-
$RnPOrder->delivery_adress->rue1 = $shipping_address->getStreet(1);
|
208 |
-
$RnPOrder->delivery_adress->rue2 = $shipping_address->getStreet(2);
|
209 |
-
$RnPOrder->delivery_adress->cpostal = $shipping_address->getPostcode();
|
210 |
-
$RnPOrder->delivery_adress->ville = $shipping_address->getCity();
|
211 |
-
$RnPOrder->delivery_adress->pays = $shipping_address->getCountry();
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
$RnPOrder->info_commande->refid = $order->getRealOrderId();
|
216 |
-
$RnPOrder->info_commande->devise = $order->getBaseCurrencyCode();
|
217 |
-
$RnPOrder->info_commande->montant = $order->getTotalDue();
|
218 |
-
$RnPOrder->info_commande->ip = $order->getRemoteIp();
|
219 |
-
$RnPOrder->info_commande->timestamp = $order->getCreatedAt();
|
220 |
-
|
221 |
-
$RnPOrder->info_commande->siteid = $configurationData->load('RNP_SITEID')->Value;
|
222 |
-
if ($RnPOrder->info_commande->siteid == null) {
|
223 |
-
$configurationData->setScope(0);
|
224 |
-
$RnPOrder->info_commande->siteid = $configurationData->load('RNP_SITEID')->Value;
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
$RnPOrder->info_commande->transport->type = $shipping->fianet_shipping_type;
|
229 |
-
$RnPOrder->info_commande->transport->nom = $shipping->conveyor_name;
|
230 |
-
$RnPOrder->info_commande->transport->rapidite = $shipping->delivery_times;
|
231 |
-
|
232 |
-
foreach ($order->getAllVisibleItems() as $item) {
|
233 |
-
|
234 |
-
$amount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $item->getBaseTaxAmount() + $item->getBaseWeeeTaxAppliedRowAmount();
|
235 |
-
//Zend_Debug::dump($amount, 'total');
|
236 |
-
//Zend_Debug::dump($item->getProduct_type(), 'product type');
|
237 |
-
|
238 |
-
$pName = $item->getName();
|
239 |
-
$pSku = $item->getSku();
|
240 |
-
if ($item->getProduct_type() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
|
241 |
-
$children_product = $item->getChildrenItems();
|
242 |
-
if (count($children_product) == 1) {
|
243 |
-
$pName = $children_product[0]->getName();
|
244 |
-
$pSku = $children_product[0]->getSku();
|
245 |
-
}
|
246 |
-
}
|
247 |
-
$product = Mage::getModel('fianet/fianet_order_info_productList_product');
|
248 |
-
$product->type = Mage::getModel('fianet/product')->load($item->getProduct_id())->getFianetProductType();
|
249 |
-
$product->prixunit = $amount;
|
250 |
-
$product->name = $pName;
|
251 |
-
$product->nb = (int) $item->getQtyOrdered();
|
252 |
-
$product->ref = $pSku;
|
253 |
-
$RnPOrder->info_commande->list->add_product($product);
|
254 |
-
}
|
255 |
-
|
256 |
-
$RnPOrder->wallet->datelivr = Mage::getModel('fianet/functions')->get_delivery_date(self::getMaxShippingTimes($order), $configurationData, $order->getRealOrderId());
|
257 |
-
return ($RnPOrder);
|
258 |
-
}
|
259 |
-
|
260 |
-
protected static function getMaxShippingTimes(Mage_Sales_Model_Order $order) {
|
261 |
-
$times = 0;
|
262 |
-
$scope_field = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
263 |
-
switch ($scope_field) {
|
264 |
-
case ('store_id'):
|
265 |
-
$store_id = $order->getStore()->getId();
|
266 |
-
break;
|
267 |
-
case ('group_id'):
|
268 |
-
$store_id = $order->getStore()->getGroup()->getId();
|
269 |
-
break;
|
270 |
-
case ('website_id'):
|
271 |
-
$store_id = $order->getStore()->getWebsite()->getId();
|
272 |
-
break;
|
273 |
-
default:
|
274 |
-
$store_id = $order->getStore()->getGroup()->getId();
|
275 |
-
break;
|
276 |
-
}
|
277 |
-
//Récupération du délais de livraison de chaque produit
|
278 |
-
foreach ($order->getAllItems() as $item) {
|
279 |
-
$productTime = Mage::getModel('receiveandpay/product')
|
280 |
-
->setQty($item->getQty())
|
281 |
-
->setProductId($item->getProduct_id())
|
282 |
-
->setStoreId($store_id)
|
283 |
-
->GetShippingTimes();
|
284 |
-
if ($productTime > $times) {//on conserve le délai de livraison le plus long
|
285 |
-
$times = $productTime;
|
286 |
-
}
|
287 |
-
}
|
288 |
-
//Gestion du délais de livraison par transporteur
|
289 |
-
$shipping_code = $order->getShippingCarrier()->getCarrierCode();
|
290 |
-
$transport_times_configured = Mage::getModel('receiveandpay/shipping_transport_times')
|
291 |
-
->setScope($store_id)
|
292 |
-
->load($shipping_code);
|
293 |
-
$transport_times = $transport_times_configured->getShipping_times() == '' ? 0 : $transport_times_configured->getShipping_times();
|
294 |
-
if ($transport_times == 0 && $store_id > 0) {
|
295 |
-
$transport_times_configured = Mage::getModel('receiveandpay/shipping_transport_times')
|
296 |
-
->setScope(0)
|
297 |
-
->load($shipping_code);
|
298 |
-
$transport_times = $transport_times_configured->getShipping_times() == '' ? 0 : $transport_times_configured->getShipping_times();
|
299 |
-
}
|
300 |
-
if ($transport_times > $times) {//si le délais de livraison transporteur est plus long que le délais de livraison produit, on utilise le délais de livraison transporteur
|
301 |
-
$times = $transport_times;
|
302 |
-
}
|
303 |
-
|
304 |
-
return ($times);
|
305 |
-
}
|
306 |
-
|
307 |
-
public function optionPaiementConfig($type, $comptantrnp, $comptantrnpoffert) {
|
308 |
-
$this->optionpaiement->typpayment = $type;
|
309 |
-
$this->optionpaiement->comptantrnp = $comptantrnp;
|
310 |
-
$this->optionpaiement->comptantrnpoffert = $comptantrnpoffert;
|
311 |
-
}
|
312 |
-
|
313 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/Sac.php
DELETED
@@ -1,191 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Sac {
|
19 |
-
|
20 |
-
public $billing_user = null;
|
21 |
-
public $billing_adress = null;
|
22 |
-
public $info_commande = null;
|
23 |
-
public $payment = null;
|
24 |
-
public $delivery_user = null;
|
25 |
-
public $delivery_adress = null;
|
26 |
-
public $scope_field = null;
|
27 |
-
public $scope_id = null;
|
28 |
-
protected $version = null;
|
29 |
-
protected $encoding = null;
|
30 |
-
|
31 |
-
public function __construct() {
|
32 |
-
$this->billing_user = Mage::getModel('fianet/fianet_order_user_billing');
|
33 |
-
$this->billing_adress = Mage::getModel('fianet/fianet_order_adress_billing');
|
34 |
-
$this->info_commande = Mage::getModel('fianet/fianet_order_info_sac');
|
35 |
-
$this->payment = Mage::getModel('fianet/fianet_order_payment');
|
36 |
-
$this->version = (string) Mage::getConfig()->getModuleConfig('Fianet_Sac')->version;
|
37 |
-
$this->encoding = (string) Mage::getModel('fianet/configuration')->getGlobalValue('XML_ENCODING');
|
38 |
-
}
|
39 |
-
|
40 |
-
public function reset() {
|
41 |
-
$this->billing_user = Mage::getModel('fianet/fianet_order_user_billing');
|
42 |
-
$this->billing_adress = Mage::getModel('fianet/fianet_order_adress_billing');
|
43 |
-
$this->info_commande = Mage::getModel('fianet/fianet_order_info_sac');
|
44 |
-
$this->payment = Mage::getModel('fianet/fianet_order_payment');
|
45 |
-
$this->delivery_user = null;
|
46 |
-
$this->delivery_adress = null;
|
47 |
-
}
|
48 |
-
|
49 |
-
public function get_xml($display_signature = false) {
|
50 |
-
$xml = '';
|
51 |
-
if ($display_signature) {
|
52 |
-
$xml .= '<?xml version="1.0" encoding="' . $this->encoding . '" ?>' . "\n";
|
53 |
-
}
|
54 |
-
$xml .= '<control fianetmodule="Magento_SAC" version="' . $this->version . '">' . "\n";
|
55 |
-
$xml .= $this->billing_user->get_xml();
|
56 |
-
$xml .= $this->billing_adress->get_xml();
|
57 |
-
if ($this->delivery_user != null) {
|
58 |
-
if (Mage::getModel('fianet/functions')->var_is_object_of_class($this->delivery_user, 'Fianet_Core_Model_Fianet_Order_User_Delivery')) {
|
59 |
-
$xml .= $this->delivery_user->get_xml();
|
60 |
-
} else {
|
61 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Sac - get_xml() <br />\nDelivery user is not an object of type Mage_Fianet_Order_User_Delivery");
|
62 |
-
}
|
63 |
-
}
|
64 |
-
if ($this->delivery_adress != null) {
|
65 |
-
if (Mage::getModel('fianet/functions')->var_is_object_of_class($this->delivery_adress, 'Fianet_Core_Model_Fianet_Order_Adress_Delivery')) {
|
66 |
-
$xml .= $this->delivery_adress->get_xml();
|
67 |
-
} else {
|
68 |
-
Mage::getModel('fianet/log')->Log("Mage_Fianet_Model_Fianet_Order_Sac - get_xml() <br />\nDelivery adress is not an object of type Mage_Fianet_Order_Adress_Delivery");
|
69 |
-
}
|
70 |
-
}
|
71 |
-
$xml .= $this->info_commande->get_xml();
|
72 |
-
$xml .= $this->payment->get_xml();
|
73 |
-
$xml .= '</control>';
|
74 |
-
//Zend_Debug::dump($xml);exit();
|
75 |
-
return ($xml);
|
76 |
-
}
|
77 |
-
|
78 |
-
public static function GenerateSacOrder(Mage_Sales_Model_Order $order) {
|
79 |
-
$scope_field = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
80 |
-
switch ($scope_field) {
|
81 |
-
case ('store_id'):
|
82 |
-
$id = $order->getStore()->getId();
|
83 |
-
break;
|
84 |
-
case ('group_id'):
|
85 |
-
$id = $order->getStore()->getGroup()->getId();
|
86 |
-
break;
|
87 |
-
case ('website_id'):
|
88 |
-
$id = $order->getStore()->getWebsite()->getId();
|
89 |
-
break;
|
90 |
-
default:
|
91 |
-
$id = $order->getStore()->getGroup()->getId();
|
92 |
-
break;
|
93 |
-
}
|
94 |
-
$configurationData = Mage::getModel('fianet/configuration_value');
|
95 |
-
$configurationData->_scope_field = $scope_field;
|
96 |
-
$configurationData->setScope($id);
|
97 |
-
|
98 |
-
$SacOrder = Mage::getModel('fianet/fianet_order_sac');
|
99 |
-
|
100 |
-
$SacOrder->scope_field = $scope_field;
|
101 |
-
$SacOrder->scope_id = $id;
|
102 |
-
|
103 |
-
$billing_address = $order->getBillingAddress();
|
104 |
-
$shipping_address = $order->getShippingAddress();
|
105 |
-
//Zend_Debug::dump($billing_address,'$billing_address');
|
106 |
-
$SacOrder->billing_user->nom = $billing_address->getLastname();
|
107 |
-
$SacOrder->billing_user->prenom = $billing_address->getFirstname();
|
108 |
-
$SacOrder->billing_user->telhome = preg_replace("/[^0-9]/", "", $billing_address->getTelephone());
|
109 |
-
$SacOrder->billing_user->telfax = preg_replace("/[^0-9]/", "", $billing_address->getFax());
|
110 |
-
$SacOrder->billing_user->email = $billing_address->getEmail() == '' ? $order->getCustomer_email() : $billing_address->getEmail();
|
111 |
-
$SacOrder->billing_user->societe = $billing_address->getCompany();
|
112 |
-
|
113 |
-
if (trim($billing_address->getCompany()) != '') {
|
114 |
-
$SacOrder->billing_user->set_quality_professional();
|
115 |
-
}
|
116 |
-
|
117 |
-
$SacOrder->billing_adress->rue1 = $billing_address->getStreet(1);
|
118 |
-
$SacOrder->billing_adress->rue2 = $billing_address->getStreet(2);
|
119 |
-
$SacOrder->billing_adress->cpostal = $billing_address->getPostcode();
|
120 |
-
$SacOrder->billing_adress->ville = $billing_address->getCity();
|
121 |
-
$SacOrder->billing_adress->pays = $billing_address->getCountry();
|
122 |
-
|
123 |
-
//Zend_Debug::dump(Mage::getModel('fianet/carrier_abstract')->getCode($order->getShippingCarrier()));
|
124 |
-
$shipping_code = $order->getShippingCarrier()->getCarrierCode();
|
125 |
-
$shipping = Mage::getModel('fianet/shipping_association')->load($shipping_code);
|
126 |
-
|
127 |
-
if ($shipping->fianet_shipping_type != '1' && $shipping->fianet_shipping_type != '2') {
|
128 |
-
if (!Fianet_Core_Model_Functions::compare_billing_and_shipping($billing_address, $shipping_address)) {
|
129 |
-
$SacOrder->delivery_user = Mage::getModel('fianet/fianet_order_user_delivery');
|
130 |
-
$SacOrder->delivery_adress = Mage::getModel('fianet/fianet_order_adress_delivery');
|
131 |
-
|
132 |
-
$SacOrder->delivery_user->qualite = $SacOrder->billing_user->qualite;
|
133 |
-
|
134 |
-
$SacOrder->delivery_user->nom = $shipping_address->getLastname();
|
135 |
-
$SacOrder->delivery_user->prenom = $shipping_address->getFirstname();
|
136 |
-
$SacOrder->delivery_user->telhome = preg_replace("/[^0-9]/", "", $shipping_address->getTelephone());
|
137 |
-
$SacOrder->delivery_user->telfax = preg_replace("/[^0-9]/", "", $shipping_address->getFax());
|
138 |
-
$SacOrder->delivery_user->email = $shipping_address->getEmail();
|
139 |
-
$SacOrder->delivery_user->societe = $shipping_address->getCompany();
|
140 |
-
|
141 |
-
$SacOrder->delivery_adress->rue1 = $shipping_address->getStreet(1);
|
142 |
-
$SacOrder->delivery_adress->rue2 = $shipping_address->getStreet(2);
|
143 |
-
$SacOrder->delivery_adress->cpostal = $shipping_address->getPostcode();
|
144 |
-
$SacOrder->delivery_adress->ville = $shipping_address->getCity();
|
145 |
-
$SacOrder->delivery_adress->pays = $shipping_address->getCountry();
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
$SacOrder->info_commande->refid = $order->getRealOrderId();
|
150 |
-
$SacOrder->info_commande->devise = $order->getBaseCurrencyCode();
|
151 |
-
$SacOrder->info_commande->montant = $order->getBaseGrandTotal();
|
152 |
-
$SacOrder->info_commande->ip = $order->getRemoteIp();
|
153 |
-
$SacOrder->info_commande->timestamp = $order->getCreatedAt();
|
154 |
-
|
155 |
-
$SacOrder->info_commande->siteid = $configurationData->load('SAC_SITEID')->Value;
|
156 |
-
if ($SacOrder->info_commande->siteid == null) {
|
157 |
-
$configurationData->setScope(0);
|
158 |
-
$SacOrder->info_commande->siteid = $configurationData->load('SAC_SITEID')->Value;
|
159 |
-
}
|
160 |
-
|
161 |
-
|
162 |
-
$SacOrder->info_commande->transport->type = $shipping->fianet_shipping_type;
|
163 |
-
$SacOrder->info_commande->transport->nom = $shipping->conveyor_name;
|
164 |
-
$SacOrder->info_commande->transport->rapidite = $shipping->delivery_times;
|
165 |
-
|
166 |
-
foreach ($order->getAllVisibleItems() as $item) {
|
167 |
-
$pAmount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $item->getBaseTaxAmount() + $item->getBaseWeeeTaxAppliedRowAmount();
|
168 |
-
|
169 |
-
$pName = $item->getName();
|
170 |
-
$pSku = $item->getSku();
|
171 |
-
if ($item->getProduct_type() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
|
172 |
-
$children_product = $item->getChildrenItems();
|
173 |
-
if (count($children_product) == 1) {
|
174 |
-
$pName = $children_product[0]->getName();
|
175 |
-
$pSku = $children_product[0]->getSku();
|
176 |
-
}
|
177 |
-
}
|
178 |
-
$product = Mage::getModel('fianet/fianet_order_info_productList_product');
|
179 |
-
$product->type = Mage::getModel('fianet/product')->load($item->getProduct_id())->getFianetProductType();
|
180 |
-
$product->prixunit = $pAmount;
|
181 |
-
$product->name = $pName;
|
182 |
-
$product->nb = (int) $item->getQtyOrdered();
|
183 |
-
$product->ref = $pSku;
|
184 |
-
$SacOrder->info_commande->list->add_product($product);
|
185 |
-
}
|
186 |
-
$SacOrder->payment->type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
|
187 |
-
|
188 |
-
return ($SacOrder);
|
189 |
-
}
|
190 |
-
|
191 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Order/User/Base.php
CHANGED
@@ -1,84 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_User_Base {
|
19 |
-
|
20 |
-
protected $
|
21 |
-
//Qualité des clients par défaut
|
22 |
-
public $qualite = 2;
|
23 |
-
public $titre;
|
24 |
-
public $nom;
|
25 |
-
public $prenom;
|
26 |
-
public $societe;
|
27 |
-
public $telhome;
|
28 |
-
public $teloffice;
|
29 |
-
public $telmobile;
|
30 |
-
public $telfax;
|
31 |
-
public $email;
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$this->qualite
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$xml .= "\t\t" . '<
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
}
|
79 |
-
$xml .= "\t" . '</utilisateur>' . "\n";
|
80 |
-
|
81 |
-
return ($xml);
|
82 |
-
}
|
83 |
-
|
84 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_User_Base {
|
19 |
+
|
20 |
+
protected $_type;
|
21 |
+
//Qualité des clients par défaut
|
22 |
+
public $qualite = 2;
|
23 |
+
public $titre;
|
24 |
+
public $nom;
|
25 |
+
public $prenom;
|
26 |
+
public $societe;
|
27 |
+
public $telhome;
|
28 |
+
public $teloffice;
|
29 |
+
public $telmobile;
|
30 |
+
public $telfax;
|
31 |
+
public $email;
|
32 |
+
|
33 |
+
public function setQualityProfessional() {
|
34 |
+
$this->qualite = 1;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function setQualityNotProfessional() {
|
38 |
+
$this->qualite = 2;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getXml() {
|
42 |
+
$xml = '';
|
43 |
+
$xml .= "\t" . '<utilisateur type="' . $this->_type . '" qualite="' . $this->qualite . '">' . "\n";
|
44 |
+
if ($this->titre != '') {
|
45 |
+
if ($this->titre == 'f') {
|
46 |
+
$this->titre = 'mme';
|
47 |
+
}
|
48 |
+
$xml .= "\t\t" . '<nom titre="' . $this->titre . '"><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->nom) . ']]></nom>' . "\n";
|
49 |
+
} else {
|
50 |
+
$xml .= "\t\t" . '<nom><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->nom) . ']]></nom>' . "\n";
|
51 |
+
}
|
52 |
+
$xml .= "\t\t" . '<prenom><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->prenom) . ']]></prenom>' . "\n";
|
53 |
+
//company not used in the first time for fianet
|
54 |
+
/*if ($this->societe != '') {
|
55 |
+
$xml .= "\t\t" . '<societe><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->societe) . ']]></societe>' . "\n";
|
56 |
+
}*/
|
57 |
+
if ($this->telhome != '') {
|
58 |
+
$xml .= "\t\t" . '<telhome><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->telhome) . ']]></telhome>' . "\n";
|
59 |
+
}
|
60 |
+
if ($this->teloffice != '') {
|
61 |
+
$xml .= "\t\t" . '<teloffice><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->teloffice) . ']]></teloffice>' . "\n";
|
62 |
+
}
|
63 |
+
if ($this->telmobile != '') {
|
64 |
+
$xml .= "\t\t" . '<telmobile><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->telmobile) . ']]></telmobile>' . "\n";
|
65 |
+
}
|
66 |
+
if ($this->telfax != '') {
|
67 |
+
$xml .= "\t\t" . '<telfax><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->telfax) . ']]></telfax>' . "\n";
|
68 |
+
}
|
69 |
+
if ($this->email != '') {
|
70 |
+
$xml .= "\t\t" . '<email><![CDATA[' . Mage::getModel('fianet/functions')->cleanInvalidChar($this->email) . ']]></email>' . "\n";
|
71 |
+
}
|
72 |
+
|
73 |
+
$xml .= "\t" . '</utilisateur>' . "\n";
|
74 |
+
|
75 |
+
return ($xml);
|
76 |
+
}
|
77 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/User/Billing.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_User_Billing extends Fianet_Core_Model_Fianet_Order_User_Base {
|
19 |
-
|
20 |
-
public function __construct(
|
21 |
-
$this->
|
22 |
-
}
|
23 |
-
|
24 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_User_Billing extends Fianet_Core_Model_Fianet_Order_User_Base {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->_type = 'facturation';
|
22 |
+
}
|
23 |
+
|
24 |
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/User/Delivery.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_User_Delivery extends Fianet_Core_Model_Fianet_Order_User_Base {
|
19 |
-
|
20 |
-
public function __construct(
|
21 |
-
$this->
|
22 |
-
}
|
23 |
-
|
24 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_User_Delivery extends Fianet_Core_Model_Fianet_Order_User_Base {
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->_type = 'livraison';
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Fianet/Core/Model/Fianet/Order/User/Siteconso.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Order_User_Siteconso {
|
@@ -26,7 +26,7 @@ class Fianet_Core_Model_Fianet_Order_User_Siteconso {
|
|
26 |
|
27 |
}
|
28 |
|
29 |
-
public function
|
30 |
$xml = '';
|
31 |
if ($this->nb > 0) {
|
32 |
$xml .= "\t\t" . '<siteconso>' . "\n";
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Order_User_Siteconso {
|
26 |
|
27 |
}
|
28 |
|
29 |
+
public function getXml() {
|
30 |
$xml = '';
|
31 |
if ($this->nb > 0) {
|
32 |
$xml .= "\t\t" . '<siteconso>' . "\n";
|
app/code/community/Fianet/Core/Model/Fianet/Order/Wallet.php
CHANGED
@@ -1,67 +1,57 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Order_Wallet {
|
19 |
-
|
20 |
-
protected $
|
21 |
-
|
22 |
-
protected $
|
23 |
-
protected $
|
24 |
-
protected $
|
25 |
-
|
26 |
-
|
27 |
-
public function __construct() {
|
28 |
-
|
29 |
-
$this->
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
$
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$xml = '';
|
40 |
-
|
41 |
-
$xml .= "\t" . '<
|
42 |
-
$xml .= "\t\t" . '<
|
43 |
-
$xml .= "\t
|
44 |
-
$xml
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
if ($cryptkey == '' && $store > 0) {
|
59 |
-
$cryptkey = Mage::getModel('fianet/configuration')->GetStoreValue('RNP_CRYPT_KEY', 0);
|
60 |
-
}
|
61 |
-
|
62 |
-
|
63 |
-
$encodingKey = Mage::getModel('fianet/fianet_EncodingKey');
|
64 |
-
$this->crypt = $encodingKey->giveHashCode2($cryptkey, $this->order_date_time_seconds, $customer_email, $order_id, $total, $billing_lastname);
|
65 |
-
}
|
66 |
-
|
67 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Order_Wallet {
|
19 |
+
|
20 |
+
protected $_version = '1.0';
|
21 |
+
protected $_dateCom = null;
|
22 |
+
protected $_crypt = null;
|
23 |
+
protected $_cryptVersion = '2.0';
|
24 |
+
protected $_orderDateTimeSeconds = null;
|
25 |
+
public $dateLivr = null;
|
26 |
+
|
27 |
+
public function __construct() {
|
28 |
+
$this->_dateCom = Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s');
|
29 |
+
$this->_orderDateTimeSeconds = substr($this->_dateCom, -2, 2);
|
30 |
+
}
|
31 |
+
|
32 |
+
public function generateWalletCryptData($orderId, $billingLastname, $customerEmail, $total) {
|
33 |
+
$total = number_format($total, 2, '.', '');
|
34 |
+
$this->_generateCryptKey($orderId, $billingLastname, $customerEmail, $total);
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getXml() {
|
38 |
+
$xml = '';
|
39 |
+
$xml .= "\t" . '<wallet version="' . $this->_version . '">' . "\n";
|
40 |
+
$xml .= "\t\t" . '<datelivr><![CDATA[' . $this->dateLivr . ']]></datelivr>' . "\n";
|
41 |
+
$xml .= "\t\t" . '<datecom><![CDATA[' . $this->_dateCom . ']]></datecom>' . "\n";
|
42 |
+
$xml .= "\t\t" . '<crypt version="' . $this->_cryptVersion . '"><![CDATA[' . $this->_crypt . ']]></crypt>' . "\n";
|
43 |
+
$xml .= "\t" . '</wallet>' . "\n";
|
44 |
+
return ($xml);
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _generateCryptKey($orderId, $billingLastname, $customerEmail, $total) {
|
48 |
+
if (Mage::getStoreConfig('kwixo/kwixoconfg/charset') == 'UTF-8') {
|
49 |
+
$billingLastname = utf8_decode($billingLastname);
|
50 |
+
}
|
51 |
+
$store = Mage::getModel('fianet/functions')->getStore();
|
52 |
+
$cryptkey = Mage::getStoreConfig('kwixo/kwixoconfg/cryptkey', $store);
|
53 |
+
$encodingKey = Mage::getModel('fianet/fianet_encodingKey');
|
54 |
+
$this->_crypt = $encodingKey->giveHashCode2($cryptkey, $this->_orderDateTimeSeconds, $customerEmail, $orderId, $total, $billingLastname);
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/Model/Fianet/Paramcallback/Builder.php
CHANGED
@@ -10,41 +10,37 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Paramcallback_Builder {
|
19 |
|
20 |
-
protected $
|
21 |
|
22 |
public function __construct() {
|
23 |
|
24 |
}
|
25 |
|
26 |
-
public function
|
27 |
-
if (
|
28 |
-
$this->
|
29 |
} else {
|
30 |
Mage::getModel('fianet/log')->Log("Erreur : le parametre n'est pas un objet Fianet_Core_Model_Fianet_Paramcallback_Element mais un objet : " . get_class($param));
|
31 |
}
|
32 |
}
|
33 |
|
34 |
-
public function
|
35 |
$xml = '';
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
<ParamCBack>' . "\n";
|
40 |
-
|
41 |
-
foreach ($this->param_list as $param) {
|
42 |
-
$xml .= $param->get_xml();
|
43 |
}
|
44 |
-
|
45 |
$xml .= '</ParamCBack>' . "\n";
|
46 |
}
|
47 |
-
|
48 |
return($xml);
|
49 |
}
|
50 |
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Paramcallback_Builder {
|
19 |
|
20 |
+
protected $_paramList = array();
|
21 |
|
22 |
public function __construct() {
|
23 |
|
24 |
}
|
25 |
|
26 |
+
public function addParam($param) {
|
27 |
+
if ($param instanceof Fianet_Core_Model_Fianet_Paramcallback_Element) {
|
28 |
+
$this->_paramList[] = $param;
|
29 |
} else {
|
30 |
Mage::getModel('fianet/log')->Log("Erreur : le parametre n'est pas un objet Fianet_Core_Model_Fianet_Paramcallback_Element mais un objet : " . get_class($param));
|
31 |
}
|
32 |
}
|
33 |
|
34 |
+
public function getXml() {
|
35 |
$xml = '';
|
36 |
+
if (count($this->_paramList) > 0) {
|
37 |
+
$xml .= '<?xml version="1.0" encoding="' . Mage::getStoreConfig('kwixo/kwixoconfg/charset', 0) . '" ?><ParamCBack>' . "\n";
|
38 |
|
39 |
+
foreach ($this->_paramList as $param) {
|
40 |
+
$xml .= $param->getXml();
|
|
|
|
|
|
|
|
|
41 |
}
|
|
|
42 |
$xml .= '</ParamCBack>' . "\n";
|
43 |
}
|
|
|
44 |
return($xml);
|
45 |
}
|
46 |
|
app/code/community/Fianet/Core/Model/Fianet/Paramcallback/Element.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Paramcallback_Element {
|
@@ -30,7 +30,7 @@ class Fianet_Core_Model_Fianet_Paramcallback_Element {
|
|
30 |
return $this;
|
31 |
}
|
32 |
|
33 |
-
public function
|
34 |
$xml = "\t" . '<obj>' . "\n";
|
35 |
$xml .= "\t\t" . '<name>' . $this->name . '</name>' . "\n";
|
36 |
$xml .= "\t\t" . '<value>' . $this->value . '</value>' . "\n";
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Paramcallback_Element {
|
30 |
return $this;
|
31 |
}
|
32 |
|
33 |
+
public function getXml() {
|
34 |
$xml = "\t" . '<obj>' . "\n";
|
35 |
$xml .= "\t\t" . '<name>' . $this->name . '</name>' . "\n";
|
36 |
$xml .= "\t\t" . '<value>' . $this->value . '</value>' . "\n";
|
app/code/community/Fianet/Core/Model/Fianet/Parser.php
CHANGED
@@ -1,157 +1,153 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Fianet_Parser {
|
19 |
-
|
20 |
-
public function
|
21 |
-
$evaluations = array();
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
$index =
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
$index =
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
$index
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
if ($transaction['attr']['avancement'] == '
|
137 |
-
$eval['refid'] = isset($transaction['attr']['refid']) == true ? $transaction['attr']['refid'] : null;
|
138 |
-
$eval['eval'] = '
|
139 |
-
$eval['info'] = $transaction['detail']['value'];
|
140 |
-
$eval['cid'] =
|
141 |
-
|
142 |
-
|
143 |
-
$eval['refid'] = isset($transaction['attr']['refid']) == true ? $transaction['attr']['refid'] : null;
|
144 |
-
$eval['eval'] = '
|
145 |
-
$eval['info'] = $transaction['
|
146 |
-
$eval['cid'] = '';
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
return ($eval);
|
155 |
-
}
|
156 |
-
|
157 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Fianet_Parser {
|
19 |
+
|
20 |
+
public function processResult($xmlArray) {
|
21 |
+
$evaluations = array();
|
22 |
+
if (isset($xmlArray['stack']['result'][0])) {
|
23 |
+
foreach ($xmlArray['stack']['result'] as $result) {
|
24 |
+
if (preg_match("#error#", $result['attr']['retour'])) {
|
25 |
+
Mage::getModel('fianet/log')->log("Parser.php - processResult() - Erreur : " . $result['attr']['message']);
|
26 |
+
} else {
|
27 |
+
$index = count($evaluations);
|
28 |
+
$evaluations[$index] = $this->_processResultArray($result);
|
29 |
+
}
|
30 |
+
}
|
31 |
+
} else {
|
32 |
+
$res = $xmlArray['stack']['result'];
|
33 |
+
if (preg_match("#error#", $res['attr']['retour'])) {
|
34 |
+
Mage::getModel('fianet/log')->log("Parser.php - processResult() - Erreur : " . $res['attr']['message']);
|
35 |
+
} else {
|
36 |
+
$index = count($evaluations);
|
37 |
+
$evaluations[$index] = $this->_processResultArray($res);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
return ($evaluations);
|
41 |
+
}
|
42 |
+
|
43 |
+
public function processResultStacking($xml_data) {
|
44 |
+
$result = array();
|
45 |
+
$xmlArray = Fianet_Core_Model_Functions::xml2array($xml_data);
|
46 |
+
if (isset($xmlArray['validstack']['unluck'])) {
|
47 |
+
Mage::getModel('fianet/log')->log("Parser - processResultStacking() - Error : " . $xmlArray['validstack']['unluck']['value']);
|
48 |
+
return ($result);
|
49 |
+
} elseif (isset($xmlArray['validstack']['result'])) {
|
50 |
+
$xmlArray = $xmlArray['validstack']['result'];
|
51 |
+
if (isset($xmlArray[0])) {
|
52 |
+
foreach ($xmlArray as $transaction_result) {
|
53 |
+
$index = count($result);
|
54 |
+
$result[$index]['refid'] = $transaction_result['attr']['refid'];
|
55 |
+
$result[$index]['etat'] = $transaction_result['attr']['avancement'];
|
56 |
+
$result[$index]['details'] = $transaction_result['detail']['value'];
|
57 |
+
}
|
58 |
+
} else {
|
59 |
+
$index = count($result);
|
60 |
+
$result[$index]['refid'] = $xmlArray['attr']['refid'];
|
61 |
+
$result[$index]['etat'] = $xmlArray['attr']['avancement'];
|
62 |
+
$result[$index]['details'] = $xmlArray['detail']['value'];
|
63 |
+
}
|
64 |
+
}
|
65 |
+
return ($result);
|
66 |
+
}
|
67 |
+
|
68 |
+
public function processResultNostack($xmlArray) {
|
69 |
+
$evaluations = array();
|
70 |
+
Mage::getModel('fianet/log')->log('Parser->processResultNostack(), return value : ' . $xmlArray['result']['attr']['retour']);
|
71 |
+
if ($xmlArray['result']['attr']['retour'] == 'absente') {
|
72 |
+
return ($evaluations);
|
73 |
+
}
|
74 |
+
if ($xmlArray['result']['attr']['retour'] == 'param_error') {
|
75 |
+
Mage::getModel('fianet/log')->log('Parser->processResultNostack(), param error : ' . $xmlArray['result']['attr']['message']);
|
76 |
+
return ($evaluations);
|
77 |
+
}
|
78 |
+
if (isset($xmlArray['result']['transaction'][0])) {
|
79 |
+
foreach ($xmlArray['result']['transaction'] as $res) {
|
80 |
+
$eval = $this->_processTransactionArray($res);
|
81 |
+
if ($eval['refid'] != null) {
|
82 |
+
$evaluations[$eval['refid']] = $eval;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
} elseif (isset($xmlArray['result']['transaction'])) {
|
86 |
+
$res = $xmlArray['result']['transaction'];
|
87 |
+
$eval = $this->_processTransactionArray($res);
|
88 |
+
if ($eval['refid'] != null) {
|
89 |
+
$evaluations[$eval['refid']] = $eval;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
return ($evaluations);
|
94 |
+
}
|
95 |
+
|
96 |
+
private function _processResultArray($res) {
|
97 |
+
$eval = array('refid' => $res['attr']['refid']);
|
98 |
+
if ($res['attr']['retour'] == 'absente') {
|
99 |
+
$eval['info'] = 'absente';
|
100 |
+
} else {
|
101 |
+
if (isset($res['transaction'][0])) {
|
102 |
+
$index = $this->_searchLastValidTransaction($res['transaction']);
|
103 |
+
$transaction = $index >= 0 ? $res['transaction'][$index] : end($res['transaction']);
|
104 |
+
} else {
|
105 |
+
$transaction = $res['transaction'];
|
106 |
+
}
|
107 |
+
$etat = $this->_processTransactionArray($transaction);
|
108 |
+
$eval['eval'] = $etat['eval'];
|
109 |
+
$eval['info'] = $etat['info'];
|
110 |
+
$eval['cid'] = $etat['cid'];
|
111 |
+
$eval['classementid'] = $etat['classementid'];
|
112 |
+
}
|
113 |
+
return ($eval);
|
114 |
+
}
|
115 |
+
|
116 |
+
private function _searchLastValidTransaction($transactions) {
|
117 |
+
$index = -1;
|
118 |
+
foreach ($transactions as $i => $transaction) {
|
119 |
+
if ($transaction['attr']['avancement'] == 'traitee') {
|
120 |
+
$index = $i;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
return ($index);
|
124 |
+
}
|
125 |
+
|
126 |
+
private function _processTransactionArray($transaction) {
|
127 |
+
|
128 |
+
$eval = array();
|
129 |
+
|
130 |
+
if ($transaction['attr']['avancement'] == 'error') {
|
131 |
+
$eval['refid'] = isset($transaction['attr']['refid']) == true ? $transaction['attr']['refid'] : null;
|
132 |
+
$eval['eval'] = 'error';
|
133 |
+
$eval['info'] = $transaction['detail']['value'];
|
134 |
+
$eval['cid'] = $transaction['attr']['cid'];
|
135 |
+
$eval['classementid'] = '';
|
136 |
+
}else if ($transaction['attr']['avancement'] == 'encours') {
|
137 |
+
$eval['refid'] = isset($transaction['attr']['refid']) == true ? $transaction['attr']['refid'] : null;
|
138 |
+
$eval['eval'] = 'encours';
|
139 |
+
$eval['info'] = $transaction['detail']['value'];
|
140 |
+
$eval['cid'] = '';
|
141 |
+
$eval['classementid'] = '';
|
142 |
+
} elseif ($transaction['attr']['avancement'] == 'traitee') {
|
143 |
+
$eval['refid'] = isset($transaction['attr']['refid']) == true ? $transaction['attr']['refid'] : null;
|
144 |
+
$eval['eval'] = $transaction['analyse']['eval']['value'];
|
145 |
+
$eval['info'] = $transaction['analyse']['eval']['attr']['info'];
|
146 |
+
$eval['cid'] = $transaction['attr']['cid'];
|
147 |
+
$eval['classementid'] = $transaction['analyse']['classement']['attr']['id'];
|
148 |
+
}
|
149 |
+
|
150 |
+
return ($eval);
|
151 |
+
}
|
152 |
+
|
|
|
|
|
|
|
|
|
153 |
}
|
app/code/community/Fianet/Core/Model/Fianet/Sender.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Sender {
|
@@ -22,10 +22,10 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
22 |
protected $sites_conf = array();
|
23 |
|
24 |
public function __construct() {
|
25 |
-
$this->encoding =
|
26 |
}
|
27 |
|
28 |
-
public function
|
29 |
$this->orders[$order->info_commande->siteid][] = $order;
|
30 |
if (!isset($this->sites_configuration[$order->info_commande->siteid])) {
|
31 |
$this->sites_conf[$order->info_commande->siteid]['scope_field'] = $order->scope_field;
|
@@ -34,15 +34,14 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
34 |
}
|
35 |
|
36 |
public function send() {
|
37 |
-
$stacks = $this->
|
38 |
$responses = array();
|
39 |
foreach ($stacks as $siteid => $stacksof25) {
|
40 |
-
$url = $this->
|
41 |
foreach ($stacksof25 as $stack) {
|
42 |
$params = array('siteid' => $siteid, 'controlcallback' => $stack);
|
43 |
-
$response = $this->
|
44 |
-
|
45 |
-
$response = Mage::getModel('fianet/fianet_parser')->process_result_stacking($response->getBody());
|
46 |
if (is_array($response)) {
|
47 |
$responses = array_merge($responses, $response);
|
48 |
}
|
@@ -51,72 +50,56 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
51 |
return ($responses);
|
52 |
}
|
53 |
|
54 |
-
public function
|
55 |
-
$ConfigurationScope = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
56 |
-
//Zend_Debug::dump($ConfigurationScope, 'ConfigurationScope');
|
57 |
$sites = array();
|
58 |
$websiteCollection = Mage::getModel('core/website')->getResourceCollection();
|
59 |
foreach ($websiteCollection as $website) {
|
60 |
$groupCollection = $website->getGroupCollection();
|
61 |
foreach ($groupCollection as $group) {
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
$sites[$index]['siteid'] = $configurationData->load('SAC_SITEID')->getValue();
|
82 |
-
$sites[$index]['password'] = $configurationData->load('SAC_PASSWORD')->getValue();
|
83 |
-
$sites[$index]['mode'] = $configurationData->load('SAC_STATUS')->getValue();
|
84 |
-
if ($sites[$index]['siteid'] === NULL) {
|
85 |
-
$configurationData->setScope(0);
|
86 |
-
$sites[$index]['siteid'] = $configurationData->load('SAC_SITEID')->getValue();
|
87 |
-
$sites[$index]['password'] = $configurationData->load('SAC_PASSWORD')->getValue();
|
88 |
-
$sites[$index]['mode'] = $configurationData->load('SAC_STATUS')->getValue();
|
89 |
-
if ($sites[$index]['siteid'] === NULL || $sites[$index]['password'] === NULL) {
|
90 |
-
unset($sites[$index]);
|
91 |
-
}
|
92 |
-
}
|
93 |
}
|
94 |
}
|
95 |
}
|
96 |
$reevaluations = array();
|
|
|
97 |
foreach ($sites as $infos) {
|
98 |
-
$url = $this->
|
99 |
-
//$infos['siteid'] = 0;
|
100 |
$params = array(
|
101 |
'SiteID' => $infos['siteid'],
|
102 |
'Pwd' => $infos['password'],
|
103 |
'Mode' => 'new',
|
104 |
'Output' => 'new',
|
105 |
-
//'Mode' => 'old',
|
106 |
-
//'Output' => 'old',
|
107 |
'RepFT' => '0'
|
108 |
);
|
109 |
-
|
110 |
-
$response = $this->
|
111 |
$xml_array = Fianet_Core_Model_Functions::xml2array($response->getBody());
|
112 |
-
$reevals = Mage::getModel('fianet/fianet_parser')->
|
113 |
$reevaluations = array_merge($reevaluations, $reevals);
|
114 |
}
|
115 |
-
|
116 |
return ($reevaluations);
|
117 |
}
|
118 |
|
119 |
-
protected function
|
120 |
$infos = array();
|
121 |
$scope = '';
|
122 |
$id = 0;
|
@@ -131,98 +114,50 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
131 |
$id = $data['store_id'];
|
132 |
}
|
133 |
|
134 |
-
$
|
135 |
-
$
|
136 |
-
|
137 |
|
138 |
-
$
|
139 |
-
if ($statut == '1' || $statut == '2') {
|
140 |
$infos[$data['siteid']]['siteid'] = $data['siteid'];
|
141 |
-
|
142 |
-
$infos[$data['siteid']]['
|
143 |
-
$infos[$data['siteid']]['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
return ($infos);
|
146 |
}
|
147 |
|
148 |
-
public function
|
|
|
149 |
$evaluations = array();
|
150 |
foreach ($order_list as $site_id => $infos) {
|
151 |
$order_list_by_stack = array_chunk($infos['orders'], 50, true);
|
152 |
$info['siteid'] = $site_id;
|
153 |
-
$info['mode'] = $infos['mode'];
|
154 |
$info['login'] = $infos['login'];
|
155 |
$info['pwd'] = $infos['pwd'];
|
156 |
foreach ($order_list_by_stack as $stack) {
|
157 |
-
$evaluations = array_merge($this->
|
158 |
}
|
159 |
}
|
|
|
160 |
return ($evaluations);
|
161 |
}
|
162 |
|
163 |
-
|
164 |
-
protected function sort_order_by_site($refid_list)
|
165 |
-
{
|
166 |
-
$order_list = array();
|
167 |
-
|
168 |
-
foreach ($refid_list as $refid)
|
169 |
-
{
|
170 |
-
$infos = $this->get_sac_info($refid);
|
171 |
-
$order_list[$infos['siteid']]['mode'] = $infos['mode'];
|
172 |
-
$order_list[$infos['siteid']]['login'] = $infos['login'];
|
173 |
-
$order_list[$infos['siteid']]['pwd'] = $infos['pwd'];
|
174 |
-
$order_list[$infos['siteid']]['refid'][] = $refid;
|
175 |
-
}
|
176 |
-
|
177 |
-
return ($order_list);
|
178 |
-
} */
|
179 |
-
/*
|
180 |
-
protected function get_sac_info($refid)
|
181 |
-
{
|
182 |
-
$infos = array();
|
183 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($refid);
|
184 |
-
$scope_field = Mage::getModel('fianet/configuration')->getGlobalValue('CONFIGURATION_SCOPE');
|
185 |
-
switch ($scope_field)
|
186 |
-
{
|
187 |
-
case ('store_id'):
|
188 |
-
$id = $order->getStore()->getId();
|
189 |
-
break;
|
190 |
-
case ('group_id'):
|
191 |
-
$id = $order->getStore()->getGroup()->getId();
|
192 |
-
break;
|
193 |
-
case ('website_id'):
|
194 |
-
$id = $order->getStore()->getWebsite()->getId();
|
195 |
-
break;
|
196 |
-
default:
|
197 |
-
$id = $order->getStore()->getGroup()->getId();
|
198 |
-
break;
|
199 |
-
}
|
200 |
-
$configurationData = Mage::getModel('fianet/configuration_value');
|
201 |
-
$configurationData->_scope_field = $scope_field;
|
202 |
-
$configurationData->setScope($id);
|
203 |
-
|
204 |
-
$infos['mode'] = $order->getData('fianet_sac_mode');
|
205 |
-
$infos['siteid'] = $configurationData->load('SAC_SITEID')->Value;
|
206 |
-
$infos['login'] = $configurationData->load('SAC_LOGIN')->Value;
|
207 |
-
$infos['pwd'] = $configurationData->load('SAC_PASSWORD')->Value;
|
208 |
-
if ($infos['siteid'] == null)
|
209 |
-
{
|
210 |
-
$configurationData->setScope(0);
|
211 |
-
$infos['siteid']= $configurationData->load('SAC_SITEID')->Value;
|
212 |
-
$infos['login'] = $configurationData->load('SAC_LOGIN')->Value;
|
213 |
-
$infos['pwd'] = $configurationData->load('SAC_PASSWORD')->Value;
|
214 |
-
}
|
215 |
-
return ($infos);
|
216 |
-
} */
|
217 |
-
|
218 |
-
protected function get_evaluation_by_stack($stack, $info) {
|
219 |
-
|
220 |
$evaluations = array();
|
221 |
if (count($stack) <= 0) {
|
222 |
return ($evaluations);
|
223 |
}
|
224 |
$siteid = $info['siteid'];
|
225 |
-
$mode = $info['mode'] == 'TEST' ?
|
226 |
$login = $info['login'];
|
227 |
$pwd = $info['pwd'];
|
228 |
|
@@ -235,7 +170,7 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
235 |
}
|
236 |
}
|
237 |
|
238 |
-
$url = $this->
|
239 |
$params['SiteID'] = $siteid;
|
240 |
$params['Pwd'] = $pwd;
|
241 |
$params['Mode'] = 'mini';
|
@@ -243,57 +178,57 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
243 |
$params['ListID'] = $listId;
|
244 |
$params['Separ'] = ',';
|
245 |
|
246 |
-
$response = $this->
|
247 |
$response = Fianet_Core_Model_Functions::xml2array($response->getBody());
|
248 |
-
|
249 |
-
$evaluations = Mage::getModel('fianet/fianet_parser')->process_result($response);
|
250 |
-
|
251 |
|
252 |
return ($evaluations);
|
253 |
}
|
254 |
|
255 |
-
protected function
|
256 |
$stacks = array();
|
257 |
foreach ($this->orders as $siteid => $listorders) {
|
258 |
$listorders = array_chunk($listorders, 25);
|
259 |
foreach ($listorders as $orders25) {
|
260 |
-
$stacks[$siteid][] = $this->
|
261 |
}
|
262 |
}
|
263 |
return ($stacks);
|
264 |
}
|
265 |
|
266 |
-
protected function
|
267 |
$xml = '';
|
268 |
$xml .= '<?xml version="1.0" encoding="' . $this->encoding . '" ?>' . "\n";
|
269 |
$xml .= '<stack>' . "\n";
|
270 |
|
271 |
foreach ($orders as $o) {
|
272 |
-
$xml .= $o->
|
273 |
}
|
274 |
|
275 |
$xml .= '</stack>' . "\n";
|
276 |
return ($xml);
|
277 |
}
|
278 |
|
279 |
-
protected function
|
280 |
-
if ($
|
281 |
-
$
|
282 |
}
|
|
|
283 |
$url = null;
|
284 |
-
if ($
|
285 |
-
$url = Mage::
|
286 |
}
|
287 |
-
if ($
|
288 |
-
$url = Mage::
|
289 |
}
|
290 |
if ($url != null) {
|
291 |
-
$url .= Mage::
|
292 |
}
|
|
|
293 |
return ($url);
|
294 |
}
|
295 |
|
296 |
-
protected function
|
297 |
$response = false;
|
298 |
try {
|
299 |
$config = array('maxredirects' => 0, 'timeout' => 30);
|
@@ -312,20 +247,14 @@ class Fianet_Core_Model_Fianet_Sender {
|
|
312 |
return ($response);
|
313 |
}
|
314 |
|
315 |
-
protected function
|
316 |
-
$
|
317 |
|
318 |
-
$
|
319 |
-
$
|
320 |
-
|
321 |
-
|
322 |
-
$statut = $configurationData->load('SAC_STATUS')->Value;
|
323 |
-
if ($statut == "" && $this->sites_conf[$siteid]['scope_id'] > 0) {
|
324 |
-
$configurationData->setScope(0);
|
325 |
-
$statut = $configurationData->load('SAC_STATUS')->Value;
|
326 |
-
}
|
327 |
|
328 |
-
return ($
|
329 |
}
|
330 |
|
331 |
}
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Fianet_Sender {
|
22 |
protected $sites_conf = array();
|
23 |
|
24 |
public function __construct() {
|
25 |
+
$this->encoding = Mage::getStoreConfig('sac/sacconfg/charset', '0');
|
26 |
}
|
27 |
|
28 |
+
public function addOrder(Fianet_Sac_Model_Fianet_Order_Sac $order) {
|
29 |
$this->orders[$order->info_commande->siteid][] = $order;
|
30 |
if (!isset($this->sites_configuration[$order->info_commande->siteid])) {
|
31 |
$this->sites_conf[$order->info_commande->siteid]['scope_field'] = $order->scope_field;
|
34 |
}
|
35 |
|
36 |
public function send() {
|
37 |
+
$stacks = $this->getStacks();
|
38 |
$responses = array();
|
39 |
foreach ($stacks as $siteid => $stacksof25) {
|
40 |
+
$url = $this->buildUrl('stacking', $siteid);
|
41 |
foreach ($stacksof25 as $stack) {
|
42 |
$params = array('siteid' => $siteid, 'controlcallback' => $stack);
|
43 |
+
$response = $this->getResponse($url, $params);
|
44 |
+
$response = Mage::getModel('fianet/fianet_parser')->processResultStacking($response->getBody());
|
|
|
45 |
if (is_array($response)) {
|
46 |
$responses = array_merge($responses, $response);
|
47 |
}
|
50 |
return ($responses);
|
51 |
}
|
52 |
|
53 |
+
public function getReevaluation() {
|
|
|
|
|
54 |
$sites = array();
|
55 |
$websiteCollection = Mage::getModel('core/website')->getResourceCollection();
|
56 |
foreach ($websiteCollection as $website) {
|
57 |
$groupCollection = $website->getGroupCollection();
|
58 |
foreach ($groupCollection as $group) {
|
59 |
+
$id = $group->getId();
|
60 |
+
$index = count($sites);
|
61 |
+
$sites[$index]['siteid'] = Mage::getStoreConfig('sac/sacconfg/siteid', $id);
|
62 |
+
|
63 |
+
if ($sites[$index]['siteid'] == null && $id > 0)
|
64 |
+
$sites[$index]['siteid'] = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
|
65 |
+
|
66 |
+
$sites[$index]['password'] = Mage::getStoreConfig('sac/sacconfg/password', $id);
|
67 |
+
|
68 |
+
if ($sites[$index]['password'] == null && $id > 0)
|
69 |
+
$sites[$index]['password'] = Mage::getStoreConfig('sac/sacconfg/password', '0');
|
70 |
+
|
71 |
+
$sites[$index]['mode'] = Mage::getStoreConfig('sac/sacconfg/mode', $id);
|
72 |
+
|
73 |
+
if ($sites[$index]['mode'] == null && $id > 0)
|
74 |
+
$sites[$index]['mode'] = Mage::getStoreConfig('sac/sacconfg/mode', '0');
|
75 |
+
|
76 |
+
if ($sites[$index]['siteid'] === NULL || $sites[$index]['password'] === NULL) {
|
77 |
+
unset($sites[$index]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
}
|
80 |
}
|
81 |
$reevaluations = array();
|
82 |
+
|
83 |
foreach ($sites as $infos) {
|
84 |
+
$url = $this->buildUrl('alert', $infos['siteid'], $infos['mode']);
|
|
|
85 |
$params = array(
|
86 |
'SiteID' => $infos['siteid'],
|
87 |
'Pwd' => $infos['password'],
|
88 |
'Mode' => 'new',
|
89 |
'Output' => 'new',
|
|
|
|
|
90 |
'RepFT' => '0'
|
91 |
);
|
92 |
+
|
93 |
+
$response = $this->getResponse($url, $params);
|
94 |
$xml_array = Fianet_Core_Model_Functions::xml2array($response->getBody());
|
95 |
+
$reevals = Mage::getModel('fianet/fianet_parser')->processResultNostack($xml_array);
|
96 |
$reevaluations = array_merge($reevaluations, $reevals);
|
97 |
}
|
98 |
+
|
99 |
return ($reevaluations);
|
100 |
}
|
101 |
|
102 |
+
protected function getSiteIdInfos($data) {
|
103 |
$infos = array();
|
104 |
$scope = '';
|
105 |
$id = 0;
|
114 |
$id = $data['store_id'];
|
115 |
}
|
116 |
|
117 |
+
$mode = Mage::getStoreConfig('sac/sacconfg/mode', $id);
|
118 |
+
if ($mode == null && $id > 0)
|
119 |
+
$mode = Mage::getStoreConfig('sac/sacconfg/mode', '0');
|
120 |
|
121 |
+
if ($mode == Fianet_Core_Model_Source_Mode::MODE_TEST || $mode == Fianet_Core_Model_Source_Mode::MODE_PRODUCTION) {
|
|
|
122 |
$infos[$data['siteid']]['siteid'] = $data['siteid'];
|
123 |
+
|
124 |
+
$infos[$data['siteid']]['login'] = Mage::getStoreConfig('sac/sacconfg/compte', $id);
|
125 |
+
if ($infos[$data['siteid']]['login'] == null && $id > 0)
|
126 |
+
$infos[$data['siteid']]['login'] = Mage::getStoreConfig('sac/sacconfg/compte', '0');
|
127 |
+
|
128 |
+
$infos[$data['siteid']]['password'] = Mage::getStoreConfig('sac/sacconfg/password', $id);
|
129 |
+
if ($infos[$data['siteid']]['password'] == null && $id > 0)
|
130 |
+
$infos[$data['siteid']]['password'] = Mage::getStoreConfig('sac/sacconfg/password', '0');
|
131 |
+
|
132 |
+
$infos[$data['siteid']]['mode'] = $mode;
|
133 |
}
|
134 |
return ($infos);
|
135 |
}
|
136 |
|
137 |
+
public function getEvaluations(array $order_list) {
|
138 |
+
|
139 |
$evaluations = array();
|
140 |
foreach ($order_list as $site_id => $infos) {
|
141 |
$order_list_by_stack = array_chunk($infos['orders'], 50, true);
|
142 |
$info['siteid'] = $site_id;
|
143 |
+
$info['mode'] = $infos['mode']; //TEST or PRODUCTION, voir BD
|
144 |
$info['login'] = $infos['login'];
|
145 |
$info['pwd'] = $infos['pwd'];
|
146 |
foreach ($order_list_by_stack as $stack) {
|
147 |
+
$evaluations = array_merge($this->getEvaluationByStack($stack, $info), $evaluations);
|
148 |
}
|
149 |
}
|
150 |
+
|
151 |
return ($evaluations);
|
152 |
}
|
153 |
|
154 |
+
protected function getEvaluationByStack($stack, $info) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
$evaluations = array();
|
156 |
if (count($stack) <= 0) {
|
157 |
return ($evaluations);
|
158 |
}
|
159 |
$siteid = $info['siteid'];
|
160 |
+
$mode = $info['mode'] == 'TEST' ? 'test' : 'production'; //TEST or PRODUCTION, voir BD
|
161 |
$login = $info['login'];
|
162 |
$pwd = $info['pwd'];
|
163 |
|
170 |
}
|
171 |
}
|
172 |
|
173 |
+
$url = $this->buildUrl('validstack', $siteid, $mode);
|
174 |
$params['SiteID'] = $siteid;
|
175 |
$params['Pwd'] = $pwd;
|
176 |
$params['Mode'] = 'mini';
|
178 |
$params['ListID'] = $listId;
|
179 |
$params['Separ'] = ',';
|
180 |
|
181 |
+
$response = $this->getResponse($url, $params);
|
182 |
$response = Fianet_Core_Model_Functions::xml2array($response->getBody());
|
183 |
+
$evaluations = Mage::getModel('fianet/fianet_parser')->processResult($response);
|
|
|
|
|
184 |
|
185 |
return ($evaluations);
|
186 |
}
|
187 |
|
188 |
+
protected function getStacks() {
|
189 |
$stacks = array();
|
190 |
foreach ($this->orders as $siteid => $listorders) {
|
191 |
$listorders = array_chunk($listorders, 25);
|
192 |
foreach ($listorders as $orders25) {
|
193 |
+
$stacks[$siteid][] = $this->buildStackOf25($orders25);
|
194 |
}
|
195 |
}
|
196 |
return ($stacks);
|
197 |
}
|
198 |
|
199 |
+
protected function buildStackOf25($orders) {
|
200 |
$xml = '';
|
201 |
$xml .= '<?xml version="1.0" encoding="' . $this->encoding . '" ?>' . "\n";
|
202 |
$xml .= '<stack>' . "\n";
|
203 |
|
204 |
foreach ($orders as $o) {
|
205 |
+
$xml .= $o->getXml();
|
206 |
}
|
207 |
|
208 |
$xml .= '</stack>' . "\n";
|
209 |
return ($xml);
|
210 |
}
|
211 |
|
212 |
+
protected function buildUrl($name, $siteid, $mode = null) {
|
213 |
+
if ($mode == null) {
|
214 |
+
$mode = $this->getSiteMode($siteid);
|
215 |
}
|
216 |
+
|
217 |
$url = null;
|
218 |
+
if ($mode == Fianet_Core_Model_Source_Mode::MODE_TEST) {
|
219 |
+
$url = Mage::getStoreConfig('sac/saclink/testurl', '0');
|
220 |
}
|
221 |
+
if ($mode == Fianet_Core_Model_Source_Mode::MODE_PRODUCTION) {
|
222 |
+
$url = Mage::getStoreConfig('sac/saclink/produrl', '0');
|
223 |
}
|
224 |
if ($url != null) {
|
225 |
+
$url .= Mage::getStoreConfig('sac/saclink/' . $name, '0');
|
226 |
}
|
227 |
+
|
228 |
return ($url);
|
229 |
}
|
230 |
|
231 |
+
protected function getResponse($url, $params = null) {
|
232 |
$response = false;
|
233 |
try {
|
234 |
$config = array('maxredirects' => 0, 'timeout' => 30);
|
247 |
return ($response);
|
248 |
}
|
249 |
|
250 |
+
protected function getSiteMode($siteid) {
|
251 |
+
$groupid = $this->sites_conf[$siteid]['scope_id'];
|
252 |
|
253 |
+
$mode = Mage::getStoreConfig('sac/sacconfg/mode', $groupid);
|
254 |
+
if ($mode == null && $groupid > 0)
|
255 |
+
$mode = Mage::getStoreConfig('sac/sacconfg/mode', '0');
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
|
257 |
+
return ($mode);
|
258 |
}
|
259 |
|
260 |
}
|
app/code/community/Fianet/Core/Model/Functions.php
CHANGED
@@ -1,240 +1,220 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Functions {
|
19 |
-
|
20 |
-
public function
|
21 |
-
$xml = str_replace("\\'", "'", $xml);
|
22 |
-
$xml = str_replace("\\\"", "\"", $xml);
|
23 |
-
$xml = str_replace("\\\\", "\\", $xml);
|
24 |
-
$xml = str_replace("\t", "", $xml);
|
25 |
-
$xml = str_replace("\n", "", $xml);
|
26 |
-
$xml = str_replace("\r", "", $xml);
|
27 |
-
$xml = trim($xml);
|
28 |
-
return ($xml);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function
|
32 |
-
//
|
33 |
-
$var = strip_tags($var);
|
34 |
-
//$var = str_replace("&", "&&", $var);
|
35 |
-
$var = str_replace('&', '', $var);
|
36 |
-
$var = str_replace("<", "<", $var);
|
37 |
-
$var = str_replace(">", ">", $var);
|
38 |
-
$var = trim($var);
|
39 |
-
return ($var);
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
$store
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
if (!$
|
119 |
-
return
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
//
|
126 |
-
$
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
$
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
}
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
}
|
221 |
-
if ($billing->getStreet(2) != $shipping->getStreet(2)) {
|
222 |
-
$identical = false;
|
223 |
-
}
|
224 |
-
if ($billing->getPostcode() != $shipping->getPostcode()) {
|
225 |
-
$identical = false;
|
226 |
-
}
|
227 |
-
if ($billing->getCity() != $shipping->getCity()) {
|
228 |
-
$identical = false;
|
229 |
-
}
|
230 |
-
if ($billing->getCountry() != $shipping->getCountry()) {
|
231 |
-
$identical = false;
|
232 |
-
}
|
233 |
-
if ($billing->getCompany() != $shipping->getCompany()) {
|
234 |
-
$identical = false;
|
235 |
-
}
|
236 |
-
|
237 |
-
return ($identical);
|
238 |
-
}
|
239 |
-
|
240 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Functions {
|
19 |
+
|
20 |
+
public function cleanXml($xml) {
|
21 |
+
$xml = str_replace("\\'", "'", $xml);
|
22 |
+
$xml = str_replace("\\\"", "\"", $xml);
|
23 |
+
$xml = str_replace("\\\\", "\\", $xml);
|
24 |
+
$xml = str_replace("\t", "", $xml);
|
25 |
+
$xml = str_replace("\n", "", $xml);
|
26 |
+
$xml = str_replace("\r", "", $xml);
|
27 |
+
$xml = trim($xml);
|
28 |
+
return ($xml);
|
29 |
+
}
|
30 |
+
|
31 |
+
public function cleanInvalidChar($var) {
|
32 |
+
//supprime les balises html
|
33 |
+
$var = strip_tags($var);
|
34 |
+
//$var = str_replace("&", "&&", $var);
|
35 |
+
$var = str_replace('&', '', $var);
|
36 |
+
$var = str_replace("<", "<", $var);
|
37 |
+
$var = str_replace(">", ">", $var);
|
38 |
+
$var = trim($var);
|
39 |
+
return ($var);
|
40 |
+
}
|
41 |
+
|
42 |
+
//Calcule la date de livraison en jour ouvré à partir de la date courante
|
43 |
+
public function getDeliveryDate($deliveryTimes, $id, $orderIncrementId) {
|
44 |
+
define('H', date("H"));
|
45 |
+
define('i', date("i"));
|
46 |
+
define('s', date("s"));
|
47 |
+
define('m', date("m"));
|
48 |
+
define('d', date("d"));
|
49 |
+
define('Y', date("Y"));
|
50 |
+
define('SATURDAY', 6);
|
51 |
+
define('SUNDAY', 7);
|
52 |
+
|
53 |
+
$nb_days = 0;
|
54 |
+
$j = 0;
|
55 |
+
$log = 'Delais de livraison le plus long : ' . $deliveryTimes . " commande #" . $orderIncrementId . " \r\n";
|
56 |
+
|
57 |
+
while ($nb_days < $deliveryTimes) {
|
58 |
+
$j++;
|
59 |
+
$date = mktime(H, i, s, m, d + $j, Y);
|
60 |
+
$day = date("N", $date);
|
61 |
+
if ($day != SUNDAY && $day != SATURDAY) {
|
62 |
+
$nb_days++;
|
63 |
+
$log .= 'J' . $j . '(' . date('Y-m-d', $date) . ') est un jour de semaine(' . date('l', $date) . ').' . "\r\n";
|
64 |
+
} else {
|
65 |
+
$log .= 'J' . $j . '(' . date('Y-m-d', $date) . ') est un week-end(' . date('l', $date) . ').' . "\r\n";
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
$max = Mage::getStoreConfig('kwixo/kwixoconfg/maxdeliverytimes', $id);
|
70 |
+
if ($max == null) {
|
71 |
+
$max = Mage::getStoreConfig('kwixo/kwixoconfg/maxdeliverytimes', '0');
|
72 |
+
}
|
73 |
+
$max = intval($max);
|
74 |
+
if ($j > $max) {//si on dépasse le délais de livraison max à causes des samedi et dimanche on remet le délais de livraison à son maximum
|
75 |
+
$j = $max;
|
76 |
+
$log .= $max . ' jours depasses. Date de livraison ramenee a ' . $max . ' jours';
|
77 |
+
}
|
78 |
+
|
79 |
+
Mage::getModel('fianet/log')->log($log);
|
80 |
+
$date = mktime(H, i, s, m, d + $j, Y);
|
81 |
+
return (date("Y-m-d", $date));
|
82 |
+
}
|
83 |
+
|
84 |
+
public function getStore() {
|
85 |
+
$scope = 'store_id';
|
86 |
+
switch ($scope) {
|
87 |
+
case('website_id'):
|
88 |
+
$store = (int) Mage::app()->getStore(true)->getWebsiteId();
|
89 |
+
break;
|
90 |
+
case ('group_id'):
|
91 |
+
$store = (int) Mage::app()->getStore(true)->getGroupId();
|
92 |
+
break;
|
93 |
+
case('store_id'):
|
94 |
+
$store = (int) Mage::app()->getStore(true)->getStoreId();
|
95 |
+
break;
|
96 |
+
default :
|
97 |
+
$store = 0;
|
98 |
+
}
|
99 |
+
return ($store);
|
100 |
+
}
|
101 |
+
|
102 |
+
public static function xml2array($contents, $getAttributes = 1) {
|
103 |
+
if (!$contents)
|
104 |
+
return array();
|
105 |
+
|
106 |
+
if (!function_exists('xml_parser_create')) {
|
107 |
+
//print "'xml_parser_create()' function not found!";
|
108 |
+
return array();
|
109 |
+
}
|
110 |
+
//Get the XML parser of PHP - PHP must have this module for the parser to work
|
111 |
+
$xmlValues = null;
|
112 |
+
$parser = xml_parser_create();
|
113 |
+
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
|
114 |
+
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
|
115 |
+
xml_parse_into_struct($parser, $contents, $xmlValues);
|
116 |
+
xml_parser_free($parser);
|
117 |
+
|
118 |
+
if (!$xmlValues)
|
119 |
+
return; //Hmm...
|
120 |
+
|
121 |
+
//Initializations
|
122 |
+
$xmlArray = array();
|
123 |
+
$current = &$xmlArray;
|
124 |
+
|
125 |
+
//Go through the tags.
|
126 |
+
foreach ($xmlValues as $data) {
|
127 |
+
unset($attributes, $value); //Remove existing values, or there will be trouble
|
128 |
+
//This command will extract these variables into the foreach scope
|
129 |
+
// tag(string), type(string), level(int), attributes(array).
|
130 |
+
extract($data); //We could use the array by itself, but this cooler.
|
131 |
+
|
132 |
+
$result = '';
|
133 |
+
if ($getAttributes) {//The second argument of the function decides this.
|
134 |
+
$result = array();
|
135 |
+
if (isset($value))
|
136 |
+
$result['value'] = $value;
|
137 |
+
//Set the attributes too.
|
138 |
+
if (isset($attributes)) {
|
139 |
+
foreach ($attributes as $attr => $val) {
|
140 |
+
if ($getAttributes == 1)
|
141 |
+
$result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
|
142 |
+
/** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */
|
143 |
+
}
|
144 |
+
}
|
145 |
+
} elseif (isset($value)) {
|
146 |
+
$result = $value;
|
147 |
+
}
|
148 |
+
|
149 |
+
//See tag status and do the needed.
|
150 |
+
if ($type == "open") {//The starting of the tag '<tag>'
|
151 |
+
$parent[$level - 1] = &$current;
|
152 |
+
if (!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
|
153 |
+
$current[$tag] = $result;
|
154 |
+
$current = &$current[$tag];
|
155 |
+
} else { //There was another element with the same tag name
|
156 |
+
if (isset($current[$tag][0])) {
|
157 |
+
array_push($current[$tag], $result);
|
158 |
+
} else {
|
159 |
+
$current[$tag] = array($current[$tag], $result);
|
160 |
+
}
|
161 |
+
$last = count($current[$tag]) - 1;
|
162 |
+
$current = &$current[$tag][$last];
|
163 |
+
}
|
164 |
+
} elseif ($type == "complete") { //Tags that ends in 1 line '<tag />'
|
165 |
+
//See if the key is already taken.
|
166 |
+
if (!isset($current[$tag])) { //New Key
|
167 |
+
$current[$tag] = $result;
|
168 |
+
//array_push($current[$tag],$result);
|
169 |
+
} else { //If taken, put all things inside a list(array)
|
170 |
+
if ((is_array($current[$tag]) and $getAttributes == 0)//If it is already an array...
|
171 |
+
or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $getAttributes == 1)) {
|
172 |
+
array_push($current[$tag], $result); // ...push the new element into that array.
|
173 |
+
} else { //If it is not an array...
|
174 |
+
$current[$tag] = array($current[$tag], $result); //...Make it an array using using the existing value and the new value
|
175 |
+
}
|
176 |
+
}
|
177 |
+
} elseif ($type == 'close') { //End of tag '</tag>'
|
178 |
+
$current = &$parent[$level - 1];
|
179 |
+
}
|
180 |
+
}
|
181 |
+
return($xmlArray);
|
182 |
+
}
|
183 |
+
|
184 |
+
public static function compareBillingAndShipping(Mage_Sales_Model_Order_Address $billing, Mage_Sales_Model_Order_Address $shipping) {
|
185 |
+
$identical = true;
|
186 |
+
if ($billing->getLastname() != $shipping->getLastname()) {
|
187 |
+
$identical = false;
|
188 |
+
}
|
189 |
+
if ($billing->getFirstname() != $shipping->getFirstname()) {
|
190 |
+
$identical = false;
|
191 |
+
}
|
192 |
+
if ($billing->getTelephone() != $shipping->getTelephone()) {
|
193 |
+
$identical = false;
|
194 |
+
}
|
195 |
+
if ($billing->getFax() != $shipping->getFax()) {
|
196 |
+
$identical = false;
|
197 |
+
}
|
198 |
+
if ($billing->getStreet(1) != $shipping->getStreet(1)) {
|
199 |
+
$identical = false;
|
200 |
+
}
|
201 |
+
if ($billing->getStreet(2) != $shipping->getStreet(2)) {
|
202 |
+
$identical = false;
|
203 |
+
}
|
204 |
+
if ($billing->getPostcode() != $shipping->getPostcode()) {
|
205 |
+
$identical = false;
|
206 |
+
}
|
207 |
+
if ($billing->getCity() != $shipping->getCity()) {
|
208 |
+
$identical = false;
|
209 |
+
}
|
210 |
+
if ($billing->getCountry() != $shipping->getCountry()) {
|
211 |
+
$identical = false;
|
212 |
+
}
|
213 |
+
if ($billing->getCompany() != $shipping->getCompany()) {
|
214 |
+
$identical = false;
|
215 |
+
}
|
216 |
+
|
217 |
+
return ($identical);
|
218 |
+
}
|
219 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
app/code/community/Fianet/Core/Model/Log.php
CHANGED
@@ -1,33 +1,32 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Log extends Mage_Core_Model_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
parent::_construct();
|
22 |
-
$this->_init('fianet/log');
|
23 |
-
}
|
24 |
-
|
25 |
-
public function
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Log extends Mage_Core_Model_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
parent::_construct();
|
22 |
+
$this->_init('fianet/log');
|
23 |
+
}
|
24 |
+
|
25 |
+
public function log($message) {
|
26 |
+
$currentDate = ((int) Mage::helper('fianet')->getMagentoVersion() >= 160) ? Varien_Date::now() : now();
|
27 |
+
$this->setDate($currentDate)
|
28 |
+
->setMessage($message)
|
29 |
+
->save();
|
30 |
+
}
|
31 |
+
|
|
|
32 |
}
|
app/code/community/Fianet/Core/Model/MageConfiguration.php
CHANGED
@@ -1,37 +1,40 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_MageConfiguration extends Mage_Adminhtml_Model_Config {
|
19 |
-
|
20 |
-
protected function
|
21 |
-
$list = array();
|
22 |
-
parent::getSections();
|
23 |
-
foreach ($this->_sections->$type->groups->children() as $
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
37 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_MageConfiguration extends Mage_Adminhtml_Model_Config {
|
19 |
+
|
20 |
+
protected function _getList($type = 'carriers') {
|
21 |
+
$list = array();
|
22 |
+
parent::getSections();
|
23 |
+
foreach ($this->_sections->$type->groups->children() as $id => $children) {
|
24 |
+
if(!$children->label)
|
25 |
+
$list[(string) $id] = (string) $id;
|
26 |
+
else
|
27 |
+
$list[(string) $id] = (string) $children->label;
|
28 |
+
}
|
29 |
+
return ($list);
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getShippingMethods() {
|
33 |
+
return ($this->_getList('carriers'));
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getPaymentMethods() {
|
37 |
+
return ($this->_getList('payment'));
|
38 |
+
}
|
39 |
+
|
40 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Abstract.php
CHANGED
@@ -1,64 +1,59 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Mysql4_Abstract extends Mage_Core_Model_Mysql4_Abstract {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
return (true);
|
60 |
-
}
|
61 |
-
return (false);
|
62 |
-
}
|
63 |
-
|
64 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
abstract class Fianet_Core_Model_Mysql4_Abstract extends Mage_Core_Model_Mysql4_Abstract {
|
19 |
+
|
20 |
+
public function save(Mage_Core_Model_Abstract $object) {
|
21 |
+
if ($object->isDeleted()) {
|
22 |
+
return $this->delete($object);
|
23 |
+
}
|
24 |
+
|
25 |
+
$this->_beforeSave($object);
|
26 |
+
$this->_checkUnique($object);
|
27 |
+
|
28 |
+
if (!is_null($object->getId()) || $object->getId() === 0) {
|
29 |
+
$condition = $this->_getWriteAdapter()->quoteInto($this->getIdFieldName() . '=?', $object->getId());
|
30 |
+
if ($this->_exist($object)) {
|
31 |
+
$this->_getWriteAdapter()->update($this->getMainTable(), $this->_prepareDataForSave($object), $condition);
|
32 |
+
} else {
|
33 |
+
$this->_getWriteAdapter()->insert($this->getMainTable(), $this->_prepareDataForSave($object));
|
34 |
+
}
|
35 |
+
} else {
|
36 |
+
$this->_getWriteAdapter()->insert($this->getMainTable(), $this->_prepareDataForSave($object));
|
37 |
+
$object->setId($this->_getWriteAdapter()->lastInsertId($this->getMainTable()));
|
38 |
+
}
|
39 |
+
|
40 |
+
$this->_afterSave($object);
|
41 |
+
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function _exist(Mage_Core_Model_Abstract $object) {
|
46 |
+
if (is_null($object->getId())) {
|
47 |
+
return (false);
|
48 |
+
}
|
49 |
+
$select = $this->_getWriteAdapter()->select()
|
50 |
+
->from($this->getMainTable())
|
51 |
+
->reset(Zend_Db_Select::WHERE)
|
52 |
+
->where($this->getIdFieldName() . '=?', $object->getId());
|
53 |
+
if ($this->_getWriteAdapter()->fetchRow($select)) {
|
54 |
+
return (true);
|
55 |
+
}
|
56 |
+
return (false);
|
57 |
+
}
|
58 |
+
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Catproduct/Association.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Mysql4_Catproduct_Association extends Mage_Core_Model_Mysql4_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
$this->_init('fianet/catproduct_association', 'id');
|
22 |
-
}
|
23 |
-
|
24 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Mysql4_Catproduct_Association extends Mage_Core_Model_Mysql4_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
$this->_init('fianet/catproduct_association', 'id');
|
22 |
+
}
|
23 |
+
|
24 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Catproduct/Association/Collection.php
CHANGED
@@ -1,34 +1,34 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Mysql4_Catproduct_association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
parent::_construct();
|
22 |
-
$this->_init('fianet/catproduct_association');
|
23 |
-
}
|
24 |
-
|
25 |
-
public function getConfiguredCategoriesCollection() {
|
26 |
-
$collection = $this->load();
|
27 |
-
$list = array();
|
28 |
-
foreach ($collection as $catproduct) {
|
29 |
-
$list[$catproduct->
|
30 |
-
}
|
31 |
-
return ($list);
|
32 |
-
}
|
33 |
-
|
34 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Mysql4_Catproduct_association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
parent::_construct();
|
22 |
+
$this->_init('fianet/catproduct_association');
|
23 |
+
}
|
24 |
+
|
25 |
+
public function getConfiguredCategoriesCollection() {
|
26 |
+
$collection = $this->load();
|
27 |
+
$list = array();
|
28 |
+
foreach ($collection as $catproduct) {
|
29 |
+
$list[$catproduct->getCatalogCategoryEntityId()] = $catproduct->getFianetProductType();
|
30 |
+
}
|
31 |
+
return ($list);
|
32 |
+
}
|
33 |
+
|
34 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Configuration.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration extends Mage_Core_Model_Mysql4_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration extends Mage_Core_Model_Mysql4_Abstract {
|
app/code/community/Fianet/Core/Model/Mysql4/Configuration/Collection.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
app/code/community/Fianet/Core/Model/Mysql4/Configuration/Global.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Global extends Fianet_Core_Model_Mysql4_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Global extends Fianet_Core_Model_Mysql4_Abstract {
|
app/code/community/Fianet/Core/Model/Mysql4/Configuration/Value.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Value extends Fianet_Core_Model_Mysql4_Scope_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Value extends Fianet_Core_Model_Mysql4_Scope_Abstract {
|
app/code/community/Fianet/Core/Model/Mysql4/Configuration/Value/Collection.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Value_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Configuration_Value_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
app/code/community/Fianet/Core/Model/Mysql4/Log.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
$this->_init('fianet/log', 'id');
|
22 |
-
}
|
23 |
-
|
24 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
$this->_init('fianet/log', 'id');
|
22 |
+
}
|
23 |
+
|
24 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Log/Collection.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
parent::_construct();
|
22 |
-
$this->_init('fianet/log');
|
23 |
-
}
|
24 |
-
|
25 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
parent::_construct();
|
22 |
+
$this->_init('fianet/log');
|
23 |
+
}
|
24 |
+
|
25 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Scope/Abstract.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Scope_Abstract extends Mage_Core_Model_Mysql4_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Scope_Abstract extends Mage_Core_Model_Mysql4_Abstract {
|
app/code/community/Fianet/Core/Model/Mysql4/Setup.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
|
app/code/community/Fianet/Core/Model/Mysql4/Shipping/Association.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Mysql4_Shipping_Association extends Fianet_Core_Model_Mysql4_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
$this->_init('fianet/shipping_association', 'shipping_code');
|
22 |
-
}
|
23 |
-
|
24 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Mysql4_Shipping_Association extends Fianet_Core_Model_Mysql4_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
$this->_init('fianet/shipping_association', 'shipping_code');
|
22 |
+
}
|
23 |
+
|
24 |
}
|
app/code/community/Fianet/Core/Model/Mysql4/Shipping/Association/Collection.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Shipping_Association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Mysql4_Shipping_Association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
app/code/community/Fianet/Core/Model/Product.php
CHANGED
@@ -1,53 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Product extends Mage_Catalog_Model_Product {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
//
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
$
|
28 |
-
|
29 |
-
->
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$id
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
$
|
42 |
-
$
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
$
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Product extends Mage_Catalog_Model_Product {
|
19 |
+
|
20 |
+
protected $_productType;
|
21 |
+
|
22 |
+
public function getFianetProductType() {
|
23 |
+
//Selection du type de produit FIA-NET selon les conditions suivantes
|
24 |
+
//Type de produit par défaut si rien n'est trouvé
|
25 |
+
//En cas de catégories multiples c'est le type de produit le plus nombreux qui est choisit.
|
26 |
+
$categoriesCollection = $this->getCategoryCollection();
|
27 |
+
$configuredCategories = Mage::getModel('fianet/catproduct_association')
|
28 |
+
->getCollection()
|
29 |
+
->getConfiguredCategoriesCollection();
|
30 |
+
|
31 |
+
$list = array();
|
32 |
+
|
33 |
+
foreach ($categoriesCollection as $categorie) {
|
34 |
+
$id = $categorie->getId();
|
35 |
+
if (isset($configuredCategories[$id])) {
|
36 |
+
$list[$id] = $configuredCategories[$id];
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
$count = array();
|
41 |
+
$max = 0;
|
42 |
+
foreach ($list as $catId => $productType) {
|
43 |
+
$count[$productType] = isset($count[$productType]) == true ? $count[$productType] + 1 : 1;
|
44 |
+
if ($count[$productType] > $max) {
|
45 |
+
$max = $count[$productType];
|
46 |
+
$this->_productType = $productType;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
return ($this->_productType);
|
50 |
+
}
|
51 |
+
|
|
|
52 |
}
|
app/code/community/Fianet/Core/Model/Scope/Abstract.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Scope_Abstract extends Mage_Core_Model_Abstract {
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Scope_Abstract extends Mage_Core_Model_Abstract {
|
app/code/community/Fianet/Core/Model/Shipping/Association.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Shipping_Association extends Mage_Core_Model_Abstract {
|
19 |
-
|
20 |
-
protected function _construct() {
|
21 |
-
parent::_construct();
|
22 |
-
$this->_init('fianet/shipping_association');
|
23 |
-
}
|
24 |
-
|
25 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Shipping_Association extends Mage_Core_Model_Abstract {
|
19 |
+
|
20 |
+
protected function _construct() {
|
21 |
+
parent::_construct();
|
22 |
+
$this->_init('fianet/shipping_association');
|
23 |
+
}
|
24 |
+
|
25 |
}
|
app/code/community/Fianet/Core/Model/Source/{ModeAction.php → Charset.php}
RENAMED
@@ -1,27 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function toOptionArray() {
|
21 |
-
return array(
|
22 |
-
array('value' => '
|
23 |
-
array('value' => '
|
24 |
-
);
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Source_Charset {
|
19 |
+
|
20 |
+
public function toOptionArray() {
|
21 |
+
return array(
|
22 |
+
array('value' => 'ISO-8859-1', 'label' => Mage::helper('adminhtml')->__('ISO-8859-1')),
|
23 |
+
array('value' => 'UTF-8', 'label' => Mage::helper('adminhtml')->__('UTF-8')),
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
app/code/community/Fianet/Core/Model/Source/Crypt.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Source_Crypt {
|
19 |
+
|
20 |
+
public function toOptionArray() {
|
21 |
+
return array(
|
22 |
+
array('value' => 'Hash32bits', 'label' => Mage::helper('adminhtml')->__('32 bits')),
|
23 |
+
array('value' => 'Hash64bits', 'label' => Mage::helper('adminhtml')->__('64 bits')),
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
app/code/community/Fianet/Core/Model/Source/DeliveryTimes.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Source_DeliveryTimes {
|
19 |
-
|
20 |
-
public function toOptionArray() {
|
21 |
-
return array(
|
22 |
-
array('value' => 1, 'label' => Mage::helper('fianet')->__('Express (moins de 24h)')),
|
23 |
-
array('value' => 2, 'label' => Mage::helper('fianet')->__('Standard'))
|
24 |
-
);
|
25 |
-
}
|
26 |
-
|
27 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Source_DeliveryTimes {
|
19 |
+
|
20 |
+
public function toOptionArray() {
|
21 |
+
return array(
|
22 |
+
array('value' => "1", 'label' => Mage::helper('fianet')->__('Express (moins de 24h)')),
|
23 |
+
array('value' => "2", 'label' => Mage::helper('fianet')->__('Standard'))
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
}
|
app/code/community/Fianet/Core/Model/Source/Mode.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Source_Mode {
|
19 |
+
|
20 |
+
const MODE_TEST = "test";
|
21 |
+
const MODE_PRODUCTION = "production";
|
22 |
+
|
23 |
+
public function toOptionArray() {
|
24 |
+
return array(
|
25 |
+
array('value' => self::MODE_TEST, 'label' => Mage::helper('adminhtml')->__('Test')),
|
26 |
+
array('value' => self::MODE_PRODUCTION, 'label' => Mage::helper('adminhtml')->__('Production')),
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Fianet/Core/Model/Source/PaymentType.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Source_PaymentType {
|
@@ -20,7 +20,7 @@ class Fianet_Core_Model_Source_PaymentType {
|
|
20 |
public function toOptionArray() {
|
21 |
return array(
|
22 |
array('value' => 'carte', 'label' => Mage::helper('fianet')->__('Carte bancaire')),
|
23 |
-
array('value' => 'cheque', 'label' => Mage::helper('fianet')->__('
|
24 |
array('value' => 'contre-remboursement', 'label' => Mage::helper('fianet')->__('Contre-remboursement')),
|
25 |
array('value' => 'virement', 'label' => Mage::helper('fianet')->__('Virement')),
|
26 |
array('value' => 'cb en n fois', 'label' => Mage::helper('fianet')->__('Carte bancaire en plusieurs fois')),
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
class Fianet_Core_Model_Source_PaymentType {
|
20 |
public function toOptionArray() {
|
21 |
return array(
|
22 |
array('value' => 'carte', 'label' => Mage::helper('fianet')->__('Carte bancaire')),
|
23 |
+
array('value' => 'cheque', 'label' => Mage::helper('fianet')->__('Chèque')),
|
24 |
array('value' => 'contre-remboursement', 'label' => Mage::helper('fianet')->__('Contre-remboursement')),
|
25 |
array('value' => 'virement', 'label' => Mage::helper('fianet')->__('Virement')),
|
26 |
array('value' => 'cb en n fois', 'label' => Mage::helper('fianet')->__('Carte bancaire en plusieurs fois')),
|
app/code/community/Fianet/Core/Model/Source/ProductType.php
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Source_ProductType {
|
19 |
-
|
20 |
-
public function toOptionArray() {
|
21 |
-
return array(
|
22 |
-
array('value' => 1, 'label' => Mage::helper('fianet')->__('Alimentation & gastronomie')),
|
23 |
-
array('value' => 2, 'label' => Mage::helper('fianet')->__('Auto & moto')),
|
24 |
-
array('value' => 3, 'label' => Mage::helper('fianet')->__('Culture & divertissements')),
|
25 |
-
array('value' => 4, 'label' => Mage::helper('fianet')->__('Maison & jardin')),
|
26 |
-
array('value' => 5, 'label' => Mage::helper('fianet')->__('Electroménager')),
|
27 |
-
array('value' => 6, 'label' => Mage::helper('fianet')->__('Enchères et achats groupés')),
|
28 |
-
array('value' => 7, 'label' => Mage::helper('fianet')->__('Fleurs & cadeaux')),
|
29 |
-
array('value' => 8, 'label' => Mage::helper('fianet')->__('Informatique & logiciels')),
|
30 |
-
array('value' => 9, 'label' => Mage::helper('fianet')->__('Santé & beauté')),
|
31 |
-
array('value' => 10, 'label' => Mage::helper('fianet')->__('Services aux particuliers')),
|
32 |
-
array('value' => 11, 'label' => Mage::helper('fianet')->__('Services aux professionnels')),
|
33 |
-
array('value' => 12, 'label' => Mage::helper('fianet')->__('Sport')),
|
34 |
-
array('value' => 13, 'label' => Mage::helper('fianet')->__('Vêtements & accessoires')),
|
35 |
-
array('value' => 14, 'label' => Mage::helper('fianet')->__('Voyage & tourisme')),
|
36 |
-
array('value' => 15, 'label' => Mage::helper('fianet')->__('Hifi, photo & vidéos')),
|
37 |
-
array('value' => 16, 'label' => Mage::helper('fianet')->__('Téléphonie & communication')),
|
38 |
-
array('value' => 17, 'label' => Mage::helper('fianet')->__('Bijoux et métaux précieux')),
|
39 |
-
array('value' => 18, 'label' => Mage::helper('fianet')->__('Articles et accessoires pour bébé')),
|
40 |
-
array('value' => 19, 'label' => Mage::helper('fianet')->__('Sonorisation & lumière'))
|
41 |
-
);
|
42 |
-
}
|
43 |
-
|
44 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Source_ProductType {
|
19 |
+
|
20 |
+
public function toOptionArray() {
|
21 |
+
return array(
|
22 |
+
array('value' => 1, 'label' => Mage::helper('fianet')->__('Alimentation & gastronomie')),
|
23 |
+
array('value' => 2, 'label' => Mage::helper('fianet')->__('Auto & moto')),
|
24 |
+
array('value' => 3, 'label' => Mage::helper('fianet')->__('Culture & divertissements')),
|
25 |
+
array('value' => 4, 'label' => Mage::helper('fianet')->__('Maison & jardin')),
|
26 |
+
array('value' => 5, 'label' => Mage::helper('fianet')->__('Electroménager')),
|
27 |
+
array('value' => 6, 'label' => Mage::helper('fianet')->__('Enchères et achats groupés')),
|
28 |
+
array('value' => 7, 'label' => Mage::helper('fianet')->__('Fleurs & cadeaux')),
|
29 |
+
array('value' => 8, 'label' => Mage::helper('fianet')->__('Informatique & logiciels')),
|
30 |
+
array('value' => 9, 'label' => Mage::helper('fianet')->__('Santé & beauté')),
|
31 |
+
array('value' => 10, 'label' => Mage::helper('fianet')->__('Services aux particuliers')),
|
32 |
+
array('value' => 11, 'label' => Mage::helper('fianet')->__('Services aux professionnels')),
|
33 |
+
array('value' => 12, 'label' => Mage::helper('fianet')->__('Sport')),
|
34 |
+
array('value' => 13, 'label' => Mage::helper('fianet')->__('Vêtements & accessoires')),
|
35 |
+
array('value' => 14, 'label' => Mage::helper('fianet')->__('Voyage & tourisme')),
|
36 |
+
array('value' => 15, 'label' => Mage::helper('fianet')->__('Hifi, photo & vidéos')),
|
37 |
+
array('value' => 16, 'label' => Mage::helper('fianet')->__('Téléphonie & communication')),
|
38 |
+
array('value' => 17, 'label' => Mage::helper('fianet')->__('Bijoux et métaux précieux')),
|
39 |
+
array('value' => 18, 'label' => Mage::helper('fianet')->__('Articles et accessoires pour bébé')),
|
40 |
+
array('value' => 19, 'label' => Mage::helper('fianet')->__('Sonorisation & lumière'))
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
}
|
app/code/community/Fianet/Core/Model/Source/ShippingType.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Source_ShippingType {
|
19 |
-
|
20 |
-
public function toOptionArray() {
|
21 |
-
return array(
|
22 |
-
array('value' => 1, 'label' => Mage::helper('fianet')->__('Retrait de la marchandise chez le marchand')),
|
23 |
-
array('value' => 2, 'label' => Mage::helper('fianet')->__('Utilisation d\'un
|
24 |
-
array('value' => 3, 'label' => Mage::helper('fianet')->__('Retrait dans un
|
25 |
-
array('value' => 4, 'label' => Mage::helper('fianet')->__('Transporteur')),
|
26 |
-
array('value' => 5, 'label' => Mage::helper('fianet')->__('Emission d\'un billet
|
27 |
-
);
|
28 |
-
}
|
29 |
-
|
30 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Model_Source_ShippingType {
|
19 |
+
|
20 |
+
public function toOptionArray() {
|
21 |
+
return array(
|
22 |
+
array('value' => 1, 'label' => Mage::helper('fianet')->__('Retrait de la marchandise chez le marchand')),
|
23 |
+
array('value' => 2, 'label' => Mage::helper('fianet')->__('Utilisation d\'un réseau de points-retrait tiers')),
|
24 |
+
array('value' => 3, 'label' => Mage::helper('fianet')->__('Retrait dans un aéroport, une gare ou une agence de voyage')),
|
25 |
+
array('value' => 4, 'label' => Mage::helper('fianet')->__('Transporteur')),
|
26 |
+
array('value' => 5, 'label' => Mage::helper('fianet')->__('Emission d\'un billet électronique, téléchargements'))
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
}
|
app/code/community/Fianet/Core/Model/Source/TypeProduct.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author Quadra Informatique <ecommerce@quadra-informatique.fr>
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.9.0 $
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class Fianet_Core_Model_Source_TypeProduct {
|
19 |
-
|
20 |
-
public function toOptionArray() {
|
21 |
-
return array(
|
22 |
-
array('value' => 1, 'label' => Mage::helper('fianet')->__('Alimentation & gastronomie')),
|
23 |
-
array('value' => 2, 'label' => Mage::helper('fianet')->__('Auto & moto')),
|
24 |
-
array('value' => 3, 'label' => Mage::helper('fianet')->__('Culture & divertissements')),
|
25 |
-
array('value' => 4, 'label' => Mage::helper('fianet')->__('Maison & jardin')),
|
26 |
-
array('value' => 5, 'label' => Mage::helper('fianet')->__('Electroménager')),
|
27 |
-
array('value' => 6, 'label' => Mage::helper('fianet')->__('Enchères et achats groupés')),
|
28 |
-
array('value' => 7, 'label' => Mage::helper('fianet')->__('Fleurs & cadeaux')),
|
29 |
-
array('value' => 8, 'label' => Mage::helper('fianet')->__('Informatique & logiciels')),
|
30 |
-
array('value' => 9, 'label' => Mage::helper('fianet')->__('Santé & beauté')),
|
31 |
-
array('value' => 10, 'label' => Mage::helper('fianet')->__('Services aux particuliers')),
|
32 |
-
array('value' => 11, 'label' => Mage::helper('fianet')->__('Services aux professionnels')),
|
33 |
-
array('value' => 12, 'label' => Mage::helper('fianet')->__('Sport')),
|
34 |
-
array('value' => 13, 'label' => Mage::helper('fianet')->__('Vêtements & accessoires')),
|
35 |
-
array('value' => 14, 'label' => Mage::helper('fianet')->__('Voyage & tourisme')),
|
36 |
-
array('value' => 15, 'label' => Mage::helper('fianet')->__('Hifi, photo & vidéos')),
|
37 |
-
array('value' => 16, 'label' => Mage::helper('fianet')->__('Téléphonie & communication')),
|
38 |
-
array('value' => 17, 'label' => Mage::helper('fianet')->__('Bijoux et métaux précieux')),
|
39 |
-
array('value' => 18, 'label' => Mage::helper('fianet')->__('Articles et accessoires pour bébé')),
|
40 |
-
array('value' => 19, 'label' => Mage::helper('fianet')->__('Sonorisation & lumière'))
|
41 |
-
);
|
42 |
-
}
|
43 |
-
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/controllers/{Category/TypeproductController.php → Adminhtml/Category/ProductTypeController.php}
RENAMED
@@ -1,181 +1,172 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function indexAction() {
|
21 |
-
$this->loadLayout();
|
22 |
-
$this->_setActiveMenu('
|
23 |
-
$this->getLayout()->getBlock('head')
|
24 |
-
->
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$
|
44 |
-
$
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
if ($
|
57 |
-
$this->getRequest()->setParam('id', $
|
58 |
-
}
|
59 |
-
if ($redirect) {
|
60 |
-
$this->_redirect('*/*/edit', $params);
|
61 |
-
return;
|
62 |
-
}
|
63 |
-
|
64 |
-
$categoryId = (int) $this->getRequest()->getParam('id');
|
65 |
-
if ($storeId && !$categoryId && !$parentId) {
|
66 |
-
$store = Mage::app()->getStore($storeId);
|
67 |
-
$
|
68 |
-
$this->getRequest()->setParam('id', $
|
69 |
-
}
|
70 |
-
|
71 |
-
if (!($category = $this->_initCategory(true))) {
|
72 |
-
return;
|
73 |
-
}
|
74 |
-
|
75 |
-
$data = Mage::getSingleton('adminhtml/session')->getCategoryData(true);
|
76 |
-
if (isset($data['general'])) {
|
77 |
-
$category->addData($data['general']);
|
78 |
-
}
|
79 |
-
|
80 |
-
if ($this->getRequest()->getQuery('isAjax')) {
|
81 |
-
// prepare breadcrumbs of selected category, if any
|
82 |
-
|
83 |
-
$breadcrumbsPath = $category->getPath();
|
84 |
-
if (empty($breadcrumbsPath)) {
|
85 |
-
// but if no category, and it is deleted - prepare breadcrumbs from path, saved in session
|
86 |
-
$breadcrumbsPath = Mage::getSingleton('admin/session')->getDeletedPath(true);
|
87 |
-
if (!empty($breadcrumbsPath)) {
|
88 |
-
$breadcrumbsPath = explode('/', $breadcrumbsPath);
|
89 |
-
// no need to get parent breadcrumbs if deleting category level 1
|
90 |
-
if (count($breadcrumbsPath) <= 1) {
|
91 |
-
$breadcrumbsPath = '';
|
92 |
-
} else {
|
93 |
-
array_pop($breadcrumbsPath);
|
94 |
-
$breadcrumbsPath = implode('/', $breadcrumbsPath);
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
Mage::getSingleton('admin/session')
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
$this->
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
$
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
$this->
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
$message = Mage::helper('fianet')->__('Data succesfully deleted.');
|
174 |
-
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
175 |
-
} catch (Exception $e) {
|
176 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
177 |
-
}
|
178 |
-
$this->_redirect('*/*/index/', array("id" => $id, "store" => $storeid));
|
179 |
-
}
|
180 |
-
|
181 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Adminhtml_Category_ProductTypeController extends Fianet_Core_Controller_Tree_ProductType {
|
19 |
+
|
20 |
+
public function indexAction() {
|
21 |
+
$this->loadLayout();
|
22 |
+
$this->_setActiveMenu('adminfianet');
|
23 |
+
$this->getLayout()->getBlock('head')
|
24 |
+
->setCanLoadExtJs(true)
|
25 |
+
->setContainerCssClass('catalog-categories');
|
26 |
+
|
27 |
+
$selectedCategory = Mage::getSingleton('admin/session')->getLastEditedCategory(true);
|
28 |
+
if ($selectedCategory) {
|
29 |
+
$this->getRequest()->setParam('id', $selectedCategory);
|
30 |
+
}
|
31 |
+
|
32 |
+
$selectedCategory = (int) $this->getRequest()->getParam('id', 0);
|
33 |
+
$this->_initCategory(true);
|
34 |
+
|
35 |
+
if ($selectedCategory > 0) {
|
36 |
+
$this->getLayout()->getBlock('tree')->setData('selectedCategory', $selectedCategory);
|
37 |
+
}
|
38 |
+
$this->getLayout()->getBlock('head')->setTitle(Mage::helper('fianet')->__('Product type'));
|
39 |
+
$this->renderLayout();
|
40 |
+
}
|
41 |
+
|
42 |
+
public function editAction() {
|
43 |
+
$params = array('_current' => true);
|
44 |
+
$redirect = false;
|
45 |
+
|
46 |
+
$storeId = (int) $this->getRequest()->getParam('store');
|
47 |
+
$parentId = (int) $this->getRequest()->getParam('parent');
|
48 |
+
$prevStoreId = Mage::getSingleton('admin/session')->getLastViewedStore(true);
|
49 |
+
|
50 |
+
if ($prevStoreId != null && !$this->getRequest()->getQuery('isAjax')) {
|
51 |
+
$params['store'] = $prevStoreId;
|
52 |
+
$redirect = true;
|
53 |
+
}
|
54 |
+
|
55 |
+
$prevCategoryId = Mage::getSingleton('admin/session')->getLastEditedCategory(true);
|
56 |
+
if ($prevCategoryId && !$this->getRequest()->getQuery('isAjax')) {
|
57 |
+
$this->getRequest()->setParam('id', $prevCategoryId);
|
58 |
+
}
|
59 |
+
if ($redirect) {
|
60 |
+
$this->_redirect('*/*/edit', $params);
|
61 |
+
return;
|
62 |
+
}
|
63 |
+
|
64 |
+
$categoryId = (int) $this->getRequest()->getParam('id');
|
65 |
+
if ($storeId && !$categoryId && !$parentId) {
|
66 |
+
$store = Mage::app()->getStore($storeId);
|
67 |
+
$prevCategoryId = (int) $store->getRootCategoryId();
|
68 |
+
$this->getRequest()->setParam('id', $prevCategoryId);
|
69 |
+
}
|
70 |
+
|
71 |
+
if (!($category = $this->_initCategory(true))) {
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
|
75 |
+
$data = Mage::getSingleton('adminhtml/session')->getCategoryData(true);
|
76 |
+
if (isset($data['general'])) {
|
77 |
+
$category->addData($data['general']);
|
78 |
+
}
|
79 |
+
|
80 |
+
if ($this->getRequest()->getQuery('isAjax')) {
|
81 |
+
// prepare breadcrumbs of selected category, if any
|
82 |
+
|
83 |
+
$breadcrumbsPath = $category->getPath();
|
84 |
+
if (empty($breadcrumbsPath)) {
|
85 |
+
// but if no category, and it is deleted - prepare breadcrumbs from path, saved in session
|
86 |
+
$breadcrumbsPath = Mage::getSingleton('admin/session')->getDeletedPath(true);
|
87 |
+
if (!empty($breadcrumbsPath)) {
|
88 |
+
$breadcrumbsPath = explode('/', $breadcrumbsPath);
|
89 |
+
// no need to get parent breadcrumbs if deleting category level 1
|
90 |
+
if (count($breadcrumbsPath) <= 1) {
|
91 |
+
$breadcrumbsPath = '';
|
92 |
+
} else {
|
93 |
+
array_pop($breadcrumbsPath);
|
94 |
+
$breadcrumbsPath = implode('/', $breadcrumbsPath);
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
Mage::getSingleton('admin/session')->setLastViewedStore($this->getRequest()->getParam('store'));
|
100 |
+
Mage::getSingleton('admin/session')->setLastEditedCategory($category->getId());
|
101 |
+
$this->_initLayoutMessages('adminhtml/session');
|
102 |
+
$this->getResponse()->setBody(
|
103 |
+
$this->getLayout()->getMessagesBlock()->getGroupedHtml()
|
104 |
+
. $this->getLayout()->createBlock('fianet/adminhtml_category_productType_edit')->toHtml()
|
105 |
+
. $this->getLayout()->getBlockSingleton('adminhtml/catalog_category_tree')
|
106 |
+
->getBreadcrumbsJavascript($breadcrumbsPath, 'editingCategoryBreadcrumbs')
|
107 |
+
);
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
$this->_redirect('*/*/index');
|
111 |
+
}
|
112 |
+
|
113 |
+
public function saveAction() {
|
114 |
+
$post = $this->getRequest()->getPost();
|
115 |
+
$storeId = $post['storeId'];
|
116 |
+
|
117 |
+
try {
|
118 |
+
if (empty($post)) {
|
119 |
+
Mage::throwException($this->__('Invalid form data.'));
|
120 |
+
}
|
121 |
+
if (isset($post["productType"])) {
|
122 |
+
if ($post["productType"] != "" && $post["productType"] != "0") {
|
123 |
+
$productType = Mage::getModel('fianet/catproduct_association')
|
124 |
+
->loadByCategoryId($post['id']);
|
125 |
+
if ($productType->getId() > 0) {
|
126 |
+
$productType->delete();
|
127 |
+
$productType = Mage::getModel('fianet/catproduct_association');
|
128 |
+
}
|
129 |
+
$productType->setCatalogCategoryEntityId($post['id'])
|
130 |
+
->setFianetProductType($post["productType"])
|
131 |
+
->save();
|
132 |
+
$message = Mage::helper('fianet')->__('Data succesfully saved.');
|
133 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
134 |
+
}
|
135 |
+
if (isset($post['applysubcat'])) {
|
136 |
+
$category = Mage::getModel('catalog/category')->load($post['id']);
|
137 |
+
$subcat = $category->getAllChildren(true);
|
138 |
+
foreach ($subcat as $categoryId) {
|
139 |
+
$productType = Mage::getModel('fianet/catproduct_association')
|
140 |
+
->loadByCategoryId($categoryId);
|
141 |
+
if ($productType->getId() > 0) {
|
142 |
+
$productType->delete();
|
143 |
+
$productType = Mage::getModel('fianet/catproduct_association');
|
144 |
+
}
|
145 |
+
$productType->setCatalogCategoryEntityId($categoryId)
|
146 |
+
->setFianetProductType($post["productType"])
|
147 |
+
->save();
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
} catch (Exception $e) {
|
152 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
153 |
+
}
|
154 |
+
$this->_redirect('*/*/index/', array('_current' => true, "id" => $post['id'], "store" => $storeId));
|
155 |
+
}
|
156 |
+
|
157 |
+
public function deleteAction() {
|
158 |
+
$id = $this->getRequest()->getParam('id', 0);
|
159 |
+
$storeId = $this->getRequest()->getParam('store', 0);
|
160 |
+
try {
|
161 |
+
Mage::getModel('fianet/catproduct_association')
|
162 |
+
->loadByCategoryId($id)
|
163 |
+
->delete();
|
164 |
+
$message = Mage::helper('fianet')->__('Data succesfully deleted.');
|
165 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
166 |
+
} catch (Exception $e) {
|
167 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
168 |
+
}
|
169 |
+
$this->_redirect('*/*/index/', array("id" => $id, "store" => $storeId));
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/controllers/{ConfigurationController.php → Adminhtml/ConfigurationController.php}
RENAMED
@@ -10,17 +10,17 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
public function indexAction() {
|
21 |
$this->loadLayout();
|
22 |
|
23 |
-
$this->_setActiveMenu('
|
24 |
/*if (!Mage::app()->isSingleStoreMode()) {
|
25 |
$this->_addLeft($this->getLayout()->createBlock('fianet/store_switcher'));
|
26 |
}*/
|
@@ -90,4 +90,4 @@ class Fianet_Core_ConfigurationController extends Mage_Adminhtml_Controller_Acti
|
|
90 |
$this->_redirect('*/*/index/store/' . $storeId);
|
91 |
}
|
92 |
|
93 |
-
}
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
+
class Fianet_Core_Adminhtml_ConfigurationController extends Mage_Adminhtml_Controller_Action {
|
19 |
|
20 |
public function indexAction() {
|
21 |
$this->loadLayout();
|
22 |
|
23 |
+
$this->_setActiveMenu('adminfianet');
|
24 |
/*if (!Mage::app()->isSingleStoreMode()) {
|
25 |
$this->_addLeft($this->getLayout()->createBlock('fianet/store_switcher'));
|
26 |
}*/
|
90 |
$this->_redirect('*/*/index/store/' . $storeId);
|
91 |
}
|
92 |
|
93 |
+
}
|
app/code/community/Fianet/Core/controllers/{LogController.php → Adminhtml/LogController.php}
RENAMED
@@ -1,84 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
protected function _initAction() {
|
21 |
-
$this->loadLayout()
|
22 |
-
->_setActiveMenu('
|
23 |
-
->_addBreadcrumb(Mage::helper('fianet')->__('Log'), Mage::helper('fianet')->__('Item Manager'));
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$this->
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
$response
|
48 |
-
$response->setHeader('
|
49 |
-
$response->setHeader('
|
50 |
-
$response->setHeader('
|
51 |
-
$response->setHeader('
|
52 |
-
$response->setHeader('
|
53 |
-
$response->setHeader('
|
54 |
-
$response->setHeader('Content-
|
55 |
-
$response->
|
56 |
-
$response->
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
}
|
83 |
-
|
84 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Adminhtml_LogController extends Mage_Adminhtml_Controller_Action {
|
19 |
+
|
20 |
+
protected function _initAction() {
|
21 |
+
$this->loadLayout()
|
22 |
+
->_setActiveMenu('adminfianet')
|
23 |
+
->_addBreadcrumb(Mage::helper('fianet')->__('Log'), Mage::helper('fianet')->__('Item Manager'));
|
24 |
+
$this->getLayout()->getBlock('head')->setTitle(Mage::helper('fianet')->__('Log'));
|
25 |
+
|
26 |
+
return $this;
|
27 |
+
}
|
28 |
+
|
29 |
+
public function indexAction() {
|
30 |
+
$this->_initAction()->renderLayout();
|
31 |
+
}
|
32 |
+
|
33 |
+
public function exportCsvAction() {
|
34 |
+
$fileName = 'fianet_log.csv';
|
35 |
+
$content = $this->getLayout()->createBlock('fianet/adminhtml_log_grid')->getCsv();
|
36 |
+
$this->_sendUploadResponse($fileName, $content);
|
37 |
+
}
|
38 |
+
|
39 |
+
public function exportXmlAction() {
|
40 |
+
$fileName = 'fianet_log.xml';
|
41 |
+
$content = $this->getLayout()->createBlock('fianet/adminhtml_log_grid')->getXml();
|
42 |
+
$this->_sendUploadResponse($fileName, $content);
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function _sendUploadResponse($fileName, $content, $contentType = 'application/octet-stream') {
|
46 |
+
$response = $this->getResponse();
|
47 |
+
$response->setHeader('HTTP/1.1 200 OK', '');
|
48 |
+
$response->setHeader('Pragma', 'public', true);
|
49 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
50 |
+
$response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
|
51 |
+
$response->setHeader('Last-Modified', date('r'));
|
52 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
53 |
+
$response->setHeader('Content-Length', strlen($content));
|
54 |
+
$response->setHeader('Content-type', $contentType);
|
55 |
+
$response->setBody($content);
|
56 |
+
$response->sendResponse();
|
57 |
+
die;
|
58 |
+
}
|
59 |
+
|
60 |
+
public function massDeleteAction() {
|
61 |
+
$fianetIds = $this->getRequest()->getParam('logform');
|
62 |
+
if (!is_array($fianetIds)) {
|
63 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
64 |
+
} else {
|
65 |
+
try {
|
66 |
+
foreach ($fianetIds as $fianetId) {
|
67 |
+
Mage::getModel('fianet/log')->load($fianetId)->delete();
|
68 |
+
}
|
69 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
70 |
+
Mage::helper('adminhtml')->__(
|
71 |
+
'Total of %d record(s) were successfully deleted', count($fianetIds)
|
72 |
+
)
|
73 |
+
);
|
74 |
+
} catch (Exception $e) {
|
75 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
76 |
+
}
|
77 |
+
}
|
78 |
+
$this->_redirect('*/*/index');
|
79 |
+
}
|
80 |
+
|
81 |
+
}
|
|
|
|
|
|
app/code/community/Fianet/Core/controllers/Adminhtml/OrderController.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Adminhtml_OrderController extends Mage_Adminhtml_Controller_Action {
|
19 |
+
|
20 |
+
public function indexAction() {
|
21 |
+
$this->_redirect('adminhtml/sales_order');
|
22 |
+
}
|
23 |
+
|
24 |
+
public function getTransactionStateAction() {
|
25 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Kwixo')) {
|
26 |
+
try {
|
27 |
+
Mage::getModel('kwixo/tagline')->getTransactionState($this->getRequest()->getPost('order_ids', array()));
|
28 |
+
} catch (Exception $e) {
|
29 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
30 |
+
}
|
31 |
+
}
|
32 |
+
$this->_redirect('adminhtml/sales_order');
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getEvaluationAction() {
|
36 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Sac')) {
|
37 |
+
try {
|
38 |
+
Fianet_Sac_Model_Action::getEvaluation($this->getRequest()->getPost('order_ids', array()));
|
39 |
+
Fianet_Sac_Model_Action::getReevaluation($this->getRequest()->getPost('order_ids', array()));
|
40 |
+
} catch (Exception $e) {
|
41 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
42 |
+
}
|
43 |
+
}
|
44 |
+
$this->_redirect('adminhtml/sales_order');
|
45 |
+
}
|
46 |
+
|
47 |
+
public function sentSacAction() {
|
48 |
+
if (Mage::helper('fianet')->checkModuleIsInstalled('Fianet_Sac')) {
|
49 |
+
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
50 |
+
$countHoldOrder = 0;
|
51 |
+
|
52 |
+
$sender = Mage::getModel('fianet/fianet_sender');
|
53 |
+
foreach ($orderIds as $orderId) {
|
54 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
55 |
+
|
56 |
+
if (!Mage::helper('sac/order')->canSendOrder($order, $orderId)) {
|
57 |
+
continue;
|
58 |
+
}
|
59 |
+
|
60 |
+
try {
|
61 |
+
$SacOrder = Fianet_Sac_Model_Fianet_Order_Sac::generateSacOrder($order);
|
62 |
+
$sender->addOrder($SacOrder);
|
63 |
+
$response = $sender->send();
|
64 |
+
$countHoldOrder = Mage::helper('sac/order')->processResponse($response, array($orderId));
|
65 |
+
if ($countHoldOrder > 0) {
|
66 |
+
$this->_getSession()->addSuccess(Mage::helper('fianet')->__('%s order(s) successfully sent to FIA-NET', $countHoldOrder));
|
67 |
+
}
|
68 |
+
} catch (Exception $e) {
|
69 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
$this->_redirect('adminhtml/sales_order');
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
app/code/community/Fianet/Core/controllers/{ShippingController.php → Adminhtml/ShippingController.php}
RENAMED
@@ -1,61 +1,57 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* 2000-2012 FIA-NET
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
-
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
-
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
-
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @author
|
14 |
-
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
-
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
class
|
19 |
-
|
20 |
-
public function indexAction() {
|
21 |
-
$this->loadLayout();
|
22 |
-
$this->_setActiveMenu('
|
23 |
-
$
|
24 |
-
|
25 |
-
$this->getLayout()->getBlock('
|
26 |
-
$this->renderLayout();
|
27 |
-
}
|
28 |
-
|
29 |
-
public function postAction() {
|
30 |
-
$post = $this->getRequest()->getPost();
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
$
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
->
|
47 |
-
->
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
$this->_redirect('*/*');
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
class Fianet_Core_Adminhtml_ShippingController extends Mage_Adminhtml_Controller_Action {
|
19 |
+
|
20 |
+
public function indexAction() {
|
21 |
+
$this->loadLayout();
|
22 |
+
$this->_setActiveMenu('adminfianet');
|
23 |
+
$shippings = Mage::getModel('fianet/mageConfiguration')->getShippingMethods();
|
24 |
+
$this->getLayout()->getBlock('shipping')->setData('shipping', $shippings);
|
25 |
+
$this->getLayout()->getBlock('head')->setTitle(Mage::helper('fianet')->__('Shipping type'));
|
26 |
+
$this->renderLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function postAction() {
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
try {
|
32 |
+
if (empty($post)) {
|
33 |
+
Mage::throwException($this->__('Invalid form data.'));
|
34 |
+
}
|
35 |
+
|
36 |
+
foreach ($post as $Code => $data) {
|
37 |
+
if (trim($data['conveyorName']) != '') {
|
38 |
+
$shippingType = $data['shippingType'];
|
39 |
+
$deliveryTimes = $data['deliveryTimes'];
|
40 |
+
$conveyorName = $data['conveyorName'];
|
41 |
+
Mage::getModel('fianet/shipping_association')
|
42 |
+
->load($Code)
|
43 |
+
->setShippingCode($Code)
|
44 |
+
->setFianetShippingType($shippingType)
|
45 |
+
->setDeliveryTimes($deliveryTimes)
|
46 |
+
->setConveyorName($conveyorName)
|
47 |
+
->save();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Data succesfully saved.'));
|
51 |
+
} catch (Exception $e) {
|
52 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
53 |
+
}
|
54 |
+
$this->_redirect('*/*');
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
|
|
|
|
|
|
|
app/code/community/Fianet/Core/etc/adminhtml.xml
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
-->
|
19 |
+
<config>
|
20 |
+
<menu>
|
21 |
+
<adminfianet module="fianet" translate="title">
|
22 |
+
<title>FIA-NET</title>
|
23 |
+
<sort_order>100</sort_order>
|
24 |
+
<children>
|
25 |
+
<fianetconfig module="fianet" translate="title">
|
26 |
+
<title>Common settings</title>
|
27 |
+
<sort_order>10</sort_order>
|
28 |
+
<children>
|
29 |
+
<producttype translate="title" module="fianet">
|
30 |
+
<title>Product type</title>
|
31 |
+
<sort_order>10</sort_order>
|
32 |
+
<action>fianet/adminhtml_category_productType</action>
|
33 |
+
</producttype>
|
34 |
+
<shippingtype translate="title" module="fianet">
|
35 |
+
<title>Shipping type</title>
|
36 |
+
<sort_order>20</sort_order>
|
37 |
+
<action>fianet/adminhtml_shipping</action>
|
38 |
+
</shippingtype>
|
39 |
+
</children>
|
40 |
+
</fianetconfig>
|
41 |
+
<fianetlog translate="title" module="fianet">
|
42 |
+
<title>Log</title>
|
43 |
+
<sort_order>100</sort_order>
|
44 |
+
<action>fianet/adminhtml_log</action>
|
45 |
+
</fianetlog>
|
46 |
+
</children>
|
47 |
+
</adminfianet>
|
48 |
+
</menu>
|
49 |
+
<acl>
|
50 |
+
<resources>
|
51 |
+
<all>
|
52 |
+
<title>Allow Everything</title>
|
53 |
+
</all>
|
54 |
+
<admin>
|
55 |
+
<children>
|
56 |
+
<adminfianet>
|
57 |
+
<title>FIA-NET</title>
|
58 |
+
<sort_order>190</sort_order>
|
59 |
+
</adminfianet>
|
60 |
+
<system>
|
61 |
+
<children>
|
62 |
+
<config>
|
63 |
+
<children>
|
64 |
+
<fianet translate="title">
|
65 |
+
<title>FIA-NET Section</title>
|
66 |
+
<sort_order>100</sort_order>
|
67 |
+
</fianet>
|
68 |
+
</children>
|
69 |
+
</config>
|
70 |
+
</children>
|
71 |
+
</system>
|
72 |
+
</children>
|
73 |
+
</admin>
|
74 |
+
</resources>
|
75 |
+
</acl>
|
76 |
+
</config>
|
app/code/community/Fianet/Core/etc/config.xml
CHANGED
@@ -10,16 +10,16 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-->
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Fianet_Core>
|
22 |
-
<version>0.
|
23 |
</Fianet_Core>
|
24 |
</modules>
|
25 |
<admin>
|
@@ -47,55 +47,6 @@
|
|
47 |
</Fianet_Core>
|
48 |
</modules>
|
49 |
</translate>
|
50 |
-
<menu>
|
51 |
-
<fianet module="fianet">
|
52 |
-
<title>RNP - Kwixo</title>
|
53 |
-
<sort_order>420</sort_order>
|
54 |
-
<children>
|
55 |
-
<config module="fianet" translate="title">
|
56 |
-
<title>Common settings</title>
|
57 |
-
<sort_order>0</sort_order>
|
58 |
-
<children>
|
59 |
-
<configuration translate="title" module="fianet">
|
60 |
-
<title>Configuration</title>
|
61 |
-
<sort_order>0</sort_order>
|
62 |
-
<action>fianet/configuration</action>
|
63 |
-
</configuration>
|
64 |
-
<catproduct translate="title" module="fianet">
|
65 |
-
<title>Products type</title>
|
66 |
-
<sort_order>1</sort_order>
|
67 |
-
<action>fianet/category_typeproduct</action>
|
68 |
-
</catproduct>
|
69 |
-
<shipping translate="title" module="fianet">
|
70 |
-
<title>Shipping type</title>
|
71 |
-
<sort_order>2</sort_order>
|
72 |
-
<action>fianet/shipping</action>
|
73 |
-
</shipping>
|
74 |
-
</children>
|
75 |
-
</config>
|
76 |
-
<log module="fianet" translate="title">
|
77 |
-
<title>Log</title>
|
78 |
-
<sort_order>10</sort_order>
|
79 |
-
<action>fianet/log</action>
|
80 |
-
</log>
|
81 |
-
</children>
|
82 |
-
</fianet>
|
83 |
-
</menu>
|
84 |
-
<acl>
|
85 |
-
<resources>
|
86 |
-
<all>
|
87 |
-
<title>Allow Everything</title>
|
88 |
-
</all>
|
89 |
-
<admin>
|
90 |
-
<children>
|
91 |
-
<fianet>
|
92 |
-
<title>FIA-NET</title>
|
93 |
-
<sort_order>200</sort_order>
|
94 |
-
</fianet>
|
95 |
-
</children>
|
96 |
-
</admin>
|
97 |
-
</resources>
|
98 |
-
</acl>
|
99 |
<layout>
|
100 |
<updates>
|
101 |
<fianet>
|
@@ -114,25 +65,23 @@
|
|
114 |
<class>Fianet_Core_Model_Mysql4</class>
|
115 |
<entities>
|
116 |
<shipping_association>
|
117 |
-
<table>
|
118 |
</shipping_association>
|
119 |
<catproduct_association>
|
120 |
-
<table>
|
121 |
</catproduct_association>
|
122 |
<configuration>
|
123 |
-
<table>
|
124 |
</configuration>
|
125 |
<configuration_value>
|
126 |
-
<table>
|
127 |
</configuration_value>
|
128 |
<log>
|
129 |
-
<table>
|
130 |
</log>
|
131 |
</entities>
|
132 |
</fianet_mysql4>
|
133 |
-
|
134 |
</models>
|
135 |
-
|
136 |
<resources>
|
137 |
<fianet_setup>
|
138 |
<setup>
|
@@ -156,7 +105,7 @@
|
|
156 |
<blocks>
|
157 |
<adminhtml>
|
158 |
<rewrite>
|
159 |
-
<sales_order_grid>
|
160 |
</rewrite>
|
161 |
</adminhtml>
|
162 |
<fianet>
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-->
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Fianet_Core>
|
22 |
+
<version>1.0.1</version>
|
23 |
</Fianet_Core>
|
24 |
</modules>
|
25 |
<admin>
|
47 |
</Fianet_Core>
|
48 |
</modules>
|
49 |
</translate>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<layout>
|
51 |
<updates>
|
52 |
<fianet>
|
65 |
<class>Fianet_Core_Model_Mysql4</class>
|
66 |
<entities>
|
67 |
<shipping_association>
|
68 |
+
<table>fianet_core_shipping_association</table>
|
69 |
</shipping_association>
|
70 |
<catproduct_association>
|
71 |
+
<table>fianet_core_catproduct_association</table>
|
72 |
</catproduct_association>
|
73 |
<configuration>
|
74 |
+
<table>fianet_core_configuration</table>
|
75 |
</configuration>
|
76 |
<configuration_value>
|
77 |
+
<table>fianet_core_configuration_values</table>
|
78 |
</configuration_value>
|
79 |
<log>
|
80 |
+
<table>fianet_core_log</table>
|
81 |
</log>
|
82 |
</entities>
|
83 |
</fianet_mysql4>
|
|
|
84 |
</models>
|
|
|
85 |
<resources>
|
86 |
<fianet_setup>
|
87 |
<setup>
|
105 |
<blocks>
|
106 |
<adminhtml>
|
107 |
<rewrite>
|
108 |
+
<sales_order_grid>Fianet_Core_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
|
109 |
</rewrite>
|
110 |
</adminhtml>
|
111 |
<fianet>
|
app/code/community/Fianet/Core/sql/fianet_setup/mysql4-install-0.2.1.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
?>
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
?>
|
app/code/community/Fianet/Core/sql/fianet_setup/mysql4-upgrade-0.2.1-0.2.2.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
?>
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
?>
|
app/code/community/Fianet/Core/sql/fianet_setup/mysql4-upgrade-0.2.2-0.5.7.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
?>
|
@@ -28,15 +28,11 @@ $config = array(
|
|
28 |
);
|
29 |
Fianet_Core_Model_Configuration::SetDefaultConfig($config);
|
30 |
*/
|
31 |
-
$
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
->setFianet_shipping_type('4')
|
38 |
-
->setDelivery_times('2')
|
39 |
-
->setConveyor_name('A definir')
|
40 |
-
->save();
|
41 |
}
|
42 |
$installer->endSetup();
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
?>
|
28 |
);
|
29 |
Fianet_Core_Model_Configuration::SetDefaultConfig($config);
|
30 |
*/
|
31 |
+
$shippingList = Mage::getModel('fianet/mageConfiguration')->getShippingMethods();
|
32 |
+
foreach (array_keys($shippingList) as $code) {
|
33 |
+
$installer->run("
|
34 |
+
INSERT IGNORE INTO `{$this->getTable('fianet_shipping_association')}` (`shipping_code`, `fianet_shipping_type`, `delivery_times`, `conveyor_name`) VALUES
|
35 |
+
('{$code}', '4', '2', 'A definir');
|
36 |
+
");
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
$installer->endSetup();
|
app/code/community/Fianet/Core/sql/fianet_setup/mysql4-upgrade-0.9.0-1.0.0.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* 2000-2012 FIA-NET
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0) that is available
|
9 |
+
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
+
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
+
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
+
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
?>
|
19 |
+
<?php
|
20 |
+
|
21 |
+
$installer = $this;
|
22 |
+
$installer->startSetup();
|
23 |
+
$installer->run("
|
24 |
+
RENAME TABLE
|
25 |
+
`{$this->getTable('fianet_shipping_association')}` TO `{$this->getTable('fianet_core_shipping_association')}`,
|
26 |
+
`{$this->getTable('fianet_catproduct_association')}` TO `{$this->getTable('fianet_core_catproduct_association')}`,
|
27 |
+
`{$this->getTable('fianet_configuration')}` TO `{$this->getTable('fianet_core_configuration')}`,
|
28 |
+
`{$this->getTable('fianet_configuration_values')}` TO `{$this->getTable('fianet_core_configuration_values')}`,
|
29 |
+
`{$this->getTable('fianet_log')}` TO `{$this->getTable('fianet_core_log')}`;
|
30 |
+
");
|
31 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/fianet.xml
CHANGED
@@ -10,36 +10,35 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-->
|
19 |
<layout>
|
20 |
-
<
|
21 |
<reference name="left">
|
22 |
-
|
23 |
-
<block type="fianet/tree_typeProduct" name="tree"></block>
|
24 |
</reference>
|
25 |
<reference name="content">
|
26 |
-
<block type="fianet/
|
27 |
</reference>
|
28 |
-
</
|
29 |
-
<
|
30 |
<reference name="content">
|
31 |
-
<block type="fianet/
|
32 |
</reference>
|
33 |
-
</
|
34 |
-
<
|
35 |
<reference name="content">
|
36 |
-
<block type="fianet/
|
37 |
</reference>
|
38 |
-
</
|
39 |
-
<
|
40 |
<reference name="left">
|
41 |
-
<block type="fianet/
|
42 |
-
<block type="fianet/
|
43 |
<action method="addConfigurationTab">
|
44 |
<name>CommonTab</name>
|
45 |
<label>Common</label>
|
@@ -49,7 +48,7 @@
|
|
49 |
</block>
|
50 |
</reference>
|
51 |
<reference name="content">
|
52 |
-
<block type="fianet/
|
53 |
</reference>
|
54 |
-
</
|
55 |
</layout>
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-->
|
19 |
<layout>
|
20 |
+
<fianet_adminhtml_category_producttype_index>
|
21 |
<reference name="left">
|
22 |
+
<block type="fianet/adminhtml_tree_productType" name="tree" />
|
|
|
23 |
</reference>
|
24 |
<reference name="content">
|
25 |
+
<block type="fianet/adminhtml_category_productType_edit" name="catproduct" template="fianet/common/categorytreeformcontenair.phtml"/>
|
26 |
</reference>
|
27 |
+
</fianet_adminhtml_category_producttype_index>
|
28 |
+
<fianet_adminhtml_shipping_index>
|
29 |
<reference name="content">
|
30 |
+
<block type="fianet/adminhtml_fianetadmin" name="shipping" template="fianet/common/shipping.phtml"/>
|
31 |
</reference>
|
32 |
+
</fianet_adminhtml_shipping_index>
|
33 |
+
<fianet_adminhtml_log_index>
|
34 |
<reference name="content">
|
35 |
+
<block type="fianet/adminhtml_fianetadmingrid" name="log" />
|
36 |
</reference>
|
37 |
+
</fianet_adminhtml_log_index>
|
38 |
+
<fianet_adminhtml_configuration_index>
|
39 |
<reference name="left">
|
40 |
+
<block type="fianet/adminhtml_store_switcher" name="storeswitcher" />
|
41 |
+
<block type="fianet/adminhtml_configuration_tab" name="fianet_configuration_tabs">
|
42 |
<action method="addConfigurationTab">
|
43 |
<name>CommonTab</name>
|
44 |
<label>Common</label>
|
48 |
</block>
|
49 |
</reference>
|
50 |
<reference name="content">
|
51 |
+
<block type="fianet/adminhtml_configuration" name="configuration_content" />
|
52 |
</reference>
|
53 |
+
</fianet_adminhtml_configuration_index>
|
54 |
</layout>
|
app/design/adminhtml/default/default/template/fianet/common/categoriestree.phtml
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
-
* @author
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
-
* @version Release: $Revision: 0.
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
+
* @version Release: $Revision: 1.0.1 $
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
app/design/adminhtml/default/default/template/fianet/common/categorytreeformcontenair.phtml
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
-
* @author
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
-
* @version Release: $Revision: 0.
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
+
* @version Release: $Revision: 1.0.1 $
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
app/design/adminhtml/default/default/template/fianet/common/catproduct.phtml
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
-
* @author
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
-
* @version Release: $Revision: 0.
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
+
* @version Release: $Revision: 1.0.1 $
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
app/design/adminhtml/default/default/template/fianet/common/shipping.phtml
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
-
* @author
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
-
* @version Release: $Revision: 0.
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
+
* @version Release: $Revision: 1.0.1 $
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
app/design/adminhtml/default/default/template/fianet/common/storeswitcher.phtml
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
-
* @author
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
-
* @version Release: $Revision: 0.
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
+
* @version Release: $Revision: 1.0.1 $
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
app/design/adminhtml/default/default/template/fianet/common/test.php
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
-
* @author
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
-
* @version Release: $Revision: 0.
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
@@ -48,9 +48,9 @@ $storeid = $this->getRequest()->getParam('store', 0);
|
|
48 |
<input type="hidden" name="store" value="<?php echo $storeid; ?>">
|
49 |
<input type="hidden" name="id" value="<?php echo $this->selectedcategorieid; ?>">
|
50 |
<input type="hidden" name="name" value="<?php echo $this->selectedcategoriename; ?>">
|
51 |
-
<select name="
|
52 |
<?php
|
53 |
-
$types = Mage::getModel('fianet/
|
54 |
if ($this->producttype->getId() <= 0) {
|
55 |
echo '<optgroup label="' . $this->__('Choose a value') . '">';
|
56 |
echo '<option value="" selected>' . $this->__('Nothing configured') . '</option>';
|
@@ -74,4 +74,4 @@ $storeid = $this->getRequest()->getParam('store', 0);
|
|
74 |
<script type="text/javascript">
|
75 |
var editForm = new varienForm('edit_form');
|
76 |
//var advForm = new varienForm('advanced_form');
|
77 |
-
</script>
|
9 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
10 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
11 |
*
|
12 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
13 |
* @copyright 2000-2012 FIA-NET
|
14 |
+
* @version Release: $Revision: 1.0.1 $
|
15 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
16 |
*/
|
17 |
?>
|
48 |
<input type="hidden" name="store" value="<?php echo $storeid; ?>">
|
49 |
<input type="hidden" name="id" value="<?php echo $this->selectedcategorieid; ?>">
|
50 |
<input type="hidden" name="name" value="<?php echo $this->selectedcategoriename; ?>">
|
51 |
+
<select name="productType">
|
52 |
<?php
|
53 |
+
$types = Mage::getModel('fianet/source_productType')->toOptionArray();
|
54 |
if ($this->producttype->getId() <= 0) {
|
55 |
echo '<optgroup label="' . $this->__('Choose a value') . '">';
|
56 |
echo '<option value="" selected>' . $this->__('Nothing configured') . '</option>';
|
74 |
<script type="text/javascript">
|
75 |
var editForm = new varienForm('edit_form');
|
76 |
//var advForm = new varienForm('advanced_form');
|
77 |
+
</script>
|
app/etc/modules/{ZFianet_Core.xml → Fianet_Core.xml}
RENAMED
@@ -10,9 +10,9 @@
|
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
-
* @author
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
-
* @version Release: $Revision: 0.
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-->
|
@@ -28,7 +28,7 @@
|
|
28 |
<depends>
|
29 |
</depends>
|
30 |
<!-- declare module's version information for database updates -->
|
31 |
-
<version>0.
|
32 |
</Fianet_Core>
|
33 |
</modules>
|
34 |
</config>
|
10 |
* If you are unable to obtain it through the world-wide-web, please contact us
|
11 |
* via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @author FIA-NET <support-boutique@fia-net.com>
|
14 |
* @copyright 2000-2012 FIA-NET
|
15 |
+
* @version Release: $Revision: 1.0.1 $
|
16 |
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
17 |
*/
|
18 |
-->
|
28 |
<depends>
|
29 |
</depends>
|
30 |
<!-- declare module's version information for database updates -->
|
31 |
+
<version>1.0.1</version>
|
32 |
</Fianet_Core>
|
33 |
</modules>
|
34 |
</config>
|
app/locale/fr_FR/Fianet_Core.csv
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
"Value","Valeur"
|
33 |
"SAC configuration","Configuration SAC"
|
34 |
"XML encoding","Encodage XML"
|
35 |
-
"Shipping type","
|
36 |
"Shipping methods list","Liste des méthodes de livraisons"
|
37 |
"Shipping method","Méthode de livraison"
|
38 |
"FIA-NET Shipping type","Type de livraison"
|
@@ -141,7 +141,8 @@
|
|
141 |
"%s items saved.","%s enregistrements sauvegardés."
|
142 |
"Manage payment configuration","Gérer la configuration des moyens de paiement"
|
143 |
"Payment methods","Méthodes de paiement"
|
144 |
-
"Sent to
|
|
|
145 |
"%s order(s) successfully sent to FIA-NET","%s commande(s) envoyées avec succès à FIA-NET"
|
146 |
"%s evaluation(s) successfully receipted","%s évaluation(s) reçue(s) avec succès"
|
147 |
"Error on transaction","Transaction en erreur"
|
@@ -188,7 +189,7 @@
|
|
188 |
"Delivery time based on product attribute","Délai de livraison basé sur l'attribut produit"
|
189 |
"Out of stock delivery time based on product attribute","Délai de livraison stock épuisé basé sur l'attribut produit"
|
190 |
"Merchant maximum delivery times","Délais de livraison marchand maximum"
|
191 |
-
"Get evaluations","FIA-NET : Récupérer les évaluations"
|
192 |
"Attempt to retrieve Reevaluation...","Tentative de récupération des réevaluations..."
|
193 |
"%s reevaluation found.","%s réévaluations trouvées."
|
194 |
"Order %s updated to eval %s","Commande %s mise à jour vers évaluation %s"
|
32 |
"Value","Valeur"
|
33 |
"SAC configuration","Configuration SAC"
|
34 |
"XML encoding","Encodage XML"
|
35 |
+
"Shipping type","Type de livraisons"
|
36 |
"Shipping methods list","Liste des méthodes de livraisons"
|
37 |
"Shipping method","Méthode de livraison"
|
38 |
"FIA-NET Shipping type","Type de livraison"
|
141 |
"%s items saved.","%s enregistrements sauvegardés."
|
142 |
"Manage payment configuration","Gérer la configuration des moyens de paiement"
|
143 |
"Payment methods","Méthodes de paiement"
|
144 |
+
"Sent to CERTISSIM FIA-NET","CERTISSIM FIA-NET : Soumettre à l'analyse"
|
145 |
+
"KWIXO FIA-NET : get back transaction's state","KWIXO FIA-NET : Récupérer l'état de la transaction"
|
146 |
"%s order(s) successfully sent to FIA-NET","%s commande(s) envoyées avec succès à FIA-NET"
|
147 |
"%s evaluation(s) successfully receipted","%s évaluation(s) reçue(s) avec succès"
|
148 |
"Error on transaction","Transaction en erreur"
|
189 |
"Delivery time based on product attribute","Délai de livraison basé sur l'attribut produit"
|
190 |
"Out of stock delivery time based on product attribute","Délai de livraison stock épuisé basé sur l'attribut produit"
|
191 |
"Merchant maximum delivery times","Délais de livraison marchand maximum"
|
192 |
+
"CERTISSIM FIA-NET : Get evaluations","CERTISSIM FIA-NET : Récupérer les évaluations"
|
193 |
"Attempt to retrieve Reevaluation...","Tentative de récupération des réevaluations..."
|
194 |
"%s reevaluation found.","%s réévaluations trouvées."
|
195 |
"Order %s updated to eval %s","Commande %s mise à jour vers évaluation %s"
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fianet_Core</name>
|
4 |
-
<version>0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>FIA-NET Core</summary>
|
10 |
<description>Base module for Kwixo and Certissim</description>
|
11 |
-
<notes>official commit</notes>
|
12 |
<authors><author><name>FIA-NET</name><user>FIA-NET</user><email>support-boutique@fia-net.com</email></author></authors>
|
13 |
<date>2013-05-24</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Fianet"><dir name="Core"><dir name="Block"><dir name="Category"><dir name="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.2.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fianet_Core</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>FIA-NET Core</summary>
|
10 |
<description>Base module for Kwixo and Certissim</description>
|
11 |
+
<notes>second official commit</notes>
|
12 |
<authors><author><name>FIA-NET</name><user>FIA-NET</user><email>support-boutique@fia-net.com</email></author></authors>
|
13 |
<date>2013-05-24</date>
|
14 |
+
<time>12:18:45</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Fianet"><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="ProductType"><dir name="Edit"><file name="Form.php" hash="87ad370478bf58f390c60dc563d38da3"/></dir><file name="Edit.php" hash="f481cb4e072cd195732db6edd1e50d13"/></dir></dir><dir name="Configuration"><file name="Content.php" hash="412c6b16d83e8ddd0c6b2261b5269efc"/><dir name="Edit"><file name="Form.php" hash="fa0080bfd45ee413de8c400005ca420f"/></dir><file name="Tab.php" hash="38a2cc1f8ea325535ab1f18b0ec566e5"/></dir><file name="Configuration.php" hash="9f17b79cfe6074c449f9e71fd7d39056"/><file name="Fianetadmin.php" hash="2bc89f9170131fa6779e2e935e8a84c7"/><file name="Fianetadmingrid.php" hash="6a07b1c2f6238c444816fa62c3951507"/><dir name="Log"><file name="Grid.php" hash="17483423b9ab029230b9a7f6c5176f45"/></dir><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="9df7c8c7c02069a09a3eb33c6501caaf"/></dir></dir><dir name="Store"><file name="Switcher.php" hash="902311c5667f25fe9b67d1baae64cc87"/></dir><dir name="Tree"><file name="Abstract.php" hash="96a54fc0c5ba897411c0fb425e7b3714"/><file name="ProductType.php" hash="43dd0a9cadc438d4c0fa3565e3888e34"/><file name="Products.php" hash="fc4e3bc9dd8de518e33623b45d558b15"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Fianet.php" hash="882bde72fd0a57944374693e4c5e8c01"/></dir><dir name="Renderer"><file name="Fianet.php" hash="7a5024f0b47f94ef3482e29b68b7b283"/></dir></dir></dir></dir></dir></dir><dir name="Controller"><dir name="Tree"><file name="Abstract.php" hash="30dd6f6d11a656c251eb18cb4f63bc8c"/><file name="ProductType.php" hash="a93b942d365c17fe5d626b4821744967"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a8410abb40383d46394401cbccaeb32d"/></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="e696b4e85ca2f746173825c415f0a279"/></dir><dir name="Catproduct"><file name="Association.php" hash="6dab43b07f3fc43222261f30e9899fa3"/></dir><dir name="Configuration"><file name="Global.php" hash="20b63772e57d6bfd1bd07a2855021bb7"/><file name="Value.php" hash="57a4fffb55092d93e0e793a25a487a04"/></dir><file name="Configuration.php" hash="d3d4d55eb0504cbc40872b1760c05586"/><dir name="Fianet"><file name="EncodingKey.php" hash="6f3d9ddd5feda8811c1afb7b0bfde9cb"/><file name="Hash32bits.php" hash="0648df1467365367a5a3c33362a9fad8"/><file name="Hash64bits.php" hash="fab0e27b42f99cad7f6385e9785227e3"/><dir name="Order"><dir name="Address"><file name="Base.php" hash="9b4778a170d52b4a5a9da8c39ba15c9a"/><file name="Billing.php" hash="720d3c6f50559c1d8a1b2d38338c6938"/><file name="Delivery.php" hash="2bd4ccaa1a2cc552e18878c190bf1ac2"/></dir><dir name="Info"><dir name="Productlist"><file name="Product.php" hash="bf7325fe7754d12ac566f14ac7e7fdd9"/></dir><file name="Productlist.php" hash="0b6d5b83c89d87fcd48d54c667dc60b6"/><file name="Transport.php" hash="9e4d273e0f2128a09a89c3c639ee42de"/></dir><file name="Optionpayment.php" hash="0b32e90a39f702cc6681602a8bbd392f"/><file name="Payment.php" hash="a6811c2e0453357d7fc3995a22e3d88d"/><dir name="User"><file name="Base.php" hash="07db577376353edd944b60a42f4ffff3"/><file name="Billing.php" hash="98ca1e4bc258b27099a608c7ca80d135"/><file name="Delivery.php" hash="d2a086e96dbcd3c3eb36f02c66261800"/><file name="Siteconso.php" hash="c90e022ab84445ffd4ffc68983019a65"/></dir><file name="Wallet.php" hash="89e9821c48a6862f7a2910c16b8ea0a2"/></dir><dir name="Paramcallback"><file name="Builder.php" hash="99238cc7187a146444d2f44a09945cb6"/><file name="Element.php" hash="32d5f60690125f0d50f163faa148a6fc"/></dir><file name="Parser.php" hash="0ff794bd40a6db4e6ba5c5417d94b8ef"/><file name="Sender.php" hash="cc2a9b6ad187dec56a87216ee9a71560"/></dir><file name="Functions.php" hash="95e6796d325515c41172cde7b78345ca"/><file name="Log.php" hash="ba429491ffe5849a60a6ee02b212b542"/><file name="MageConfiguration.php" hash="b761f3d930a006c5242b7f36a9ffc32e"/><dir name="Mysql4"><file name="Abstract.php" hash="e0f4b75096db5b25126932b6c41982b2"/><dir name="Catproduct"><dir name="Association"><file name="Collection.php" hash="5c1d12031075fe334f9d1a711794d243"/></dir><file name="Association.php" hash="2227225b8414e489cbef78b80eae8380"/></dir><dir name="Configuration"><file name="Collection.php" hash="4dce71a7a82e9ecedf7c953c72a8f0be"/><file name="Global.php" hash="95ad28248156e54d07dcad1a6c9f8ce6"/><dir name="Value"><file name="Collection.php" hash="1673e4052650537628fdbb0b2d780b69"/></dir><file name="Value.php" hash="e33c382cbe8ec8659f7fe3462e5a9f69"/></dir><file name="Configuration.php" hash="a65fc872171fdaac6932d51257b7362d"/><dir name="Log"><file name="Collection.php" hash="9fd09ffe8b8f8f010785e1ae5c2398ca"/></dir><file name="Log.php" hash="42391e71a09a0b6e905854559eb08f26"/><dir name="Scope"><file name="Abstract.php" hash="c4e27ea8a5d1e535cb19598d0348e148"/></dir><file name="Setup.php" hash="dd4bd94e58dbbe3cd0505581b8d1e43a"/><dir name="Shipping"><dir name="Association"><file name="Collection.php" hash="488a297a483bee7021b0978f0ead5c34"/></dir><file name="Association.php" hash="540b319b05d9f3430521e3292026419a"/></dir></dir><file name="Product.php" hash="77ec579fc5d30c1d34c059209c0599f6"/><dir name="Scope"><file name="Abstract.php" hash="a110779847591c79a31f04b7e6402468"/></dir><dir name="Shipping"><file name="Association.php" hash="385fc95d785b6af6a00f055337d1d8ba"/></dir><dir name="Source"><file name="Charset.php" hash="79553ad04a0aa4aebb18a29903c07359"/><file name="Crypt.php" hash="c5af1d181f4c0e7eead1e2372f3d1807"/><file name="DeliveryTimes.php" hash="ae0d540bbb2b1c5d968d1fc47c4bab0d"/><file name="Mode.php" hash="180e54b5ee4caffefd837de792a1c7ef"/><file name="PaymentType.php" hash="67a88322641642736f307f9e419e9579"/><file name="ProductType.php" hash="1a3d3287d76985fc1477c6095dac236d"/><file name="ShippingType.php" hash="16d340c487718574a342ec15ef81361b"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Category"><file name="ProductTypeController.php" hash="45d6e5a6109ed591c8901051050da22c"/></dir><file name="ConfigurationController.php" hash="7b28bce0fef7c5780f5b3106061b2c21"/><file name="LogController.php" hash="0db0bb8414c1a4f6c1b2096a140eaff7"/><file name="OrderController.php" hash="0bc887f609af619d23ffcfef32523f4c"/><file name="ShippingController.php" hash="01af05e5cce488d85a42276f755599d0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b2e387d53d1072884026d0a88269d3d8"/><file name="config.xml" hash="23665c46c7426ad7bd02626032e9bd80"/></dir><dir name="sql"><dir name="fianet_setup"><file name="mysql4-install-0.2.1.php" hash="e126383c574b9791a9c658f144318903"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="4356a42117b4a0a4eb3162d35ba93b03"/><file name="mysql4-upgrade-0.2.2-0.5.7.php" hash="8c739186980ad75414cc99f01b44f6ea"/><file name="mysql4-upgrade-0.9.0-1.0.0.php" hash="a126d8380916900618a4210ec53004c7"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fianet.xml" hash="961d56819fea57097bfbccd6d87dc455"/></dir><dir name="template"><dir name="fianet"><dir name="common"><file name="categoriestree.phtml" hash="e2b9eb5b0e98cb7c14e0e287bb42a341"/><file name="categorytreeformcontenair.phtml" hash="449b1d2837f083e2210d35724f17a486"/><file name="catproduct.phtml" hash="4252d5f64053a2f6bc3e1cdaacf2642b"/><file name="shipping.phtml" hash="3ca381a6c80c41c42d7acc779d67bd12"/><file name="storeswitcher.phtml" hash="31ba26699ec17e9d58ee5ad8c7fc9271"/><file name="test.php" hash="e2e33bc59536ceb268c48a8218335ae5"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fianet_Core.xml" hash="7febb942280e97670573066b2630ee86"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Core.csv" hash="637f7e824369d0a1a5e5b13389898ad4"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="fianet"><file name="CE_picto_orange.gif" hash="6805aa75f9bb9e85d9b71e525852c515"/><file name="CE_picto_rouge.gif" hash="9d0b3298b2f18db90db27a870bff1c1e"/><file name="CE_picto_vert.gif" hash="335dd69b814bfe155117126b65ddb303"/><file name="RnP.gif" hash="d2f0083a5731f301b9a3bdcff327e19c"/><file name="attention.gif" hash="d85cab75ed2cba677829db26b1f0a6c2"/><file name="cb15.gif" hash="c9b308669efc27038043480400ab99e2"/><file name="fianet_SAC_icon.gif" hash="be9ce72c9a2bd81611a9e82537a8e15a"/><file name="icon_reset.gif" hash="1a883459cf1035dbc4fcd21c777af477"/><file name="ko.gif" hash="3d479be5db8b4b2ffa67612eeb5d47e1"/><file name="ok.gif" hash="1f6c46ba51a3f8732f62a65c0533f118"/><file name="rnp_tag.gif" hash="caeb5b7040352e4bcf7c3e09d4b1f085"/><file name="rond_rouge.gif" hash="c605401e88cd234a31691dc9e4a38b05"/><file name="rond_vert.gif" hash="ce704184ee159f7008f81af51a747e71"/><file name="rond_vertclair.gif" hash="b0310ca593cd539b88463d720df3cd60"/><file name="sof15.gif" hash="0f1e01ce195d2fb3da0700813a5ccd35"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.9</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/adminhtml/default/default/images/fianet/CE_picto_orange.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/fianet/CE_picto_rouge.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/fianet/CE_picto_vert.gif
ADDED
Binary file
|