Version Notes
1. REST service consumer added
2. other minor improvements
Download this release
Release Info
Developer | Qixol |
Extension | Holbi_Qixol |
Version | 0.2.0 |
Comparing to | |
See all releases |
Code changes from version 0.1.0 to 0.2.0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner.php +10 -10
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit.php +80 -68
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Bannerimage/Grid.php +149 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Bannerimage/Tab/Form.php +131 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Form.php +18 -18
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Tab/Bannerimage.php +31 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Tab/Form.php +51 -176
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Tabs.php +37 -19
- app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Grid.php +108 -167
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit.php +36 -36
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit/Form.php +18 -18
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit/Tab/Form.php +87 -87
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit/Tabs.php +19 -19
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Grid.php +84 -84
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage.php +11 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit.php +24 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit/Form.php +19 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit/Tab/Form.php +41 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit/Tabs.php +19 -0
- app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap.php +2 -2
- app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit.php +36 -36
- app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit/Form.php +16 -16
- app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit/Tab/Form.php +65 -65
- app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit/Tabs.php +19 -19
- app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Grid.php +96 -96
- app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap.php +2 -2
- app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit.php +36 -36
- app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit/Form.php +16 -16
- app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit/Tab/Form.php +150 -88
- app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit/Tabs.php +19 -19
- app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Grid.php +128 -118
- app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker.php +10 -10
- app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit.php +68 -68
- app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit/Form.php +18 -18
- app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit/Tab/Form.php +130 -246
- app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit/Tabs.php +19 -19
- app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Grid.php +131 -159
- app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap.php +2 -2
- app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit.php +36 -36
- app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit/Form.php +16 -16
- app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit/Tab/Form.php +132 -65
- app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit/Tabs.php +19 -19
- app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Grid.php +109 -96
- app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column.php +35 -35
- app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column/Filter/Banner.php +6 -6
- app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column/Renderer/Banner.php +30 -30
- app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column/Renderer/Sticker.php +38 -38
- app/code/community/Holbi/Qixol/Block/Banner.php +53 -53
- app/code/community/Holbi/Qixol/Block/Sticker.php +53 -53
- app/code/community/Holbi/Qixol/Model/Advert.php +126 -65
- app/code/community/Holbi/Qixol/Model/Banner.php +80 -70
- app/code/community/Holbi/Qixol/Model/Bannerboxes.php +35 -35
- app/code/community/Holbi/Qixol/Model/Bannerimage.php +91 -0
- app/code/community/Holbi/Qixol/Model/Bannerimages.php +0 -25
- app/code/community/Holbi/Qixol/Model/Customergrouspmap.php +20 -20
- app/code/community/Holbi/Qixol/Model/Mysql4/Banner.php +146 -238
- app/code/community/Holbi/Qixol/Model/Mysql4/Banner/Collection.php +8 -8
- app/code/community/Holbi/Qixol/Model/Mysql4/Bannerboxes/Collection.php +8 -8
- app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimage.php +7 -0
- app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimage/Collection.php +8 -0
- app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimages.php +0 -8
- app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimages/Collection.php +0 -9
- app/code/community/Holbi/Qixol/Model/Mysql4/Customergrouspmap/Collection.php +8 -8
- app/code/community/Holbi/Qixol/Model/Mysql4/Shippingmap/Collection.php +8 -8
- app/code/community/Holbi/Qixol/Model/Mysql4/Sticker.php +237 -49
- app/code/community/Holbi/Qixol/Model/Mysql4/Sticker/Collection.php +8 -8
- app/code/community/Holbi/Qixol/Model/Mysql4/Storesmap/Collection.php +8 -8
- app/code/community/Holbi/Qixol/Model/PromoService.php +201 -0
- app/code/community/Holbi/Qixol/Model/RESTPromoService.php +357 -0
- app/code/community/Holbi/Qixol/Model/SOAPPromoService.php +273 -0
- app/code/community/Holbi/Qixol/Model/Shippingmap.php +20 -20
- app/code/community/Holbi/Qixol/Model/Sinch.php +1311 -1303
- app/code/community/Holbi/Qixol/Model/Status.php +3 -3
- app/code/community/Holbi/Qixol/Model/Sticker.php +66 -66
- app/code/community/Holbi/Qixol/Model/Storesmap.php +20 -20
- app/code/community/Holbi/Qixol/Model/System/Config/Source/IServiceProtocols/Values.php +28 -0
- app/code/community/Holbi/Qixol/Model/System/Config/Source/Iservices/Values.php +5 -1
- app/code/community/Holbi/Qixol/Model/System/Config/Source/Shippings/List.php +2 -6
- app/code/community/Holbi/Qixol/Model/iPromoService.php +29 -0
- app/code/community/Holbi/Qixol/controllers/Adminhtml/BannerController.php +257 -247
- app/code/community/Holbi/Qixol/controllers/Adminhtml/BannerimageController.php +258 -0
- app/code/community/Holbi/Qixol/controllers/Adminhtml/CustomergrouspmapController.php +2 -2
- app/code/community/Holbi/Qixol/controllers/Adminhtml/ShippingmapController.php +1 -1
- app/code/community/Holbi/Qixol/controllers/Adminhtml/StickerController.php +207 -223
- app/code/community/Holbi/Qixol/controllers/Adminhtml/StoresmapController.php +1 -1
- app/code/community/Holbi/Qixol/controllers/AjaxController.php +21 -4
- app/code/community/Holbi/Qixol/etc/adminhtml.xml +4 -1
- app/code/community/Holbi/Qixol/etc/config.xml +29 -32
- app/code/community/Holbi/Qixol/etc/system.xml +142 -67
- app/code/community/Holbi/Qixol/sql/qixol_setup/mysql4-install-0.1.0.php +279 -278
- app/code/community/Holbi/Qixol/sql/qixol_setup/mysql4-install-0.2.0.php +247 -0
- app/code/community/Holbi/Qixol/sql/qixol_setup/mysql4-upgrade-0.1.0-0.2.0.php +123 -0
- app/design/adminhtml/default/default/layout/qixol.xml +0 -102
- app/design/adminhtml/default/default/template/qixol/bannerboxes.phtml +0 -1
- app/design/adminhtml/default/default/template/qixol/banners.phtml +0 -50
- app/design/adminhtml/default/default/template/qixol/customergrouspmap.phtml +0 -1
- app/design/adminhtml/default/default/template/qixol/order/advert.phtml +0 -38
- app/design/adminhtml/default/default/template/qixol/qixolbackend.phtml +0 -196
- app/design/adminhtml/default/default/template/qixol/shippingmap.phtml +0 -1
- app/design/adminhtml/default/default/template/qixol/stickers.phtml +0 -50
- app/design/adminhtml/default/default/template/qixol/storesmap.phtml +0 -1
- app/design/adminhtml/default/default/template/qixol/system/config/attributes.phtml +0 -10
- app/design/frontend/base/default/layout/qixol.xml +0 -154
- app/design/frontend/base/default/template/qixol/cart/advert.phtml +0 -91
- app/design/frontend/base/default/template/qixol/cart/bonuspointbox.phtml +0 -75
- app/design/frontend/base/default/template/qixol/cart/cart.phtml +0 -246
- app/design/frontend/base/default/template/qixol/cart/item/default.phtml +0 -386
- app/design/frontend/base/default/template/qixol/cart/totals.phtml +0 -1
- app/design/frontend/base/default/template/qixol/issuedcoupon/list.phtml +0 -95
- app/design/frontend/base/default/template/qixol/issuedpoints/box.phtml +0 -6
- app/design/frontend/base/default/template/qixol/issuedpoints/dashboard_points.phtml +0 -10
- app/design/frontend/base/default/template/qixol/minicart/advert.phtml +0 -64
- app/design/frontend/base/default/template/qixol/minicart/default.phtml +0 -238
- app/design/frontend/base/default/template/qixol/minicart/mincart.phtml +0 -250
- app/design/frontend/base/default/template/qixol/myaccount/order/email/default.phtml +0 -163
- app/design/frontend/base/default/template/qixol/myaccount/order/email/items.phtml +0 -138
- app/design/frontend/base/default/template/qixol/myaccount/order/invoice/default.phtml +0 -328
- app/design/frontend/base/default/template/qixol/myaccount/order/invoice/invoice.phtml +0 -128
- app/design/frontend/base/default/template/qixol/myaccount/order/items/default.phtml +0 -347
- app/design/frontend/base/default/template/qixol/myaccount/order/items/items.phtml +0 -109
- app/design/frontend/base/default/template/qixol/myaccount/order/print/default.phtml +0 -347
- app/design/frontend/base/default/template/qixol/myaccount/order/print/messages.phtml +0 -1
- app/design/frontend/base/default/template/qixol/myaccount/order/print/print.phtml +0 -132
- app/design/frontend/base/default/template/qixol/onepage/advert.phtml +0 -88
- app/design/frontend/base/default/template/qixol/onepage/item.phtml +0 -288
- app/design/frontend/base/default/template/qixol/onepage/review.phtml +0 -148
- app/design/frontend/base/default/template/qixol/product/qixol_adv.phtml +0 -44
- app/design/frontend/base/default/template/qixol/product/qixol_info_details.phtml +0 -23
- app/design/frontend/base/default/template/qixol/product/qixol_product_info.phtml +0 -63
- app/design/frontend/base/default/template/qixol/sidebar/advert.phtml +0 -62
- app/design/frontend/base/default/template/qixol/sidebar/default.phtml +0 -145
- app/design/frontend/base/default/template/qixol/sidebar/sidebar.phtml +0 -80
- app/design/frontend/rwd/default/template/qixol/minicart/advert.phtml +0 -64
- app/design/frontend/rwd/default/template/qixol/minicart/default.phtml +0 -258
- app/design/frontend/rwd/default/template/qixol/minicart/mincart.phtml +0 -250
- app/etc/modules/Holbi_Qixol.xml +0 -10
- app/locale/en_US/Holbi_Qixol.csv +0 -132
- media/custom/banners/File-1459507414.jpg +0 -0
- media/custom/banners/resize/File-1459507414.jpg +0 -0
- media/custom/stickers/File-1460972848.png +0 -0
- media/custom/stickers/bogof.png +0 -0
- media/custom/stickers/bogor.png +0 -0
- media/custom/stickers/bundle.png +0 -0
- media/custom/stickers/deal.png +0 -0
- media/custom/stickers/freeproduct.png +0 -0
- media/custom/stickers/issuecoupon.png +0 -0
- media/custom/stickers/issuepoints.png +0 -0
- media/custom/stickers/offers.png +0 -0
- media/custom/stickers/productsreduction.png +0 -0
- media/custom/stickers/resize/File-1460972848.png +0 -0
- package.xml +9 -8
- skin/frontend/base/default/css/qixol.css +7 -1
- skin/frontend/base/default/images/qixol/BASKETREDUCTION.png +0 -0
- skin/frontend/base/default/images/qixol/BOGOF.png +0 -0
- skin/frontend/base/default/images/qixol/BOGOR.png +0 -0
- skin/frontend/base/default/images/qixol/BUNDLE.png +0 -0
- skin/frontend/base/default/images/qixol/DEAL.png +0 -0
- skin/frontend/base/default/images/qixol/DELIVERYREDUCTION.png +0 -0
- skin/frontend/base/default/images/qixol/FREEPRODUCT.png +0 -0
- skin/frontend/base/default/images/qixol/ISSUECOUPON.png +0 -0
- skin/frontend/base/default/images/qixol/ISSUEPOINTS.png +0 -0
- skin/frontend/base/default/images/qixol/PRODUCTSREDUCTION.png +0 -0
- skin/frontend/base/default/images/qixol/red_sales_sticker_pv.png +0 -0
- var/logs_qixol/logs_here.txt +0 -1
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Banner extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
$this->_controller = 'adminhtml_banner';
|
6 |
-
$this->_blockGroup = 'qixol';
|
7 |
-
$this->_headerText = Mage::helper('qixol')->__('Banner Manager');
|
8 |
-
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Banner
|
9 |
-
parent::__construct();
|
10 |
-
}
|
11 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
$this->_controller = 'adminhtml_banner';
|
6 |
+
$this->_blockGroup = 'qixol';
|
7 |
+
$this->_headerText = Mage::helper('qixol')->__('Banner Manager');
|
8 |
+
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Banner');
|
9 |
+
parent::__construct();
|
10 |
+
}
|
11 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit.php
CHANGED
@@ -1,69 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Banner_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'qixol';
|
9 |
-
$this->_controller = 'adminhtml_banner';
|
10 |
-
|
11 |
-
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
-
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
-
|
14 |
-
$this->_addButton('saveandcontinue', array(
|
15 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
-
'onclick' => 'saveAndContinueEdit()',
|
17 |
-
'class' => 'save',
|
18 |
-
), -100);
|
19 |
-
|
20 |
-
$this->
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
function
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
$('
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
var
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_banner';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
$this->_addButton('saveandcontinue', array(
|
15 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
+
'onclick' => 'saveAndContinueEdit()',
|
17 |
+
'class' => 'save',
|
18 |
+
), -100);
|
19 |
+
|
20 |
+
$this->_addButton('addImage', array(
|
21 |
+
'label' => Mage::helper('qixol')->__('Add Image'),
|
22 |
+
'onclick' => 'addImage()',
|
23 |
+
'class' => 'save',
|
24 |
+
), -100);
|
25 |
+
|
26 |
+
$addImageUrl = $this->getUrl('*/adminhtml_bannerimage/addBannerImage', array('bannerid' => $this->getRequest()->getParam('id')));
|
27 |
+
|
28 |
+
$this->_formScripts[] = "
|
29 |
+
/*function toggleEditor() {
|
30 |
+
if (tinyMCE.getInstanceById('banner_content') == null) {
|
31 |
+
tinyMCE.execCommand('mceAddControl', false, 'banner_content');
|
32 |
+
} else {
|
33 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'banner_content');
|
34 |
+
}
|
35 |
+
}*/
|
36 |
+
|
37 |
+
function saveAndContinueEdit(){
|
38 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
39 |
+
}
|
40 |
+
|
41 |
+
function addImage() {
|
42 |
+
window.location.href='" . $addImageUrl . "';
|
43 |
+
}
|
44 |
+
|
45 |
+
function showTypeContents(){
|
46 |
+
var typeId=$('banner_type').value;
|
47 |
+
var show = ((typeId==0)?'block':'none');
|
48 |
+
var hide = ((typeId==0)?'none':'block');
|
49 |
+
$('filename').setStyle({display:show});
|
50 |
+
$('filename_delete').setStyle({display:show});
|
51 |
+
//$('banner_content').setStyle({display:hide});
|
52 |
+
setTimeout('bannerContentType()',1000);
|
53 |
+
alert($('filename').getStyle('display'))
|
54 |
+
}
|
55 |
+
|
56 |
+
function bannerContentType(){
|
57 |
+
var typeId=$('banner_type').value;
|
58 |
+
var hide = ((typeId==0)?'none':'block');
|
59 |
+
$('buttonsbanner_content').setStyle({display:hide});
|
60 |
+
$('banner_content_parent').setStyle({display:hide});
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/* Event.observe('banner_type', 'change', function(){
|
65 |
+
showTypeContents();
|
66 |
+
});
|
67 |
+
Event.observe(window, 'load', function(){
|
68 |
+
showTypeContents();
|
69 |
+
}); */
|
70 |
+
";
|
71 |
+
}
|
72 |
+
|
73 |
+
public function getHeaderText() {
|
74 |
+
if (Mage::registry('banner_data') && Mage::registry('banner_data')->getId()) {
|
75 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('banner_data')->getTitle()));
|
76 |
+
} else {
|
77 |
+
return Mage::helper('qixol')->__('Add Item');
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Bannerimage/Grid.php
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Bannerimage_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setDefaultSort('sort_order');
|
9 |
+
$this->setDefaultDir('asc');
|
10 |
+
$this->setId('bannerImageGrid');
|
11 |
+
$this->setDefaultFilter(array('banner_id'=>1));
|
12 |
+
$this->setUseAjax(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _addColumnFilterToCollection($column)
|
16 |
+
{
|
17 |
+
if ($column->getId() == 'banner_id') {
|
18 |
+
$inBannerIds = $this->_getBannerimages();
|
19 |
+
if (empty($inBannerIds)) {
|
20 |
+
$inBannerIds = 0;
|
21 |
+
}
|
22 |
+
if ($column->getFilter()->getValue()) {
|
23 |
+
$this->getCollection()->addFieldToFilter('banner_id', array('in'=>$inBannerIds));
|
24 |
+
}
|
25 |
+
else {
|
26 |
+
if($inBannerIds) {
|
27 |
+
$this->getCollection()->addFieldToFilter('banner_id', array('nin'=>$inBannerIds));
|
28 |
+
}
|
29 |
+
}
|
30 |
+
}
|
31 |
+
else {
|
32 |
+
parent::_addColumnFilterToCollection($column);
|
33 |
+
}
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function _prepareCollection()
|
38 |
+
{
|
39 |
+
$bannerId = $this->getRequest()->getParam('id');
|
40 |
+
Mage::register('BANNERID', $bannerId);
|
41 |
+
$collection = Mage::getModel('qixol/banner')->getBannerImageCollection();
|
42 |
+
$this->setCollection($collection);
|
43 |
+
return parent::_prepareCollection();
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _prepareColumns()
|
47 |
+
{
|
48 |
+
$this->addColumn('banner_id', array(
|
49 |
+
'header' => Mage::helper('qixol')->__('Banner id'),
|
50 |
+
'name' => 'banner_id',
|
51 |
+
'index' => 'banner_id',
|
52 |
+
'values' => $this->_getBannerimages(),
|
53 |
+
'column_css_class' => 'no-display',
|
54 |
+
'header_css_class' => 'no-display'
|
55 |
+
));
|
56 |
+
|
57 |
+
$this->addColumn('banner_image_id', array(
|
58 |
+
'header' => Mage::helper('qixol')->__('Id'),
|
59 |
+
'name' => 'banner_image_id',
|
60 |
+
'index' => 'banner_image_id',
|
61 |
+
'column_css_class' => 'no-display',
|
62 |
+
'header_css_class' => 'no-display'
|
63 |
+
));
|
64 |
+
|
65 |
+
$this->addColumn('filename', array(
|
66 |
+
'header' =>Mage::helper('qixol')->__('Filename'),
|
67 |
+
'name' => 'filename',
|
68 |
+
'index' => 'filename'
|
69 |
+
));
|
70 |
+
|
71 |
+
$this->addColumn('sort_order', array(
|
72 |
+
'header' =>Mage::helper('qixol')->__('Sort order'),
|
73 |
+
'name' => 'sort_order',
|
74 |
+
'index' => 'sort_order'
|
75 |
+
));
|
76 |
+
|
77 |
+
$this->addColumn('promotion_reference', array(
|
78 |
+
'header' =>Mage::helper('qixol')->__('Promotion reference'),
|
79 |
+
'name' => 'promotion_reference',
|
80 |
+
'index' => 'promotion_reference'
|
81 |
+
));
|
82 |
+
|
83 |
+
$this->addColumn('comment', array(
|
84 |
+
'header' =>Mage::helper('qixol')->__('Comment'),
|
85 |
+
'name' => 'comment',
|
86 |
+
'index' => 'comment'
|
87 |
+
));
|
88 |
+
|
89 |
+
$this->addColumn('url', array(
|
90 |
+
'header' =>Mage::helper('qixol')->__('URL'),
|
91 |
+
'name' => 'url',
|
92 |
+
'index' => 'url'
|
93 |
+
));
|
94 |
+
|
95 |
+
/*
|
96 |
+
$this->addColumn('grid_actions',
|
97 |
+
array(
|
98 |
+
'header'=>Mage::helper('adminhtml')->__('Actions'),
|
99 |
+
'width'=>5,
|
100 |
+
'sortable'=>false,
|
101 |
+
'filter' =>false,
|
102 |
+
'type' => 'action',
|
103 |
+
'actions' => array(
|
104 |
+
array(
|
105 |
+
'caption' => Mage::helper('adminhtml')->__('Remove'),
|
106 |
+
'onClick' => 'role.deleteFromRole($role_id);'
|
107 |
+
)
|
108 |
+
)
|
109 |
+
)
|
110 |
+
);
|
111 |
+
*/
|
112 |
+
|
113 |
+
return parent::_prepareColumns();
|
114 |
+
}
|
115 |
+
//
|
116 |
+
// public function getGridUrl()
|
117 |
+
// {
|
118 |
+
// $bannerId = $this->getRequest()->getParam('id');
|
119 |
+
// // TODO: {action} is...?
|
120 |
+
// return $this->getUrl('*/*/{action}', array('id' => $bannerId));
|
121 |
+
// }
|
122 |
+
|
123 |
+
public function getRowUrl($row) {
|
124 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
125 |
+
}
|
126 |
+
|
127 |
+
protected function _getBannerimages($json=false)
|
128 |
+
{
|
129 |
+
$bannerId = ( $this->getRequest()->getParam('id') > 0 ) ? $this->getRequest()->getParam('id') : Mage::registry('BANNERID');
|
130 |
+
$bannerImages = Mage::getModel('qixol/banner')->setId($bannerId)->getBannerImageIds();
|
131 |
+
|
132 |
+
if (count($bannerImages) > 0) {
|
133 |
+
if ( $json ) {
|
134 |
+
$jsonBannerImages = Array();
|
135 |
+
foreach($bannerImages as $bannerImage) $jsonBannerImages[$bannerImage] = 0;
|
136 |
+
return Mage::helper('core')->jsonEncode((object)$jsonBannerImages);
|
137 |
+
} else {
|
138 |
+
return array_values($bannerImages);
|
139 |
+
}
|
140 |
+
} else {
|
141 |
+
if ( $json ) {
|
142 |
+
return '{}';
|
143 |
+
} else {
|
144 |
+
return array();
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Bannerimage/Tab/Form.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Bannerimage_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$form = new Varien_Data_Form();
|
6 |
+
$this->setForm($form);
|
7 |
+
$fieldset = $form->addFieldset('sticker_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('sticker/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
+
|
11 |
+
$fieldset->addField('filename', 'image', array(
|
12 |
+
'label' => Mage::helper('qixol')->__('Upload and use Image'),
|
13 |
+
'required' => true,
|
14 |
+
'name' => 'filename',
|
15 |
+
));
|
16 |
+
|
17 |
+
$fieldset->addField('is_default_for_type', 'select', array(
|
18 |
+
'label' => Mage::helper('qixol')->__('Default for Promotion Type?'),
|
19 |
+
'class' => 'required-entry',
|
20 |
+
'name' => 'is_default_for_type',
|
21 |
+
'values' => array(
|
22 |
+
array(
|
23 |
+
'value' => 1,
|
24 |
+
'label' => Mage::helper('qixol')->__('Yes'),
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'value' => 0,
|
28 |
+
'label' => Mage::helper('qixol')->__('No'),
|
29 |
+
),
|
30 |
+
),
|
31 |
+
));
|
32 |
+
|
33 |
+
$fieldset->addField('promo_type_name', 'select', array(
|
34 |
+
'label' => Mage::helper('qixol')->__('Promotion Type'),
|
35 |
+
'class' => 'required-entry',
|
36 |
+
'required' => false,
|
37 |
+
'name' => 'promo_type_name',
|
38 |
+
'values' => array(
|
39 |
+
array(
|
40 |
+
'value' => '',
|
41 |
+
'label' => Mage::helper('qixol')->__('Not defined'),
|
42 |
+
),
|
43 |
+
array(
|
44 |
+
'value' => 'BOGOF',
|
45 |
+
'label' => Mage::helper('qixol')->__('Buy one get one free'),
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'value' => 'BOGOR',
|
49 |
+
'label' => Mage::helper('qixol')->__('Buy one get one reduced'),
|
50 |
+
),
|
51 |
+
array(
|
52 |
+
'value' => 'BUNDLE',
|
53 |
+
'label' => Mage::helper('qixol')->__('Bundle'),
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'value' => 'DEAL',
|
57 |
+
'label' => Mage::helper('qixol')->__('Deal'),
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'value' => 'FREEPRODUCT',
|
61 |
+
'label' => Mage::helper('qixol')->__('Free product'),
|
62 |
+
),
|
63 |
+
array(
|
64 |
+
'value' => 'ISSUECOUPON',
|
65 |
+
'label' => Mage::helper('qixol')->__('Issue coupon'),
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'value' => 'ISSUEPOINTS',
|
69 |
+
'label' => Mage::helper('qixol')->__('Issue points'),
|
70 |
+
),
|
71 |
+
array(
|
72 |
+
'value' => 'BASKETREDUCTION',
|
73 |
+
'label' => Mage::helper('qixol')->__('Backet reduction'),
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'value' => 'DELIVERYREDUCTION',
|
77 |
+
'label' => Mage::helper('qixol')->__('Delivery reduction'),
|
78 |
+
),
|
79 |
+
/*array(
|
80 |
+
'value' => 8,
|
81 |
+
'label' => Mage::helper('qixol')->__('Multiple promos'),
|
82 |
+
),*/
|
83 |
+
array(
|
84 |
+
'value' => 'PRODUCTSREDUCTION',
|
85 |
+
'label' => Mage::helper('qixol')->__('Product reduction'),
|
86 |
+
),
|
87 |
+
),
|
88 |
+
));
|
89 |
+
|
90 |
+
$field_last = $fieldset->addField('promo_reference', 'text', array(
|
91 |
+
'label' => Mage::helper('qixol')->__('Promotion reference'),
|
92 |
+
'name' => 'promo_reference',
|
93 |
+
));
|
94 |
+
|
95 |
+
$field_last->setAfterElementHtml('<script>
|
96 |
+
//< ![C
|
97 |
+
function on_change_is_default_for_type(){
|
98 |
+
if ($(\'is_default_for_type\')[$(\'is_default_for_type\').selectedIndex].value==\'1\'){
|
99 |
+
$(\'promo_reference\').setValue("");
|
100 |
+
$(\'promo_reference\').disable();
|
101 |
+
$(\'promo_type_name\').enable();
|
102 |
+
}else {
|
103 |
+
$(\'promo_reference\').enable();
|
104 |
+
$(\'promo_type_name\').selectedIndex=0;
|
105 |
+
$(\'promo_type_name\').disable();
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
document.observe("dom:loaded", function() {
|
111 |
+
|
112 |
+
$("is_default_for_type").observe("change",function(e){
|
113 |
+
on_change_is_default_for_type();
|
114 |
+
});
|
115 |
+
on_change_is_default_for_type();
|
116 |
+
});
|
117 |
+
|
118 |
+
|
119 |
+
//]]>
|
120 |
+
</script>');
|
121 |
+
|
122 |
+
if (Mage::getSingleton('adminhtml/session')->getStickerData()) {
|
123 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getStickerData());
|
124 |
+
Mage::getSingleton('adminhtml/session')->setStickerData(null);
|
125 |
+
} elseif (Mage::registry('sticker_data')) {
|
126 |
+
$form->setValues(Mage::registry('sticker_data')->getData());
|
127 |
+
}
|
128 |
+
return parent::_prepareForm();
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Form.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
'id' => 'edit_form',
|
8 |
-
|
9 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
-
'method' => 'post',
|
11 |
-
'enctype' => 'multipart/form-data'
|
12 |
-
)
|
13 |
-
);
|
14 |
-
|
15 |
-
$form->setUseContainer(true);
|
16 |
-
$this->setForm($form);
|
17 |
-
return parent::_prepareForm();
|
18 |
-
}
|
19 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Tab/Bannerimage.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Tab_Bannerimage extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
parent::__construct();
|
7 |
+
|
8 |
+
$bannerId = $this->getRequest()->getParam('id', false);
|
9 |
+
|
10 |
+
$bannerImages = Mage::getModel("qixol/bannerimage")->getCollection()->load();
|
11 |
+
$this->setTemplate('qixol/bannerimage.phtml')
|
12 |
+
->assign('bannerImages', $bannerImages->getItems())
|
13 |
+
->assign('bannerId', $bannerId);
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _prepareLayout()
|
17 |
+
{
|
18 |
+
$this->setChild('bannerImageGrid', $this->getLayout()->createBlock('qixol/adminhtml_banner_edit_bannerimage_grid', 'bannerImageGrid'));
|
19 |
+
return parent::_prepareLayout();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _getGridHtml()
|
23 |
+
{
|
24 |
+
return $this->getChildHtml('bannerImageGrid');
|
25 |
+
}
|
26 |
+
|
27 |
+
protected function _getJsObjectName()
|
28 |
+
{
|
29 |
+
return $this->getChild('bannerImageGrid')->getJsObjectName();
|
30 |
+
}
|
31 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Tab/Form.php
CHANGED
@@ -1,177 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
-
|
4 |
-
protected function _prepareForm() {
|
5 |
-
$form = new Varien_Data_Form();
|
6 |
-
$this->setForm($form);
|
7 |
-
$fieldset = $form->addFieldset('banner_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
-
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
-
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('banner/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
-
|
11 |
-
$fieldset->addField('title', 'text', array(
|
12 |
-
'label' => Mage::helper('qixol')->__('Title'),
|
13 |
-
'class' => 'required-entry',
|
14 |
-
'required' => true,
|
15 |
-
'name' => 'title',
|
16 |
-
));
|
17 |
-
|
18 |
-
$fieldset->addField('
|
19 |
-
'label' => Mage::helper('qixol')->__('Display Zone'),
|
20 |
-
'class' => 'required-entry',
|
21 |
-
'required' => true,
|
22 |
-
'name' => '
|
23 |
-
'values' => Mage::getModel('qixol/bannerboxes')->getOptionArray(),
|
24 |
-
'after_element_html' => Mage::helper('qixol')->__('use: <br>CATEGORY_TOP for showing on category list<br>PRODUCT_BOTTOM on bottom product page<br>PRODUCT_TOP on top on product page<br>PRODUCT_INLINE on top on product page<br>
|
25 |
-
));
|
26 |
-
|
27 |
-
$fieldset->addField('
|
28 |
-
'label' => Mage::helper('qixol')->__('
|
29 |
-
'
|
30 |
-
'name' => '
|
31 |
-
'values' =>
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
'
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
'values' => array(
|
53 |
-
array(
|
54 |
-
'value' => '',
|
55 |
-
'label' => Mage::helper('qixol')->__('Not defined'),
|
56 |
-
),
|
57 |
-
array(
|
58 |
-
'value' => 'BOGOF',
|
59 |
-
'label' => Mage::helper('qixol')->__('Buy one get one free'),
|
60 |
-
),
|
61 |
-
array(
|
62 |
-
'value' => 'BOGOR',
|
63 |
-
'label' => Mage::helper('qixol')->__('Buy one get one reduced'),
|
64 |
-
),
|
65 |
-
array(
|
66 |
-
'value' => 'BUNDLE',
|
67 |
-
'label' => Mage::helper('qixol')->__('Bundle'),
|
68 |
-
),
|
69 |
-
array(
|
70 |
-
'value' => 'DEAL',
|
71 |
-
'label' => Mage::helper('qixol')->__('Deal'),
|
72 |
-
),
|
73 |
-
array(
|
74 |
-
'value' => 'FREEPRODUCT',
|
75 |
-
'label' => Mage::helper('qixol')->__('Free product'),
|
76 |
-
),
|
77 |
-
array(
|
78 |
-
'value' => 'ISSUECOUPON',
|
79 |
-
'label' => Mage::helper('qixol')->__('Issue coupon'),
|
80 |
-
),
|
81 |
-
array(
|
82 |
-
'value' => 'ISSUEPOINTS',
|
83 |
-
'label' => Mage::helper('qixol')->__('Issue points'),
|
84 |
-
),
|
85 |
-
array(
|
86 |
-
'value' => 'BASKETREDUCTION',
|
87 |
-
'label' => Mage::helper('qixol')->__('Backet reduction'),
|
88 |
-
),
|
89 |
-
array(
|
90 |
-
'value' => 'DELIVERYREDUCTION',
|
91 |
-
'label' => Mage::helper('qixol')->__('Delivery reduction'),
|
92 |
-
),
|
93 |
-
/*array(
|
94 |
-
'value' => 8,
|
95 |
-
'label' => Mage::helper('qixol')->__('Multiple promos'),
|
96 |
-
),*//*
|
97 |
-
array(
|
98 |
-
'value' => 'PRODUCTSREDUCTION',
|
99 |
-
'label' => Mage::helper('qixol')->__('Product reduction'),
|
100 |
-
),
|
101 |
-
),
|
102 |
-
));*/
|
103 |
-
|
104 |
-
/*if ($version == '1.4' || $version == '1.5') {
|
105 |
-
$fieldset->addField('banner_content', 'editor', array(
|
106 |
-
'name' => 'banner_content',
|
107 |
-
'label' => Mage::helper('qixol')->__('Content'),
|
108 |
-
'title' => Mage::helper('qixol')->__('Content'),
|
109 |
-
'style' => 'width:600px; height:250px;',
|
110 |
-
'config' => Mage::getSingleton('banner/wysiwyg_config')->getConfig(),
|
111 |
-
'wysiwyg' => true,
|
112 |
-
'required' => false,
|
113 |
-
));
|
114 |
-
} else {
|
115 |
-
$fieldset->addField('banner_content', 'editor', array(
|
116 |
-
'name' => 'banner_content',
|
117 |
-
'label' => Mage::helper('cms')->__('Content'),
|
118 |
-
'title' => Mage::helper('cms')->__('Content'),
|
119 |
-
'style' => 'width:600px; height:250px;',
|
120 |
-
'wysiwyg' => false,
|
121 |
-
'required' => false,
|
122 |
-
));
|
123 |
-
}*/
|
124 |
-
|
125 |
-
$fieldset->addField('sort_order', 'text', array(
|
126 |
-
'label' => Mage::helper('qixol')->__('Sort Order'),
|
127 |
-
'name' => 'sort_order',
|
128 |
-
));
|
129 |
-
|
130 |
-
/*$fieldset->addField('is_default', 'select', array(
|
131 |
-
'label' => Mage::helper('qixol')->__('Default?'),
|
132 |
-
'class' => 'required-entry',
|
133 |
-
'name' => 'is_default',
|
134 |
-
'values' => array(
|
135 |
-
array(
|
136 |
-
'value' => 1,
|
137 |
-
'label' => Mage::helper('qixol')->__('Yes'),
|
138 |
-
),
|
139 |
-
array(
|
140 |
-
'value' => 0,
|
141 |
-
'label' => Mage::helper('qixol')->__('No'),
|
142 |
-
),
|
143 |
-
),
|
144 |
-
));*/
|
145 |
-
|
146 |
-
$fieldset->addField('url', 'text', array(
|
147 |
-
'label' => Mage::helper('qixol')->__('Url'),
|
148 |
-
'required' => false,
|
149 |
-
'name' => 'url',
|
150 |
-
));
|
151 |
-
|
152 |
-
$fieldset->addField('status', 'select', array(
|
153 |
-
'label' => Mage::helper('qixol')->__('Status'),
|
154 |
-
'class' => 'required-entry',
|
155 |
-
'name' => 'status',
|
156 |
-
'values' => array(
|
157 |
-
array(
|
158 |
-
'value' => 1,
|
159 |
-
'label' => Mage::helper('qixol')->__('Enabled'),
|
160 |
-
),
|
161 |
-
array(
|
162 |
-
'value' => 2,
|
163 |
-
'label' => Mage::helper('qixol')->__('Disabled'),
|
164 |
-
),
|
165 |
-
),
|
166 |
-
));
|
167 |
-
|
168 |
-
if (Mage::getSingleton('adminhtml/session')->getBannerData()) {
|
169 |
-
$form->setValues(Mage::getSingleton('adminhtml/session')->getBannerData());
|
170 |
-
Mage::getSingleton('adminhtml/session')->setBannerData(null);
|
171 |
-
} elseif (Mage::registry('banner_data')) {
|
172 |
-
$form->setValues(Mage::registry('banner_data')->getData());
|
173 |
-
}
|
174 |
-
return parent::_prepareForm();
|
175 |
-
}
|
176 |
-
|
177 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$form = new Varien_Data_Form();
|
6 |
+
$this->setForm($form);
|
7 |
+
$fieldset = $form->addFieldset('banner_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('banner/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
+
|
11 |
+
$fieldset->addField('title', 'text', array(
|
12 |
+
'label' => Mage::helper('qixol')->__('Title'),
|
13 |
+
'class' => 'required-entry',
|
14 |
+
'required' => true,
|
15 |
+
'name' => 'title',
|
16 |
+
));
|
17 |
+
|
18 |
+
$fieldset->addField('display_zone', 'multiselect', array(
|
19 |
+
'label' => Mage::helper('qixol')->__('Display Zone'),
|
20 |
+
'class' => 'required-entry',
|
21 |
+
'required' => true,
|
22 |
+
'name' => 'display_zone',
|
23 |
+
'values' => Mage::getModel('qixol/bannerboxes')->getOptionArray(),
|
24 |
+
'after_element_html' => Mage::helper('qixol')->__('use: <br>CATEGORY_TOP for showing on category list<br>PRODUCT_BOTTOM on bottom product page<br>PRODUCT_TOP on top on product page<br>PRODUCT_INLINE on top on product page<br>separate by ; '),
|
25 |
+
));
|
26 |
+
|
27 |
+
$fieldset->addField('status', 'select', array(
|
28 |
+
'label' => Mage::helper('qixol')->__('Status'),
|
29 |
+
'class' => 'required-entry',
|
30 |
+
'name' => 'status',
|
31 |
+
'values' => array(
|
32 |
+
array(
|
33 |
+
'value' => 0,
|
34 |
+
'label' => Mage::helper('qixol')->__('Disabled'),
|
35 |
+
),
|
36 |
+
array(
|
37 |
+
'value' => 1,
|
38 |
+
'label' => Mage::helper('qixol')->__('Enabled'),
|
39 |
+
),
|
40 |
+
),
|
41 |
+
));
|
42 |
+
|
43 |
+
if (Mage::getSingleton('adminhtml/session')->getBannerData()) {
|
44 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getBannerData());
|
45 |
+
Mage::getSingleton('adminhtml/session')->setBannerData(null);
|
46 |
+
} elseif (Mage::registry('banner_data')) {
|
47 |
+
$form->setValues(Mage::registry('banner_data')->getData());
|
48 |
+
}
|
49 |
+
return parent::_prepareForm();
|
50 |
+
}
|
51 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Edit/Tabs.php
CHANGED
@@ -1,20 +1,38 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('qixol_tabs');
|
7 |
-
$this->setDestElementId('edit_form');
|
8 |
-
$this->setTitle(Mage::helper('qixol')->__('Item Information'));
|
9 |
-
}
|
10 |
-
|
11 |
-
protected function _beforeToHtml() {
|
12 |
-
$this->addTab('form_section', array(
|
13 |
-
'label' => Mage::helper('qixol')->__('Banner Information'),
|
14 |
-
'alt' => Mage::helper('qixol')->__('Banner information'),
|
15 |
-
'content' => $this->getLayout()->createBlock('qixol/adminhtml_banner_edit_tab_form')->toHtml(),
|
16 |
-
));
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Item Information'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('form_section', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Banner Information'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Banner information'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_banner_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
|
18 |
+
$this->addTab('images_grid', array(
|
19 |
+
'label' => Mage::helper('qixol')->__('Banner Images'),
|
20 |
+
'alt' => Mage::helper('qixol')->__('Banner images'),
|
21 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_banner_edit_tab_bannerimage', 'banner.bannerimages.grid')->toHtml(),
|
22 |
+
));
|
23 |
+
|
24 |
+
// $this->addTab('images_grid', array(
|
25 |
+
// 'label' => Mage::helper('qixol')->__('Banner Images'),
|
26 |
+
// 'alt' => Mage::helper('qixol')->__('Banner images'),
|
27 |
+
// 'content' => $this->getLayout()->createBlock('qixol/adminhtml_banner_edit_bannerimage_grid', 'banner.bannerimages.grid')->toHtml(),
|
28 |
+
// ));
|
29 |
+
//
|
30 |
+
// $this->addTab('images_form', array(
|
31 |
+
// 'label' => Mage::helper('qixol')->__('Add banner image'),
|
32 |
+
// 'alt' => Mage::helper('qixol')->__('Add banner image'),
|
33 |
+
// 'content' => $this->getLayout()->createBlock('qixol/adminhtml_banner_edit_bannerimage_tab_form')->toHtml()
|
34 |
+
// ));
|
35 |
+
|
36 |
+
return parent::_beforeToHtml();
|
37 |
+
}
|
38 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Banner/Grid.php
CHANGED
@@ -1,168 +1,109 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Banner_Grid extends Holbi_Qixol_Block_Adminhtml_Widget_Grid {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('bannerGrid');
|
7 |
-
$this->setDefaultSort('banner_id');
|
8 |
-
$this->setDefaultDir('ASC');
|
9 |
-
$this->setSaveParametersInSession(true);
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareCollection() {
|
13 |
-
$collection = Mage::getModel('qixol/banner')->getCollection();
|
14 |
-
$this->setCollection($collection);
|
15 |
-
return parent::_prepareCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _prepareColumns() {
|
19 |
-
$this->addColumn('banner_id', array(
|
20 |
-
'header' => Mage::helper('qixol')->__('ID'),
|
21 |
-
'align' => 'center',
|
22 |
-
'width' => '30px',
|
23 |
-
'index' => 'banner_id',
|
24 |
-
));
|
25 |
-
|
26 |
-
|
27 |
-
'header' => Mage::helper('qixol')->__('
|
28 |
-
'
|
29 |
-
'index' => '
|
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 |
-
)
|
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 |
-
$this->addColumn('action',
|
111 |
-
array(
|
112 |
-
'header' => Mage::helper('qixol')->__('Action'),
|
113 |
-
'width' => '80',
|
114 |
-
'type' => 'action',
|
115 |
-
'getter' => 'getId',
|
116 |
-
'actions' => array(
|
117 |
-
array(
|
118 |
-
'caption' => Mage::helper('qixol')->__('Edit'),
|
119 |
-
'url' => array('base' => '*/*/edit'),
|
120 |
-
'field' => 'id'
|
121 |
-
)
|
122 |
-
),
|
123 |
-
'filter' => false,
|
124 |
-
'sortable' => false,
|
125 |
-
'index' => 'stores',
|
126 |
-
'is_system' => true,
|
127 |
-
));
|
128 |
-
|
129 |
-
//$this->addExportType('*/*/exportCsv', Mage::helper('qixol')->__('CSV'));
|
130 |
-
//$this->addExportType('*/*/exportXml', Mage::helper('qixol')->__('XML'));
|
131 |
-
|
132 |
-
return parent::_prepareColumns();
|
133 |
-
}
|
134 |
-
|
135 |
-
protected function _prepareMassaction() {
|
136 |
-
$this->setMassactionIdField('banner_id');
|
137 |
-
$this->getMassactionBlock()->setFormFieldName('banner');
|
138 |
-
|
139 |
-
$this->getMassactionBlock()->addItem('delete', array(
|
140 |
-
'label' => Mage::helper('qixol')->__('Delete'),
|
141 |
-
'url' => $this->getUrl('*/*/massDelete'),
|
142 |
-
'confirm' => Mage::helper('qixol')->__('Are you sure?')
|
143 |
-
));
|
144 |
-
|
145 |
-
$statuses = Mage::getSingleton('qixol/status')->getOptionArray();
|
146 |
-
|
147 |
-
array_unshift($statuses, array('label' => '', 'value' => ''));
|
148 |
-
$this->getMassactionBlock()->addItem('status', array(
|
149 |
-
'label' => Mage::helper('qixol')->__('Change status'),
|
150 |
-
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
151 |
-
'additional' => array(
|
152 |
-
'visibility' => array(
|
153 |
-
'name' => 'status',
|
154 |
-
'type' => 'select',
|
155 |
-
'class' => 'required-entry',
|
156 |
-
'label' => Mage::helper('qixol')->__('Status'),
|
157 |
-
'values' => $statuses
|
158 |
-
)
|
159 |
-
)
|
160 |
-
));
|
161 |
-
return $this;
|
162 |
-
}
|
163 |
-
|
164 |
-
public function getRowUrl($row) {
|
165 |
-
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
166 |
-
}
|
167 |
-
|
168 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Banner_Grid extends Holbi_Qixol_Block_Adminhtml_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('bannerGrid');
|
7 |
+
$this->setDefaultSort('banner_id');
|
8 |
+
$this->setDefaultDir('ASC');
|
9 |
+
$this->setSaveParametersInSession(true);
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareCollection() {
|
13 |
+
$collection = Mage::getModel('qixol/banner')->getCollection();
|
14 |
+
$this->setCollection($collection);
|
15 |
+
return parent::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
$this->addColumn('banner_id', array(
|
20 |
+
'header' => Mage::helper('qixol')->__('ID'),
|
21 |
+
'align' => 'center',
|
22 |
+
'width' => '30px',
|
23 |
+
'index' => 'banner_id',
|
24 |
+
));
|
25 |
+
|
26 |
+
$this->addColumn('title', array(
|
27 |
+
'header' => Mage::helper('qixol')->__('Title'),
|
28 |
+
'width' => '150px',
|
29 |
+
'index' => 'title',
|
30 |
+
));
|
31 |
+
|
32 |
+
$this->addColumn('display_zone', array(
|
33 |
+
'header' => Mage::helper('qixol')->__('Display Zone'),
|
34 |
+
'width' => '250px',
|
35 |
+
'index' => 'display_zone',
|
36 |
+
));
|
37 |
+
|
38 |
+
/* TODO: should use the Holbi_Qixol_Model_Status class for this? */
|
39 |
+
$this->addColumn('status', array(
|
40 |
+
'header' => Mage::helper('qixol')->__('Status'),
|
41 |
+
'align' => 'left',
|
42 |
+
'width' => '80px',
|
43 |
+
'index' => 'status',
|
44 |
+
'type' => 'options',
|
45 |
+
'options' => array(
|
46 |
+
0 => 'Disabled',
|
47 |
+
1 => 'Enabled',
|
48 |
+
),
|
49 |
+
));
|
50 |
+
|
51 |
+
$this->addColumn('action',
|
52 |
+
array(
|
53 |
+
'header' => Mage::helper('qixol')->__('Action'),
|
54 |
+
'width' => '80',
|
55 |
+
'type' => 'action',
|
56 |
+
'getter' => 'getId',
|
57 |
+
'actions' => array(
|
58 |
+
array(
|
59 |
+
'caption' => Mage::helper('qixol')->__('Edit'),
|
60 |
+
'url' => array('base' => '*/*/edit'),
|
61 |
+
'field' => 'id'
|
62 |
+
)
|
63 |
+
),
|
64 |
+
'filter' => false,
|
65 |
+
'sortable' => false,
|
66 |
+
'index' => 'stores',
|
67 |
+
'is_system' => true,
|
68 |
+
));
|
69 |
+
|
70 |
+
//$this->addExportType('*/*/exportCsv', Mage::helper('qixol')->__('CSV'));
|
71 |
+
//$this->addExportType('*/*/exportXml', Mage::helper('qixol')->__('XML'));
|
72 |
+
|
73 |
+
return parent::_prepareColumns();
|
74 |
+
}
|
75 |
+
|
76 |
+
protected function _prepareMassaction() {
|
77 |
+
$this->setMassactionIdField('banner_id');
|
78 |
+
$this->getMassactionBlock()->setFormFieldName('banner');
|
79 |
+
|
80 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
81 |
+
'label' => Mage::helper('qixol')->__('Delete'),
|
82 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
83 |
+
'confirm' => Mage::helper('qixol')->__('Are you sure?')
|
84 |
+
));
|
85 |
+
|
86 |
+
$statuses = Mage::getSingleton('qixol/status')->getOptionArray();
|
87 |
+
|
88 |
+
array_unshift($statuses, array('label' => '', 'value' => ''));
|
89 |
+
$this->getMassactionBlock()->addItem('status', array(
|
90 |
+
'label' => Mage::helper('qixol')->__('Change status'),
|
91 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
92 |
+
'additional' => array(
|
93 |
+
'visibility' => array(
|
94 |
+
'name' => 'status',
|
95 |
+
'type' => 'select',
|
96 |
+
'class' => 'required-entry',
|
97 |
+
'label' => Mage::helper('qixol')->__('Status'),
|
98 |
+
'values' => $statuses
|
99 |
+
)
|
100 |
+
)
|
101 |
+
));
|
102 |
+
return $this;
|
103 |
+
}
|
104 |
+
|
105 |
+
public function getRowUrl($row) {
|
106 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
107 |
+
}
|
108 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'qixol';
|
9 |
-
$this->_controller = 'adminhtml_bannerboxes';
|
10 |
-
|
11 |
-
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
-
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
-
|
14 |
-
$this->_addButton('saveandcontinue', array(
|
15 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
-
'onclick' => 'saveAndContinueEdit()',
|
17 |
-
'class' => 'save',
|
18 |
-
), -100);
|
19 |
-
|
20 |
-
$this->_formScripts[] = "
|
21 |
-
|
22 |
-
function saveAndContinueEdit(){
|
23 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
-
}
|
25 |
-
|
26 |
-
";
|
27 |
-
}
|
28 |
-
|
29 |
-
public function getHeaderText() {
|
30 |
-
if (Mage::registry('bannerbox_data') && Mage::registry('bannerbox_data')->getId()) {
|
31 |
-
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('bannerbox_data')->getTitle()));
|
32 |
-
} else {
|
33 |
-
return Mage::helper('qixol')->__('Add Item');
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_bannerboxes';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
$this->_addButton('saveandcontinue', array(
|
15 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
+
'onclick' => 'saveAndContinueEdit()',
|
17 |
+
'class' => 'save',
|
18 |
+
), -100);
|
19 |
+
|
20 |
+
$this->_formScripts[] = "
|
21 |
+
|
22 |
+
function saveAndContinueEdit(){
|
23 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
+
}
|
25 |
+
|
26 |
+
";
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getHeaderText() {
|
30 |
+
if (Mage::registry('bannerbox_data') && Mage::registry('bannerbox_data')->getId()) {
|
31 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('bannerbox_data')->getTitle()));
|
32 |
+
} else {
|
33 |
+
return Mage::helper('qixol')->__('Add Item');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit/Form.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
'id' => 'edit_form',
|
8 |
-
|
9 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
-
'method' => 'post',
|
11 |
-
// 'enctype' => 'multipart/form-data'
|
12 |
-
)
|
13 |
-
);
|
14 |
-
|
15 |
-
$form->setUseContainer(true);
|
16 |
-
$this->setForm($form);
|
17 |
-
return parent::_prepareForm();
|
18 |
-
}
|
19 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
// 'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit/Tab/Form.php
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
-
|
4 |
-
protected function _prepareForm() {
|
5 |
-
$form = new Varien_Data_Form();
|
6 |
-
$this->setForm($form);
|
7 |
-
$fieldset = $form->addFieldset('bannerbox_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
-
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
-
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('banner/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
$fieldset->addField('banner_box_type', 'select', array(
|
17 |
-
'label' => Mage::helper('qixol')->__('Box Position'),
|
18 |
-
'class' => 'required-entry',
|
19 |
-
'required' => true,
|
20 |
-
'name' => 'banner_box_type',
|
21 |
-
'values' => array(
|
22 |
-
array(
|
23 |
-
'value' => 'CATEGORY_TOP',
|
24 |
-
'label' => Mage::helper('qixol')->__('CATEGORY_TOP - the top box of category listsing'),
|
25 |
-
),
|
26 |
-
array(
|
27 |
-
'value' => 'PRODUCT_BOTTOM',
|
28 |
-
'label' => Mage::helper('qixol')->__('bottom of the product view page'),
|
29 |
-
),
|
30 |
-
array(
|
31 |
-
'value' => 'PRODUCT_TOP',
|
32 |
-
'label' => Mage::helper('qixol')->__('PRODUCT_TOP - top of product view page'),
|
33 |
-
),
|
34 |
-
array(
|
35 |
-
'value' => 'PRODUCT_INLINE',
|
36 |
-
'label' => Mage::helper('qixol')->__('PRODUCT_INLINE - inline in add to catrt box on product page'),
|
37 |
-
),
|
38 |
-
array(
|
39 |
-
'value' => 'BASKET_INLINE',
|
40 |
-
'label' => Mage::helper('qixol')->__('BASKET_INLINE - box on basket'),
|
41 |
-
),
|
42 |
-
array(
|
43 |
-
'value' => 'CATEGORY_STICKERS',
|
44 |
-
'label' => Mage::helper('qixol')->__('CATEGORY_STICKERS - stickers on category listing'),
|
45 |
-
),
|
46 |
-
array(
|
47 |
-
'value' => 'PRODUCT_INFO_STICKERS',
|
48 |
-
'label' => Mage::helper('qixol')->__('PRODUCT_INFO_STICKERS - stickers on product info'),
|
49 |
-
),
|
50 |
-
|
51 |
-
),
|
52 |
-
));
|
53 |
-
|
54 |
-
$fieldset->addField('banner_box_translation_type', 'text', array(
|
55 |
-
'label' => Mage::helper('qixol')->__('Translation Type'),
|
56 |
-
'class' => 'required-entry',
|
57 |
-
'required' => true,
|
58 |
-
'name' => 'banner_box_translation_type',
|
59 |
-
'after_element_html' => Mage::helper('qixol')->__('fadeout, scrollHorz , tileSlide or others from Cycle2 for myltyple data'),
|
60 |
-
));
|
61 |
-
|
62 |
-
|
63 |
-
$fieldset->addField('banner_box_is_active', 'select', array(
|
64 |
-
'label' => Mage::helper('qixol')->__('Status'),
|
65 |
-
'class' => 'required-entry',
|
66 |
-
'name' => 'banner_box_is_active',
|
67 |
-
'values' => array(
|
68 |
-
array(
|
69 |
-
'value' =>
|
70 |
-
'label' => Mage::helper('qixol')->__('
|
71 |
-
),
|
72 |
-
array(
|
73 |
-
'value' =>
|
74 |
-
'label' => Mage::helper('qixol')->__('
|
75 |
-
),
|
76 |
-
),
|
77 |
-
));
|
78 |
-
|
79 |
-
if (Mage::getSingleton('adminhtml/session')->getBannerboxData()) {
|
80 |
-
$form->setValues(Mage::getSingleton('adminhtml/session')->getBannerboxData());
|
81 |
-
Mage::getSingleton('adminhtml/session')->setBannerboxData(null);
|
82 |
-
} elseif (Mage::registry('bannerbox_data')) {
|
83 |
-
$form->setValues(Mage::registry('bannerbox_data')->getData());
|
84 |
-
}
|
85 |
-
return parent::_prepareForm();
|
86 |
-
}
|
87 |
-
|
88 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$form = new Varien_Data_Form();
|
6 |
+
$this->setForm($form);
|
7 |
+
$fieldset = $form->addFieldset('bannerbox_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('banner/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
$fieldset->addField('banner_box_type', 'select', array(
|
17 |
+
'label' => Mage::helper('qixol')->__('Box Position'),
|
18 |
+
'class' => 'required-entry',
|
19 |
+
'required' => true,
|
20 |
+
'name' => 'banner_box_type',
|
21 |
+
'values' => array(
|
22 |
+
array(
|
23 |
+
'value' => 'CATEGORY_TOP',
|
24 |
+
'label' => Mage::helper('qixol')->__('CATEGORY_TOP - the top box of category listsing'),
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'value' => 'PRODUCT_BOTTOM',
|
28 |
+
'label' => Mage::helper('qixol')->__('bottom of the product view page'),
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'value' => 'PRODUCT_TOP',
|
32 |
+
'label' => Mage::helper('qixol')->__('PRODUCT_TOP - top of product view page'),
|
33 |
+
),
|
34 |
+
array(
|
35 |
+
'value' => 'PRODUCT_INLINE',
|
36 |
+
'label' => Mage::helper('qixol')->__('PRODUCT_INLINE - inline in add to catrt box on product page'),
|
37 |
+
),
|
38 |
+
array(
|
39 |
+
'value' => 'BASKET_INLINE',
|
40 |
+
'label' => Mage::helper('qixol')->__('BASKET_INLINE - box on basket'),
|
41 |
+
),
|
42 |
+
array(
|
43 |
+
'value' => 'CATEGORY_STICKERS',
|
44 |
+
'label' => Mage::helper('qixol')->__('CATEGORY_STICKERS - stickers on category listing'),
|
45 |
+
),
|
46 |
+
array(
|
47 |
+
'value' => 'PRODUCT_INFO_STICKERS',
|
48 |
+
'label' => Mage::helper('qixol')->__('PRODUCT_INFO_STICKERS - stickers on product info'),
|
49 |
+
),
|
50 |
+
|
51 |
+
),
|
52 |
+
));
|
53 |
+
|
54 |
+
$fieldset->addField('banner_box_translation_type', 'text', array(
|
55 |
+
'label' => Mage::helper('qixol')->__('Translation Type'),
|
56 |
+
'class' => 'required-entry',
|
57 |
+
'required' => true,
|
58 |
+
'name' => 'banner_box_translation_type',
|
59 |
+
'after_element_html' => Mage::helper('qixol')->__('fadeout, scrollHorz , tileSlide or others from Cycle2 for myltyple data'),
|
60 |
+
));
|
61 |
+
|
62 |
+
|
63 |
+
$fieldset->addField('banner_box_is_active', 'select', array(
|
64 |
+
'label' => Mage::helper('qixol')->__('Status'),
|
65 |
+
'class' => 'required-entry',
|
66 |
+
'name' => 'banner_box_is_active',
|
67 |
+
'values' => array(
|
68 |
+
array(
|
69 |
+
'value' => 0,
|
70 |
+
'label' => Mage::helper('qixol')->__('Disabled'),
|
71 |
+
),
|
72 |
+
array(
|
73 |
+
'value' => 1,
|
74 |
+
'label' => Mage::helper('qixol')->__('Enabled'),
|
75 |
+
),
|
76 |
+
),
|
77 |
+
));
|
78 |
+
|
79 |
+
if (Mage::getSingleton('adminhtml/session')->getBannerboxData()) {
|
80 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getBannerboxData());
|
81 |
+
Mage::getSingleton('adminhtml/session')->setBannerboxData(null);
|
82 |
+
} elseif (Mage::registry('bannerbox_data')) {
|
83 |
+
$form->setValues(Mage::registry('bannerbox_data')->getData());
|
84 |
+
}
|
85 |
+
return parent::_prepareForm();
|
86 |
+
}
|
87 |
+
|
88 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Edit/Tabs.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('qixol_tabs');
|
7 |
-
$this->setDestElementId('edit_form');
|
8 |
-
$this->setTitle(Mage::helper('qixol')->__('Banner box Information'));
|
9 |
-
}
|
10 |
-
|
11 |
-
protected function _beforeToHtml() {
|
12 |
-
$this->addTab('form_section', array(
|
13 |
-
'label' => Mage::helper('qixol')->__('Banner box Information'),
|
14 |
-
'alt' => Mage::helper('qixol')->__('Banner box Information'),
|
15 |
-
'content' => $this->getLayout()->createBlock('qixol/adminhtml_bannerboxes_edit_tab_form')->toHtml(),
|
16 |
-
));
|
17 |
-
return parent::_beforeToHtml();
|
18 |
-
}
|
19 |
-
|
20 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Banner box Information'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('form_section', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Banner box Information'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Banner box Information'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_bannerboxes_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
return parent::_beforeToHtml();
|
18 |
+
}
|
19 |
+
|
20 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerboxes/Grid.php
CHANGED
@@ -1,85 +1,85 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('bannerGrid');
|
7 |
-
$this->setDefaultSort('banner_box_type');
|
8 |
-
$this->setDefaultDir('ASC');
|
9 |
-
$this->setSaveParametersInSession(true);
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareCollection() {
|
13 |
-
$collection = Mage::getModel('qixol/bannerboxes')->getCollection();
|
14 |
-
$this->setCollection($collection);
|
15 |
-
return parent::_prepareCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _prepareColumns() {
|
19 |
-
|
20 |
-
$this->addColumn('banner_box_type', array(
|
21 |
-
'header' => Mage::helper('qixol')->__('Banner Box Type'),
|
22 |
-
'width' => '100px',
|
23 |
-
'index' => 'banner_box_type',
|
24 |
-
'type' => 'options',
|
25 |
-
'options' => array(
|
26 |
-
'CATEGORY_TOP' => 'CATEGORY_TOP',
|
27 |
-
'PRODUCT_BOTTOM' => 'PRODUCT_BOTTOM',
|
28 |
-
'PRODUCT_TOP' => 'PRODUCT_TOP',
|
29 |
-
'PRODUCT_INLINE' => 'PRODUCT_INLINE',
|
30 |
-
'BASKET_INLINE' => 'BASKET_INLINE',
|
31 |
-
'CATEGORY_STICKERS' => 'CATEGORY_STICKERS',
|
32 |
-
'PRODUCT_INFO_STICKERS' => 'PRODUCT_INFO_STICKERS',
|
33 |
-
),
|
34 |
-
));
|
35 |
-
|
36 |
-
$this->addColumn('banner_box_is_active', array(
|
37 |
-
'header' => Mage::helper('qixol')->__('Enabled?'),
|
38 |
-
'align' => 'left',
|
39 |
-
'width' => '80px',
|
40 |
-
'index' => 'banner_box_is_active',
|
41 |
-
'type' => 'options',
|
42 |
-
'options' => array(
|
43 |
-
|
44 |
-
|
45 |
-
),
|
46 |
-
));
|
47 |
-
|
48 |
-
$this->addColumn('banner_box_translation_type', array(
|
49 |
-
'header' => Mage::helper('qixol')->__('Translate Type'),
|
50 |
-
'width' => '80px',
|
51 |
-
'index' => 'banner_box_translation_type',
|
52 |
-
'align' => 'center',
|
53 |
-
));
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
$this->addColumn('action',
|
58 |
-
array(
|
59 |
-
'header' => Mage::helper('qixol')->__('Action'),
|
60 |
-
'width' => '80',
|
61 |
-
'type' => 'action',
|
62 |
-
'getter' => 'getId',
|
63 |
-
'actions' => array(
|
64 |
-
array(
|
65 |
-
'caption' => Mage::helper('qixol')->__('Edit'),
|
66 |
-
'url' => array('base' => '*/*/edit'),
|
67 |
-
'field' => 'id'
|
68 |
-
)
|
69 |
-
),
|
70 |
-
'filter' => false,
|
71 |
-
'sortable' => false,
|
72 |
-
'index' => 'stores',
|
73 |
-
'is_system' => true,
|
74 |
-
));
|
75 |
-
|
76 |
-
//$this->addExportType('*/*/exportCsv', Mage::helper('qixol')->__('CSV'));
|
77 |
-
//$this->addExportType('*/*/exportXml', Mage::helper('qixol')->__('XML'));
|
78 |
-
return parent::_prepareColumns();
|
79 |
-
}
|
80 |
-
|
81 |
-
public function getRowUrl($row) {
|
82 |
-
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
83 |
-
}
|
84 |
-
|
85 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerboxes_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('bannerGrid');
|
7 |
+
$this->setDefaultSort('banner_box_type');
|
8 |
+
$this->setDefaultDir('ASC');
|
9 |
+
$this->setSaveParametersInSession(true);
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareCollection() {
|
13 |
+
$collection = Mage::getModel('qixol/bannerboxes')->getCollection();
|
14 |
+
$this->setCollection($collection);
|
15 |
+
return parent::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
|
20 |
+
$this->addColumn('banner_box_type', array(
|
21 |
+
'header' => Mage::helper('qixol')->__('Banner Box Type'),
|
22 |
+
'width' => '100px',
|
23 |
+
'index' => 'banner_box_type',
|
24 |
+
'type' => 'options',
|
25 |
+
'options' => array(
|
26 |
+
'CATEGORY_TOP' => 'CATEGORY_TOP',
|
27 |
+
'PRODUCT_BOTTOM' => 'PRODUCT_BOTTOM',
|
28 |
+
'PRODUCT_TOP' => 'PRODUCT_TOP',
|
29 |
+
'PRODUCT_INLINE' => 'PRODUCT_INLINE',
|
30 |
+
'BASKET_INLINE' => 'BASKET_INLINE',
|
31 |
+
'CATEGORY_STICKERS' => 'CATEGORY_STICKERS',
|
32 |
+
'PRODUCT_INFO_STICKERS' => 'PRODUCT_INFO_STICKERS',
|
33 |
+
),
|
34 |
+
));
|
35 |
+
|
36 |
+
$this->addColumn('banner_box_is_active', array(
|
37 |
+
'header' => Mage::helper('qixol')->__('Enabled?'),
|
38 |
+
'align' => 'left',
|
39 |
+
'width' => '80px',
|
40 |
+
'index' => 'banner_box_is_active',
|
41 |
+
'type' => 'options',
|
42 |
+
'options' => array(
|
43 |
+
0 => 'Disabled',
|
44 |
+
1 => 'Enabled',
|
45 |
+
),
|
46 |
+
));
|
47 |
+
|
48 |
+
$this->addColumn('banner_box_translation_type', array(
|
49 |
+
'header' => Mage::helper('qixol')->__('Translate Type'),
|
50 |
+
'width' => '80px',
|
51 |
+
'index' => 'banner_box_translation_type',
|
52 |
+
'align' => 'center',
|
53 |
+
));
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
$this->addColumn('action',
|
58 |
+
array(
|
59 |
+
'header' => Mage::helper('qixol')->__('Action'),
|
60 |
+
'width' => '80',
|
61 |
+
'type' => 'action',
|
62 |
+
'getter' => 'getId',
|
63 |
+
'actions' => array(
|
64 |
+
array(
|
65 |
+
'caption' => Mage::helper('qixol')->__('Edit'),
|
66 |
+
'url' => array('base' => '*/*/edit'),
|
67 |
+
'field' => 'id'
|
68 |
+
)
|
69 |
+
),
|
70 |
+
'filter' => false,
|
71 |
+
'sortable' => false,
|
72 |
+
'index' => 'stores',
|
73 |
+
'is_system' => true,
|
74 |
+
));
|
75 |
+
|
76 |
+
//$this->addExportType('*/*/exportCsv', Mage::helper('qixol')->__('CSV'));
|
77 |
+
//$this->addExportType('*/*/exportXml', Mage::helper('qixol')->__('XML'));
|
78 |
+
return parent::_prepareColumns();
|
79 |
+
}
|
80 |
+
|
81 |
+
public function getRowUrl($row) {
|
82 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
83 |
+
}
|
84 |
+
|
85 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerimage extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
$this->_controller = 'adminhtml_bannerimage';
|
6 |
+
$this->_blockGroup = 'qixol';
|
7 |
+
$this->_headerText = Mage::helper('qixol')->__('Banner Image Manager');
|
8 |
+
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Banner image');
|
9 |
+
parent::__construct();
|
10 |
+
}
|
11 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerimage_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_bannerimage';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
}
|
15 |
+
|
16 |
+
public function getHeaderText() {
|
17 |
+
if (Mage::registry('bannerimage_data') && Mage::registry('bannerimage_data')->getId()) {
|
18 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('bannerimage_data')->getTitle()));
|
19 |
+
} else {
|
20 |
+
return Mage::helper('qixol')->__('Add Item');
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerimage_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
|
9 |
+
'action' => $this->getUrl('*/*/save'),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerimage_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$form = new Varien_Data_Form();
|
6 |
+
$this->setForm($form);
|
7 |
+
$fieldset = $form->addFieldset('bannerimage_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('sticker/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
+
|
11 |
+
$field_last = $fieldset->addField('banner_id', 'hidden', array(
|
12 |
+
'label' => Mage::helper('qixol')->__('Banner id'),
|
13 |
+
'name' => 'banner_id',
|
14 |
+
'value' => $this->getRequest()->getParam('bannerid', false)
|
15 |
+
));
|
16 |
+
|
17 |
+
$fieldset->addField('filename', 'image', array(
|
18 |
+
'label' => Mage::helper('qixol')->__('Upload and use Image'),
|
19 |
+
'required' => true,
|
20 |
+
'name' => 'filename',
|
21 |
+
));
|
22 |
+
|
23 |
+
$field_last = $fieldset->addField('promotion_reference', 'text', array(
|
24 |
+
'label' => Mage::helper('qixol')->__('Promotion reference'),
|
25 |
+
'name' => 'promotion_reference',
|
26 |
+
));
|
27 |
+
|
28 |
+
$field_last = $fieldset->addField('comment', 'text', array(
|
29 |
+
'label' => Mage::helper('qixol')->__('Comment'),
|
30 |
+
'name' => 'comment',
|
31 |
+
));
|
32 |
+
|
33 |
+
$field_last = $fieldset->addField('url', 'text', array(
|
34 |
+
'label' => Mage::helper('qixol')->__('Url'),
|
35 |
+
'name' => 'url',
|
36 |
+
));
|
37 |
+
|
38 |
+
return parent::_prepareForm();
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Bannerimage/Edit/Tabs.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Bannerimage_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Item Information'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('images_grid', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Banner Images'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Banner images'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_bannerimage_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
return parent::_beforeToHtml();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap.php
CHANGED
@@ -4,8 +4,8 @@ class Holbi_Qixol_Block_Adminhtml_Customergrouspmap extends Mage_Adminhtml_Block
|
|
4 |
public function __construct() {
|
5 |
$this->_controller = 'adminhtml_customergrouspmap';
|
6 |
$this->_blockGroup = 'qixol';
|
7 |
-
$this->_headerText = Mage::helper('qixol')->__('Customer Group
|
8 |
-
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Customer Group
|
9 |
parent::__construct();
|
10 |
}
|
11 |
}
|
4 |
public function __construct() {
|
5 |
$this->_controller = 'adminhtml_customergrouspmap';
|
6 |
$this->_blockGroup = 'qixol';
|
7 |
+
$this->_headerText = Mage::helper('qixol')->__('Customer Group Integration Codes');
|
8 |
+
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Customer Group Integration Code');
|
9 |
parent::__construct();
|
10 |
}
|
11 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'qixol';
|
9 |
-
$this->_controller = 'adminhtml_customergrouspmap';
|
10 |
-
|
11 |
-
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
-
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
-
|
14 |
-
$this->_addButton('saveandcontinue', array(
|
15 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
-
'onclick' => 'saveAndContinueEdit()',
|
17 |
-
'class' => 'save',
|
18 |
-
), -100);
|
19 |
-
|
20 |
-
$this->_formScripts[] = "
|
21 |
-
|
22 |
-
function saveAndContinueEdit(){
|
23 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
-
}
|
25 |
-
|
26 |
-
";
|
27 |
-
}
|
28 |
-
|
29 |
-
public function getHeaderText() {
|
30 |
-
if (Mage::registry('customergrouspmap_data') && Mage::registry('customergrouspmap_data')->getId()) {
|
31 |
-
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('customergrouspmap_data')->getTitle()));
|
32 |
-
} else {
|
33 |
-
return Mage::helper('qixol')->__('Add Item');
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_customergrouspmap';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
$this->_addButton('saveandcontinue', array(
|
15 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
+
'onclick' => 'saveAndContinueEdit()',
|
17 |
+
'class' => 'save',
|
18 |
+
), -100);
|
19 |
+
|
20 |
+
$this->_formScripts[] = "
|
21 |
+
|
22 |
+
function saveAndContinueEdit(){
|
23 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
+
}
|
25 |
+
|
26 |
+
";
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getHeaderText() {
|
30 |
+
if (Mage::registry('customergrouspmap_data') && Mage::registry('customergrouspmap_data')->getId()) {
|
31 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('customergrouspmap_data')->getTitle()));
|
32 |
+
} else {
|
33 |
+
return Mage::helper('qixol')->__('Add Item');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit/Form.php
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
'id' => 'edit_form',
|
8 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
-
'method' => 'post',
|
10 |
-
)
|
11 |
-
);
|
12 |
-
|
13 |
-
$form->setUseContainer(true);
|
14 |
-
$this->setForm($form);
|
15 |
-
return parent::_prepareForm();
|
16 |
-
}
|
17 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
+
'method' => 'post',
|
10 |
+
)
|
11 |
+
);
|
12 |
+
|
13 |
+
$form->setUseContainer(true);
|
14 |
+
$this->setForm($form);
|
15 |
+
return parent::_prepareForm();
|
16 |
+
}
|
17 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit/Tab/Form.php
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
-
|
4 |
-
protected function _prepareForm() {
|
5 |
-
$hlp=Mage::helper('qixol');
|
6 |
-
$form = new Varien_Data_Form();
|
7 |
-
$this->setForm($form);
|
8 |
-
$fieldset = $form->addFieldset('customergrouspmap_form', array('legend' => $hlp->__('Item information')));
|
9 |
-
//$version = substr(Mage::getVersion(), 0, 3);
|
10 |
-
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('quxol/wysiwyg_config')->getConfig()" : "'class'=>''");
|
11 |
-
|
12 |
-
$list_map_names=Mage::getModel('qixol/customergrouspmap')->getCollection();
|
13 |
-
|
14 |
-
$customer_group_name_array_list=Array();
|
15 |
-
$list_map_names_exists=array();
|
16 |
-
|
17 |
-
foreach ($list_map_names as $list_map){
|
18 |
-
$list_map_names_exists[$list_map->getCustomerGroupName()]=$list_map->getCustomerGroupName();
|
19 |
-
}
|
20 |
-
|
21 |
-
|
22 |
-
$customerGroupModel = new Mage_Customer_Model_Group();
|
23 |
-
$allCustomerGroups = $customerGroupModel->getCollection()->toOptionHash();
|
24 |
-
foreach($allCustomerGroups as $key => $group){
|
25 |
-
$customer_group_name_array_list[$group] = $hlp->__($group);
|
26 |
-
if (isset($list_map_names_exists[$group])) unset($list_map_names_exists[$group]);
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
if (count($list_map_names_exists)){
|
33 |
-
foreach ($list_map_names_exists as $exists_old_code)
|
34 |
-
$customer_group_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$fieldset->addField('customer_group_name', 'select', array(
|
41 |
-
'label' => Mage::helper('qixol')->__('Customer Group
|
42 |
-
'class' => 'required-entry',
|
43 |
-
'required' => true,
|
44 |
-
'name' => 'customer_group_name',
|
45 |
-
'values' => $customer_group_name_array_list
|
46 |
-
));
|
47 |
-
|
48 |
-
$fieldset->addField('
|
49 |
-
'label' => Mage::helper('qixol')->__('
|
50 |
-
'class' => 'required-entry',
|
51 |
-
'required' => true,
|
52 |
-
'name' => '
|
53 |
-
'after_element_html' => Mage::helper('qixol')->__('Name to be send to qixol.'),
|
54 |
-
));
|
55 |
-
|
56 |
-
|
57 |
-
if (Mage::getSingleton('adminhtml/session')->getCustomergrouspmapData()) {
|
58 |
-
$form->setValues(Mage::getSingleton('adminhtml/session')->getCustomergrouspmapData());
|
59 |
-
Mage::getSingleton('adminhtml/session')->getCustomergrouspmapData(null);
|
60 |
-
} elseif (Mage::registry('customergrouspmap_data')) {
|
61 |
-
$form->setValues(Mage::registry('customergrouspmap_data')->getData());
|
62 |
-
}
|
63 |
-
return parent::_prepareForm();
|
64 |
-
}
|
65 |
-
|
66 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$hlp=Mage::helper('qixol');
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('customergrouspmap_form', array('legend' => $hlp->__('Item information')));
|
9 |
+
//$version = substr(Mage::getVersion(), 0, 3);
|
10 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('quxol/wysiwyg_config')->getConfig()" : "'class'=>''");
|
11 |
+
|
12 |
+
$list_map_names=Mage::getModel('qixol/customergrouspmap')->getCollection();
|
13 |
+
|
14 |
+
$customer_group_name_array_list=Array();
|
15 |
+
$list_map_names_exists=array();
|
16 |
+
|
17 |
+
foreach ($list_map_names as $list_map){
|
18 |
+
$list_map_names_exists[$list_map->getCustomerGroupName()]=$list_map->getCustomerGroupName();
|
19 |
+
}
|
20 |
+
|
21 |
+
|
22 |
+
$customerGroupModel = new Mage_Customer_Model_Group();
|
23 |
+
$allCustomerGroups = $customerGroupModel->getCollection()->toOptionHash();
|
24 |
+
foreach($allCustomerGroups as $key => $group){
|
25 |
+
$customer_group_name_array_list[$group] = $hlp->__($group);
|
26 |
+
if (isset($list_map_names_exists[$group])) unset($list_map_names_exists[$group]);
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
if (count($list_map_names_exists)){
|
33 |
+
foreach ($list_map_names_exists as $exists_old_code)
|
34 |
+
$customer_group_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
$fieldset->addField('customer_group_name', 'select', array(
|
41 |
+
'label' => Mage::helper('qixol')->__('Customer Group:'),
|
42 |
+
'class' => 'required-entry',
|
43 |
+
'required' => true,
|
44 |
+
'name' => 'customer_group_name',
|
45 |
+
'values' => $customer_group_name_array_list
|
46 |
+
));
|
47 |
+
|
48 |
+
$fieldset->addField('integration_code', 'text', array(
|
49 |
+
'label' => Mage::helper('qixol')->__('Integration Code'),
|
50 |
+
'class' => 'required-entry',
|
51 |
+
'required' => true,
|
52 |
+
'name' => 'integration_code',
|
53 |
+
'after_element_html' => Mage::helper('qixol')->__('Name to be send to qixol.'),
|
54 |
+
));
|
55 |
+
|
56 |
+
|
57 |
+
if (Mage::getSingleton('adminhtml/session')->getCustomergrouspmapData()) {
|
58 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getCustomergrouspmapData());
|
59 |
+
Mage::getSingleton('adminhtml/session')->getCustomergrouspmapData(null);
|
60 |
+
} elseif (Mage::registry('customergrouspmap_data')) {
|
61 |
+
$form->setValues(Mage::registry('customergrouspmap_data')->getData());
|
62 |
+
}
|
63 |
+
return parent::_prepareForm();
|
64 |
+
}
|
65 |
+
|
66 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Edit/Tabs.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('qixol_tabs');
|
7 |
-
$this->setDestElementId('edit_form');
|
8 |
-
$this->setTitle(Mage::helper('qixol')->__('Customer Group
|
9 |
-
}
|
10 |
-
|
11 |
-
protected function _beforeToHtml() {
|
12 |
-
$this->addTab('form_section', array(
|
13 |
-
'label' => Mage::helper('qixol')->__('Customer Group
|
14 |
-
'alt' => Mage::helper('qixol')->__('Customer Group
|
15 |
-
'content' => $this->getLayout()->createBlock('qixol/adminhtml_customergrouspmap_edit_tab_form')->toHtml(),
|
16 |
-
));
|
17 |
-
return parent::_beforeToHtml();
|
18 |
-
}
|
19 |
-
|
20 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Customer Group Integration Codes Information'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('form_section', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Customer Group Integration Codes'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Customer Group Integration Codes'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_customergrouspmap_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
return parent::_beforeToHtml();
|
18 |
+
}
|
19 |
+
|
20 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Customergrouspmap/Grid.php
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('customergrouspmapGrid');
|
7 |
-
$this->setDefaultSort('
|
8 |
-
$this->setDefaultDir('ASC');
|
9 |
-
$this->setSaveParametersInSession(true);
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareCollection() {
|
13 |
-
$collection = Mage::getModel('qixol/customergrouspmap')->getCollection();
|
14 |
-
$this->setCollection($collection);
|
15 |
-
return parent::_prepareCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _prepareColumns() {
|
19 |
-
$hlp = Mage::helper('qixol');
|
20 |
-
$list_map_names=Mage::getModel('qixol/customergrouspmap')->getCollection();
|
21 |
-
|
22 |
-
$customer_group_name_array_list=Array();
|
23 |
-
$list_map_names_exists=array();
|
24 |
-
|
25 |
-
foreach ($list_map_names as $list_map){
|
26 |
-
$list_map_names_exists[$list_map->getCustomerGroupName()]=$list_map->getCustomerGroupName();
|
27 |
-
}
|
28 |
-
|
29 |
-
|
30 |
-
$customerGroupModel = new Mage_Customer_Model_Group();
|
31 |
-
$allCustomerGroups = $customerGroupModel->getCollection()->toOptionHash();
|
32 |
-
foreach($allCustomerGroups as $key => $group){
|
33 |
-
$customer_group_name_array_list[$group] = $hlp->__($group);
|
34 |
-
if (isset($list_map_names_exists[$group])) unset($list_map_names_exists[$group]);
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
if (count($list_map_names_exists)){
|
41 |
-
foreach ($list_map_names_exists as $exists_old_code)
|
42 |
-
$customer_group_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
43 |
-
|
44 |
-
}
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
$this->addColumn('customer_group_name', array(
|
49 |
-
'header' => $hlp->__('Customer Group
|
50 |
-
'type' => 'customer',
|
51 |
-
'align' => 'left',
|
52 |
-
'width' => '250px',
|
53 |
-
'index' => 'customer_group_name',
|
54 |
-
'type' => 'options',
|
55 |
-
'options' => $customer_group_name_array_list
|
56 |
-
));
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
$this->addColumn('
|
61 |
-
'header' => $hlp->__('
|
62 |
-
'width' => '350px',
|
63 |
-
'index' => '
|
64 |
-
));
|
65 |
-
|
66 |
-
$this->addColumn('action',
|
67 |
-
array(
|
68 |
-
'header' => $hlp->__('Action'),
|
69 |
-
'width' => '80',
|
70 |
-
'type' => 'action',
|
71 |
-
'getter' => 'getId',
|
72 |
-
'actions' => array(
|
73 |
-
array(
|
74 |
-
'caption' => $hlp->__('Edit'),
|
75 |
-
'url' => array('base' => '*/*/edit'),
|
76 |
-
'field' => 'id'
|
77 |
-
),
|
78 |
-
array(
|
79 |
-
'caption' => $hlp->__('Delete'),
|
80 |
-
'url' => array('base' => '*/*/delete'),
|
81 |
-
'field' => 'id'
|
82 |
-
)
|
83 |
-
),
|
84 |
-
'filter' => false,
|
85 |
-
'sortable' => false,
|
86 |
-
'index' => 'stores',
|
87 |
-
'is_system' => true,
|
88 |
-
));
|
89 |
-
|
90 |
-
return parent::_prepareColumns();
|
91 |
-
}
|
92 |
-
|
93 |
-
public function getRowUrl($row) {
|
94 |
-
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
95 |
-
}
|
96 |
-
|
97 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Customergrouspmap_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('customergrouspmapGrid');
|
7 |
+
$this->setDefaultSort('integration_code');
|
8 |
+
$this->setDefaultDir('ASC');
|
9 |
+
$this->setSaveParametersInSession(true);
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareCollection() {
|
13 |
+
$collection = Mage::getModel('qixol/customergrouspmap')->getCollection();
|
14 |
+
$this->setCollection($collection);
|
15 |
+
return parent::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
$hlp = Mage::helper('qixol');
|
20 |
+
$list_map_names=Mage::getModel('qixol/customergrouspmap')->getCollection();
|
21 |
+
|
22 |
+
$customer_group_name_array_list=Array();
|
23 |
+
$list_map_names_exists=array();
|
24 |
+
|
25 |
+
foreach ($list_map_names as $list_map){
|
26 |
+
$list_map_names_exists[$list_map->getCustomerGroupName()]=$list_map->getCustomerGroupName();
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
$customerGroupModel = new Mage_Customer_Model_Group();
|
31 |
+
$allCustomerGroups = $customerGroupModel->getCollection()->toOptionHash();
|
32 |
+
foreach($allCustomerGroups as $key => $group){
|
33 |
+
$customer_group_name_array_list[$group] = $hlp->__($group);
|
34 |
+
if (isset($list_map_names_exists[$group])) unset($list_map_names_exists[$group]);
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
if (count($list_map_names_exists)){
|
41 |
+
foreach ($list_map_names_exists as $exists_old_code)
|
42 |
+
$customer_group_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
$this->addColumn('customer_group_name', array(
|
49 |
+
'header' => $hlp->__('Customer Group'),
|
50 |
+
'type' => 'customer',
|
51 |
+
'align' => 'left',
|
52 |
+
'width' => '250px',
|
53 |
+
'index' => 'customer_group_name',
|
54 |
+
'type' => 'options',
|
55 |
+
'options' => $customer_group_name_array_list
|
56 |
+
));
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
$this->addColumn('integration_code', array(
|
61 |
+
'header' => $hlp->__('Integration Code'),
|
62 |
+
'width' => '350px',
|
63 |
+
'index' => 'integration_code'
|
64 |
+
));
|
65 |
+
|
66 |
+
$this->addColumn('action',
|
67 |
+
array(
|
68 |
+
'header' => $hlp->__('Action'),
|
69 |
+
'width' => '80',
|
70 |
+
'type' => 'action',
|
71 |
+
'getter' => 'getId',
|
72 |
+
'actions' => array(
|
73 |
+
array(
|
74 |
+
'caption' => $hlp->__('Edit'),
|
75 |
+
'url' => array('base' => '*/*/edit'),
|
76 |
+
'field' => 'id'
|
77 |
+
),
|
78 |
+
array(
|
79 |
+
'caption' => $hlp->__('Delete'),
|
80 |
+
'url' => array('base' => '*/*/delete'),
|
81 |
+
'field' => 'id'
|
82 |
+
)
|
83 |
+
),
|
84 |
+
'filter' => false,
|
85 |
+
'sortable' => false,
|
86 |
+
'index' => 'stores',
|
87 |
+
'is_system' => true,
|
88 |
+
));
|
89 |
+
|
90 |
+
return parent::_prepareColumns();
|
91 |
+
}
|
92 |
+
|
93 |
+
public function getRowUrl($row) {
|
94 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
95 |
+
}
|
96 |
+
|
97 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap.php
CHANGED
@@ -4,8 +4,8 @@ class Holbi_Qixol_Block_Adminhtml_Shippingmap extends Mage_Adminhtml_Block_Widge
|
|
4 |
public function __construct() {
|
5 |
$this->_controller = 'adminhtml_shippingmap';
|
6 |
$this->_blockGroup = 'qixol';
|
7 |
-
$this->_headerText = Mage::helper('qixol')->__('
|
8 |
-
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Shipping
|
9 |
parent::__construct();
|
10 |
}
|
11 |
}
|
4 |
public function __construct() {
|
5 |
$this->_controller = 'adminhtml_shippingmap';
|
6 |
$this->_blockGroup = 'qixol';
|
7 |
+
$this->_headerText = Mage::helper('qixol')->__('Shipping Method Integration Codes');
|
8 |
+
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Shipping Method Integration Code');
|
9 |
parent::__construct();
|
10 |
}
|
11 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'qixol';
|
9 |
-
$this->_controller = 'adminhtml_shippingmap';
|
10 |
-
|
11 |
-
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
-
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
-
|
14 |
-
$this->_addButton('saveandcontinue', array(
|
15 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
-
'onclick' => 'saveAndContinueEdit()',
|
17 |
-
'class' => 'save',
|
18 |
-
), -100);
|
19 |
-
|
20 |
-
$this->_formScripts[] = "
|
21 |
-
|
22 |
-
function saveAndContinueEdit(){
|
23 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
-
}
|
25 |
-
|
26 |
-
";
|
27 |
-
}
|
28 |
-
|
29 |
-
public function getHeaderText() {
|
30 |
-
if (Mage::registry('shippingmap_data') && Mage::registry('shippingmap_data')->getId()) {
|
31 |
-
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('shippingmap_data')->getTitle()));
|
32 |
-
} else {
|
33 |
-
return Mage::helper('qixol')->__('Add Item');
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_shippingmap';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
$this->_addButton('saveandcontinue', array(
|
15 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
+
'onclick' => 'saveAndContinueEdit()',
|
17 |
+
'class' => 'save',
|
18 |
+
), -100);
|
19 |
+
|
20 |
+
$this->_formScripts[] = "
|
21 |
+
|
22 |
+
function saveAndContinueEdit(){
|
23 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
+
}
|
25 |
+
|
26 |
+
";
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getHeaderText() {
|
30 |
+
if (Mage::registry('shippingmap_data') && Mage::registry('shippingmap_data')->getId()) {
|
31 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('shippingmap_data')->getTitle()));
|
32 |
+
} else {
|
33 |
+
return Mage::helper('qixol')->__('Add Item');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit/Form.php
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
'id' => 'edit_form',
|
8 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
-
'method' => 'post',
|
10 |
-
)
|
11 |
-
);
|
12 |
-
|
13 |
-
$form->setUseContainer(true);
|
14 |
-
$this->setForm($form);
|
15 |
-
return parent::_prepareForm();
|
16 |
-
}
|
17 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
+
'method' => 'post',
|
10 |
+
)
|
11 |
+
);
|
12 |
+
|
13 |
+
$form->setUseContainer(true);
|
14 |
+
$this->setForm($form);
|
15 |
+
return parent::_prepareForm();
|
16 |
+
}
|
17 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit/Tab/Form.php
CHANGED
@@ -1,89 +1,151 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
-
|
4 |
-
protected function _prepareForm() {
|
5 |
-
$hlp=Mage::helper('qixol');
|
6 |
-
$form = new Varien_Data_Form();
|
7 |
-
$this->setForm($form);
|
8 |
-
$fieldset = $form->addFieldset('shippingmap_form', array('legend' => $hlp->__('Item information')));
|
9 |
-
//$version = substr(Mage::getVersion(), 0, 3);
|
10 |
-
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('quxol/wysiwyg_config')->getConfig()" : "'class'=>''");
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
$shipping_name_array_list=Array();
|
15 |
-
|
16 |
-
|
17 |
-
$list_map_names=Mage::getModel('qixol/shippingmap')->getCollection();
|
18 |
-
$list_map_names_exists=array();
|
19 |
-
|
20 |
-
foreach ($list_map_names as $list_map){
|
21 |
-
$list_map_names_exists[$list_map->getShippingName()]=$list_map->getShippingName();
|
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 |
-
|
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 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$hlp=Mage::helper('qixol');
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('shippingmap_form', array('legend' => $hlp->__('Item information')));
|
9 |
+
//$version = substr(Mage::getVersion(), 0, 3);
|
10 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('quxol/wysiwyg_config')->getConfig()" : "'class'=>''");
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
$shipping_name_array_list=Array();
|
15 |
+
|
16 |
+
|
17 |
+
$list_map_names=Mage::getModel('qixol/shippingmap')->getCollection();
|
18 |
+
$list_map_names_exists=array();
|
19 |
+
|
20 |
+
foreach ($list_map_names as $list_map){
|
21 |
+
$list_map_names_exists[$list_map->getShippingName()]=$list_map->getShippingName();
|
22 |
+
}
|
23 |
+
|
24 |
+
//$carriers = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
25 |
+
$carriers = Mage::getSingleton('shipping/config')->getAllCarriers();
|
26 |
+
|
27 |
+
$shippingMethodDropDownValues = array();
|
28 |
+
|
29 |
+
foreach($carriers as $_ccode => $_carrier)
|
30 |
+
{
|
31 |
+
$carrierMethods = array();
|
32 |
+
|
33 |
+
if(!$_title = Mage::getStoreConfig("carriers/$_ccode/title"))
|
34 |
+
{
|
35 |
+
$_title = $_ccode;
|
36 |
+
}
|
37 |
+
|
38 |
+
try{ //some methods not allowed getAllowedMethods
|
39 |
+
if($_methods = $_carrier->getAllowedMethods())
|
40 |
+
{
|
41 |
+
foreach($_methods as $_mcode => $_method)
|
42 |
+
{
|
43 |
+
$_code = $_ccode . '_' . $_mcode;
|
44 |
+
$shippingMethod = $hlp->__(trim($_method) == '' ? $_code : $_method);
|
45 |
+
$carrierMethods[] = array(
|
46 |
+
'value' => $_code . '::' . $_title . '::' . $shippingMethod,
|
47 |
+
'label' => $shippingMethod
|
48 |
+
);
|
49 |
+
if (isset($list_map_names_exists[$_code]))
|
50 |
+
{
|
51 |
+
unset($_code);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
$shippingMethodDropDownValues[] = array('label' => $_title, 'value' => $carrierMethods);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
catch(Exception $e) {
|
59 |
+
continue;
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
//$shipping_name_array_list = array(
|
65 |
+
// array(
|
66 |
+
// 'label' => 'Flatrate',
|
67 |
+
// 'value' => array(array('label' => 'Fixed', 'value' => 'flatrate_flatrate'))
|
68 |
+
// ),
|
69 |
+
// array(
|
70 |
+
// 'label' => 'Free Shipping',
|
71 |
+
// 'value' => array(array('label' => 'Free', 'value' => 'freeshipping_freeshipping'))
|
72 |
+
// ),
|
73 |
+
// array(
|
74 |
+
// 'label' => 'Federal Express',
|
75 |
+
// 'value' => array(
|
76 |
+
// array('label' => '2 Day', 'value' => 'fedex_FEDEX_2_DAY'),
|
77 |
+
// array('label' => 'Ground', 'value' => 'fedex_FEDEX_GROUND'),
|
78 |
+
// array('label' => 'First Overnight', 'value' => 'fedex_FIRST_OVERNIGHT')
|
79 |
+
// ))
|
80 |
+
//);
|
81 |
+
|
82 |
+
$fieldset->addField('shipping_method', 'select', array(
|
83 |
+
'label' => Mage::helper('qixol')->__('Shipping Method'),
|
84 |
+
'class' => 'required-entry',
|
85 |
+
'required' => true,
|
86 |
+
'name' => 'shipping_method',
|
87 |
+
'values' => $shippingMethodDropDownValues
|
88 |
+
));
|
89 |
+
|
90 |
+
$fieldset->addField('integration_code', 'text', array(
|
91 |
+
'label' => Mage::helper('qixol')->__('Integration Code'),
|
92 |
+
'class' => 'required-entry',
|
93 |
+
'required' => true,
|
94 |
+
'name' => 'integration_code',
|
95 |
+
'after_element_html' => Mage::helper('qixol')->__('Code to be synchronised to Promo'),
|
96 |
+
));
|
97 |
+
|
98 |
+
$fieldset->addField('shipping_name', 'hidden', array(
|
99 |
+
'name' => 'shipping_name'
|
100 |
+
));
|
101 |
+
|
102 |
+
$fieldset->addField('carrier_title', 'hidden', array(
|
103 |
+
'name' => 'carrier_title'
|
104 |
+
));
|
105 |
+
|
106 |
+
$lastField = $fieldset->addField('carrier_method', 'hidden', array(
|
107 |
+
'name' => 'carrier_method'
|
108 |
+
));
|
109 |
+
|
110 |
+
|
111 |
+
$lastField->setAfterElementHtml($this->prepareScript());
|
112 |
+
|
113 |
+
if (Mage::getSingleton('adminhtml/session')->getShippingmapData()) {
|
114 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getShippingmapData());
|
115 |
+
Mage::getSingleton('adminhtml/session')->setShippingmapData(null);
|
116 |
+
} elseif (Mage::registry('shippingmap_data')) {
|
117 |
+
$form->setValues(Mage::registry('shippingmap_data')->getData());
|
118 |
+
}
|
119 |
+
return parent::_prepareForm();
|
120 |
+
}
|
121 |
+
|
122 |
+
private function prepareScript()
|
123 |
+
{
|
124 |
+
return '<script>
|
125 |
+
//< ![C
|
126 |
+
function shipping_method_onChange(){
|
127 |
+
setDataFields();
|
128 |
+
}
|
129 |
+
|
130 |
+
function setDataFields() {
|
131 |
+
var shippingMethodDetails = $("shipping_method").value.split(\'::\');
|
132 |
+
$("shipping_name").value = shippingMethodDetails[0];
|
133 |
+
$("carrier_title").value = shippingMethodDetails[1];
|
134 |
+
$("carrier_method").value = shippingMethodDetails[2];
|
135 |
+
}
|
136 |
+
|
137 |
+
document.observe("dom:loaded", function() {
|
138 |
+
|
139 |
+
$("shipping_method").observe("change",function(e){
|
140 |
+
shipping_method_onChange();
|
141 |
+
});
|
142 |
+
|
143 |
+
setDataFields();
|
144 |
+
|
145 |
+
});
|
146 |
+
|
147 |
+
|
148 |
+
//]]>
|
149 |
+
</script>';
|
150 |
+
}
|
151 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Edit/Tabs.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('qixol_tabs');
|
7 |
-
$this->setDestElementId('edit_form');
|
8 |
-
$this->setTitle(Mage::helper('qixol')->__('Shipping
|
9 |
-
}
|
10 |
-
|
11 |
-
protected function _beforeToHtml() {
|
12 |
-
$this->addTab('form_section', array(
|
13 |
-
'label' => Mage::helper('qixol')->__('Shipping
|
14 |
-
'alt' => Mage::helper('qixol')->__('Shipping
|
15 |
-
'content' => $this->getLayout()->createBlock('qixol/adminhtml_shippingmap_edit_tab_form')->toHtml(),
|
16 |
-
));
|
17 |
-
return parent::_beforeToHtml();
|
18 |
-
}
|
19 |
-
|
20 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Shipping Method'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('form_section', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Shipping Method'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Shipping Method'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_shippingmap_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
return parent::_beforeToHtml();
|
18 |
+
}
|
19 |
+
|
20 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Shippingmap/Grid.php
CHANGED
@@ -1,119 +1,129 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('shippingmapGrid');
|
7 |
-
$this->setDefaultSort('
|
8 |
-
$this->setDefaultDir('ASC');
|
9 |
-
$this->setSaveParametersInSession(true);
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareCollection() {
|
13 |
-
$collection = Mage::getModel('qixol/shippingmap')->getCollection();
|
14 |
-
$this->setCollection($collection);
|
15 |
-
return parent::_prepareCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _prepareColumns() {
|
19 |
-
$hlp = Mage::helper('qixol');
|
20 |
-
$list_map_names=Mage::getModel('qixol/shippingmap')->getCollection();
|
21 |
-
|
22 |
-
$shipping_name_array_list=Array();
|
23 |
-
$list_map_names_exists=array();
|
24 |
-
|
25 |
-
foreach ($list_map_names as $list_map){
|
26 |
-
$list_map_names_exists[$list_map->getShippingName()]=$list_map->getShippingName();
|
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 |
-
|
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 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Shippingmap_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('shippingmapGrid');
|
7 |
+
$this->setDefaultSort('integration_code');
|
8 |
+
$this->setDefaultDir('ASC');
|
9 |
+
$this->setSaveParametersInSession(true);
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareCollection() {
|
13 |
+
$collection = Mage::getModel('qixol/shippingmap')->getCollection();
|
14 |
+
$this->setCollection($collection);
|
15 |
+
return parent::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
$hlp = Mage::helper('qixol');
|
20 |
+
$list_map_names=Mage::getModel('qixol/shippingmap')->getCollection();
|
21 |
+
|
22 |
+
$shipping_name_array_list=Array();
|
23 |
+
$list_map_names_exists=array();
|
24 |
+
|
25 |
+
foreach ($list_map_names as $list_map){
|
26 |
+
$list_map_names_exists[$list_map->getShippingName()]=$list_map->getShippingName();
|
27 |
+
}
|
28 |
+
|
29 |
+
//$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
30 |
+
$methods = Mage::getSingleton('shipping/config')->getAllCarriers();
|
31 |
+
|
32 |
+
//$options = array();
|
33 |
+
|
34 |
+
foreach($methods as $_ccode => $_carrier)
|
35 |
+
{
|
36 |
+
$_methodOptions = array();
|
37 |
+
try{ //some methods not allowed getAllowedMethods
|
38 |
+
if($_methods = $_carrier->getAllowedMethods())
|
39 |
+
{
|
40 |
+
if(!$_title = Mage::getStoreConfig("carriers/$_ccode/title"))
|
41 |
+
$_title = $_ccode;
|
42 |
+
|
43 |
+
foreach($_methods as $_mcode => $_method)
|
44 |
+
{
|
45 |
+
$_code = $_ccode . '_' . $_mcode;
|
46 |
+
$shipping_name_array_list[$_code] = $hlp->__(trim($_method)==''?$_code:$_method)." - /".$_code."/";
|
47 |
+
if (isset($list_map_names_exists[$_code])) unset($shipping_name_array_list[$_code]);
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
// $options[] = array('value' => $_methodOptions, 'label' => $hlp->__($_title));*/
|
52 |
+
}
|
53 |
+
}
|
54 |
+
catch(Exception $e) {
|
55 |
+
continue;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
if (count($list_map_names_exists)){
|
60 |
+
foreach ($list_map_names_exists as $exists_old_code)
|
61 |
+
$shipping_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
$this->addColumn('shipping_name', array(
|
68 |
+
'header' => $hlp->__('Shipping Method'),
|
69 |
+
'type' => 'shipping',
|
70 |
+
'align' => 'left',
|
71 |
+
'width' => '250px',
|
72 |
+
'index' => 'shipping_name',
|
73 |
+
'type' => 'options',
|
74 |
+
'options' => $shipping_name_array_list,
|
75 |
+
'column_css_class' => 'no-display',
|
76 |
+
'header_css_class' => 'no-display'
|
77 |
+
|
78 |
+
));
|
79 |
+
|
80 |
+
$this->addColumn('carrier_title', array(
|
81 |
+
'header' => $hlp->__('Carrier'),
|
82 |
+
'align' => 'left',
|
83 |
+
'index' => 'carrier_title'
|
84 |
+
));
|
85 |
+
|
86 |
+
$this->addColumn('carrier_method', array(
|
87 |
+
'header' => $hlp->__('Method'),
|
88 |
+
'align' => 'left',
|
89 |
+
'index' => 'carrier_method'
|
90 |
+
));
|
91 |
+
|
92 |
+
$this->addColumn('integration_code', array(
|
93 |
+
'header' => $hlp->__('Integration Code'),
|
94 |
+
'width' => '350px',
|
95 |
+
'index' => 'integration_code'
|
96 |
+
));
|
97 |
+
|
98 |
+
$this->addColumn('action',
|
99 |
+
array(
|
100 |
+
'header' => $hlp->__('Action'),
|
101 |
+
'width' => '80',
|
102 |
+
'type' => 'action',
|
103 |
+
'getter' => 'getId',
|
104 |
+
'actions' => array(
|
105 |
+
array(
|
106 |
+
'caption' => $hlp->__('Edit'),
|
107 |
+
'url' => array('base' => '*/*/edit'),
|
108 |
+
'field' => 'id'
|
109 |
+
),
|
110 |
+
array(
|
111 |
+
'caption' => $hlp->__('Delete'),
|
112 |
+
'url' => array('base' => '*/*/delete'),
|
113 |
+
'field' => 'id'
|
114 |
+
)
|
115 |
+
),
|
116 |
+
'filter' => false,
|
117 |
+
'sortable' => false,
|
118 |
+
'index' => 'stores',
|
119 |
+
'is_system' => true,
|
120 |
+
));
|
121 |
+
|
122 |
+
return parent::_prepareColumns();
|
123 |
+
}
|
124 |
+
|
125 |
+
public function getRowUrl($row) {
|
126 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
127 |
+
}
|
128 |
+
|
129 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Sticker extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
$this->_controller = 'adminhtml_sticker';
|
6 |
-
$this->_blockGroup = 'qixol';
|
7 |
-
$this->_headerText = Mage::helper('qixol')->__('Stickers Manager');
|
8 |
-
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Sticker');
|
9 |
-
parent::__construct();
|
10 |
-
}
|
11 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Sticker extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
$this->_controller = 'adminhtml_sticker';
|
6 |
+
$this->_blockGroup = 'qixol';
|
7 |
+
$this->_headerText = Mage::helper('qixol')->__('Stickers Manager');
|
8 |
+
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Sticker');
|
9 |
+
parent::__construct();
|
10 |
+
}
|
11 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit.php
CHANGED
@@ -1,69 +1,69 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'qixol';
|
9 |
-
$this->_controller = 'adminhtml_sticker';
|
10 |
-
|
11 |
-
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
-
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
-
|
14 |
-
$this->_addButton('saveandcontinue', array(
|
15 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
-
'onclick' => 'saveAndContinueEdit()',
|
17 |
-
'class' => 'save',
|
18 |
-
), -100);
|
19 |
-
|
20 |
-
$this->_formScripts[] = "
|
21 |
-
/*function toggleEditor() {
|
22 |
-
if (tinyMCE.getInstanceById('sticker_content') == null) {
|
23 |
-
tinyMCE.execCommand('mceAddControl', false, 'sticker_content');
|
24 |
-
} else {
|
25 |
-
tinyMCE.execCommand('mceRemoveControl', false, 'sticker_content');
|
26 |
-
}
|
27 |
-
}*/
|
28 |
-
|
29 |
-
function saveAndContinueEdit(){
|
30 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
31 |
-
}
|
32 |
-
|
33 |
-
function showTypeContents(){
|
34 |
-
var typeId=$('sticker_type').value;
|
35 |
-
var show = ((typeId==0)?'block':'none');
|
36 |
-
var hide = ((typeId==0)?'none':'block');
|
37 |
-
$('filename').setStyle({display:show});
|
38 |
-
$('filename_delete').setStyle({display:show});
|
39 |
-
//$('sticker_content').setStyle({display:hide});
|
40 |
-
setTimeout('stickerContentType()',1000);
|
41 |
-
alert($('filename').getStyle('display'))
|
42 |
-
}
|
43 |
-
|
44 |
-
function stickerContentType(){
|
45 |
-
var typeId=$('sticker_type').value;
|
46 |
-
var hide = ((typeId==0)?'none':'block');
|
47 |
-
$('buttonssticker_content').setStyle({display:hide});
|
48 |
-
$('sticker_content_parent').setStyle({display:hide});
|
49 |
-
}
|
50 |
-
|
51 |
-
|
52 |
-
/* Event.observe('sticker_type', 'change', function(){
|
53 |
-
showTypeContents();
|
54 |
-
});
|
55 |
-
Event.observe(window, 'load', function(){
|
56 |
-
showTypeContents();
|
57 |
-
}); */
|
58 |
-
";
|
59 |
-
}
|
60 |
-
|
61 |
-
public function getHeaderText() {
|
62 |
-
if (Mage::registry('sticker_data') && Mage::registry('sticker_data')->getId()) {
|
63 |
-
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('sticker_data')->getTitle()));
|
64 |
-
} else {
|
65 |
-
return Mage::helper('qixol')->__('Add Item');
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_sticker';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
$this->_addButton('saveandcontinue', array(
|
15 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
+
'onclick' => 'saveAndContinueEdit()',
|
17 |
+
'class' => 'save',
|
18 |
+
), -100);
|
19 |
+
|
20 |
+
$this->_formScripts[] = "
|
21 |
+
/*function toggleEditor() {
|
22 |
+
if (tinyMCE.getInstanceById('sticker_content') == null) {
|
23 |
+
tinyMCE.execCommand('mceAddControl', false, 'sticker_content');
|
24 |
+
} else {
|
25 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'sticker_content');
|
26 |
+
}
|
27 |
+
}*/
|
28 |
+
|
29 |
+
function saveAndContinueEdit(){
|
30 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
31 |
+
}
|
32 |
+
|
33 |
+
function showTypeContents(){
|
34 |
+
var typeId=$('sticker_type').value;
|
35 |
+
var show = ((typeId==0)?'block':'none');
|
36 |
+
var hide = ((typeId==0)?'none':'block');
|
37 |
+
$('filename').setStyle({display:show});
|
38 |
+
$('filename_delete').setStyle({display:show});
|
39 |
+
//$('sticker_content').setStyle({display:hide});
|
40 |
+
setTimeout('stickerContentType()',1000);
|
41 |
+
alert($('filename').getStyle('display'))
|
42 |
+
}
|
43 |
+
|
44 |
+
function stickerContentType(){
|
45 |
+
var typeId=$('sticker_type').value;
|
46 |
+
var hide = ((typeId==0)?'none':'block');
|
47 |
+
$('buttonssticker_content').setStyle({display:hide});
|
48 |
+
$('sticker_content_parent').setStyle({display:hide});
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
/* Event.observe('sticker_type', 'change', function(){
|
53 |
+
showTypeContents();
|
54 |
+
});
|
55 |
+
Event.observe(window, 'load', function(){
|
56 |
+
showTypeContents();
|
57 |
+
}); */
|
58 |
+
";
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getHeaderText() {
|
62 |
+
if (Mage::registry('sticker_data') && Mage::registry('sticker_data')->getId()) {
|
63 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('sticker_data')->getTitle()));
|
64 |
+
} else {
|
65 |
+
return Mage::helper('qixol')->__('Add Item');
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit/Form.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
'id' => 'edit_form',
|
8 |
-
|
9 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
-
'method' => 'post',
|
11 |
-
'enctype' => 'multipart/form-data'
|
12 |
-
)
|
13 |
-
);
|
14 |
-
|
15 |
-
$form->setUseContainer(true);
|
16 |
-
$this->setForm($form);
|
17 |
-
return parent::_prepareForm();
|
18 |
-
}
|
19 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit/Tab/Form.php
CHANGED
@@ -1,247 +1,131 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
-
|
4 |
-
protected function _prepareForm() {
|
5 |
-
$form = new Varien_Data_Form();
|
6 |
-
$this->setForm($form);
|
7 |
-
$fieldset = $form->addFieldset('sticker_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
-
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
-
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('sticker/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
'
|
14 |
-
'
|
15 |
-
|
16 |
-
|
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 |
-
|
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 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
'value' => 'ISSUECOUPON',
|
132 |
-
'label' => Mage::helper('qixol')->__('Issue coupon'),
|
133 |
-
),
|
134 |
-
array(
|
135 |
-
'value' => 'ISSUEPOINTS',
|
136 |
-
'label' => Mage::helper('qixol')->__('Issue points'),
|
137 |
-
),
|
138 |
-
array(
|
139 |
-
'value' => 'BASKETREDUCTION',
|
140 |
-
'label' => Mage::helper('qixol')->__('Backet reduction'),
|
141 |
-
),
|
142 |
-
array(
|
143 |
-
'value' => 'DELIVERYREDUCTION',
|
144 |
-
'label' => Mage::helper('qixol')->__('Delivery reduction'),
|
145 |
-
),
|
146 |
-
/*array(
|
147 |
-
'value' => 8,
|
148 |
-
'label' => Mage::helper('qixol')->__('Multiple promos'),
|
149 |
-
),*/
|
150 |
-
array(
|
151 |
-
'value' => 'PRODUCTSREDUCTION',
|
152 |
-
'label' => Mage::helper('qixol')->__('Product reduction'),
|
153 |
-
),
|
154 |
-
),
|
155 |
-
));
|
156 |
-
|
157 |
-
$fieldset->addField('unique_banner_group', 'text', array(
|
158 |
-
'label' => Mage::helper('qixol')->__('Unique Promotion reference'),
|
159 |
-
'name' => 'unique_banner_group',
|
160 |
-
));
|
161 |
-
|
162 |
-
/*if ($version == '1.4' || $version == '1.5') {
|
163 |
-
$fieldset->addField('banner_content', 'editor', array(
|
164 |
-
'name' => 'banner_content',
|
165 |
-
'label' => Mage::helper('qixol')->__('Content'),
|
166 |
-
'title' => Mage::helper('qixol')->__('Content'),
|
167 |
-
'style' => 'width:600px; height:250px;',
|
168 |
-
'config' => Mage::getSingleton('banner/wysiwyg_config')->getConfig(),
|
169 |
-
'wysiwyg' => true,
|
170 |
-
'required' => false,
|
171 |
-
));
|
172 |
-
} else {
|
173 |
-
$fieldset->addField('banner_content', 'editor', array(
|
174 |
-
'name' => 'banner_content',
|
175 |
-
'label' => Mage::helper('cms')->__('Content'),
|
176 |
-
'title' => Mage::helper('cms')->__('Content'),
|
177 |
-
'style' => 'width:600px; height:250px;',
|
178 |
-
'wysiwyg' => false,
|
179 |
-
'required' => false,
|
180 |
-
));
|
181 |
-
}*/
|
182 |
-
|
183 |
-
$fieldset->addField('sort_order', 'text', array(
|
184 |
-
'label' => Mage::helper('qixol')->__('Sort Order'),
|
185 |
-
'name' => 'sort_order',
|
186 |
-
));
|
187 |
-
|
188 |
-
|
189 |
-
$field_last=$fieldset->addField('status', 'select', array(
|
190 |
-
'label' => Mage::helper('qixol')->__('Status'),
|
191 |
-
'class' => 'required-entry',
|
192 |
-
'name' => 'status',
|
193 |
-
'values' => array(
|
194 |
-
array(
|
195 |
-
'value' => 1,
|
196 |
-
'label' => Mage::helper('qixol')->__('Enabled'),
|
197 |
-
),
|
198 |
-
array(
|
199 |
-
'value' => 0,
|
200 |
-
'label' => Mage::helper('qixol')->__('Disabled'),
|
201 |
-
),
|
202 |
-
),
|
203 |
-
));
|
204 |
-
|
205 |
-
$field_last->setAfterElementHtml('<script>
|
206 |
-
//< ![C
|
207 |
-
function on_change_default_banner_group(){
|
208 |
-
if ($(\'use_default_banner_group\')[$(\'use_default_banner_group\').selectedIndex].value==\'1\'){
|
209 |
-
$(\'unique_banner_group\').setValue("");
|
210 |
-
$(\'unique_banner_group\').disable();
|
211 |
-
$(\'default_banner_group\').enable();
|
212 |
-
}else {
|
213 |
-
$(\'unique_banner_group\').enable();
|
214 |
-
$(\'default_banner_group\').selectedIndex=0;
|
215 |
-
$(\'default_banner_group\').disable();
|
216 |
-
}
|
217 |
-
|
218 |
-
}
|
219 |
-
if ($(\'use_default_banner_group\')[$(\'use_default_banner_group\').selectedIndex].value==\'1\'){
|
220 |
-
$(\'unique_banner_group\').disable();
|
221 |
-
}else {
|
222 |
-
$(\'default_banner_group\').selectedIndex=0;
|
223 |
-
$(\'default_banner_group\').disable();
|
224 |
-
}
|
225 |
-
|
226 |
-
|
227 |
-
document.observe("dom:loaded", function() {
|
228 |
-
|
229 |
-
$("use_default_banner_group").observe("change",function(e){
|
230 |
-
on_change_default_banner_group();
|
231 |
-
});
|
232 |
-
});
|
233 |
-
|
234 |
-
|
235 |
-
//]]>
|
236 |
-
</script>');
|
237 |
-
|
238 |
-
if (Mage::getSingleton('adminhtml/session')->getStickerData()) {
|
239 |
-
$form->setValues(Mage::getSingleton('adminhtml/session')->getStickerData());
|
240 |
-
Mage::getSingleton('adminhtml/session')->setStickerData(null);
|
241 |
-
} elseif (Mage::registry('sticker_data')) {
|
242 |
-
$form->setValues(Mage::registry('sticker_data')->getData());
|
243 |
-
}
|
244 |
-
return parent::_prepareForm();
|
245 |
-
}
|
246 |
-
|
247 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$form = new Varien_Data_Form();
|
6 |
+
$this->setForm($form);
|
7 |
+
$fieldset = $form->addFieldset('sticker_form', array('legend' => Mage::helper('qixol')->__('Item information')));
|
8 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
9 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('sticker/wysiwyg_config')->getConfig()" : "'class'=>''");
|
10 |
+
|
11 |
+
$fieldset->addField('filename', 'image', array(
|
12 |
+
'label' => Mage::helper('qixol')->__('Upload and use Image'),
|
13 |
+
'required' => true,
|
14 |
+
'name' => 'filename',
|
15 |
+
));
|
16 |
+
|
17 |
+
$fieldset->addField('is_default_for_type', 'select', array(
|
18 |
+
'label' => Mage::helper('qixol')->__('Default for Promotion Type?'),
|
19 |
+
'class' => 'required-entry',
|
20 |
+
'name' => 'is_default_for_type',
|
21 |
+
'values' => array(
|
22 |
+
array(
|
23 |
+
'value' => 1,
|
24 |
+
'label' => Mage::helper('qixol')->__('Yes'),
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'value' => 0,
|
28 |
+
'label' => Mage::helper('qixol')->__('No'),
|
29 |
+
),
|
30 |
+
),
|
31 |
+
));
|
32 |
+
|
33 |
+
$fieldset->addField('promo_type_name', 'select', array(
|
34 |
+
'label' => Mage::helper('qixol')->__('Promotion Type'),
|
35 |
+
'class' => 'required-entry',
|
36 |
+
'required' => false,
|
37 |
+
'name' => 'promo_type_name',
|
38 |
+
'values' => array(
|
39 |
+
array(
|
40 |
+
'value' => '',
|
41 |
+
'label' => Mage::helper('qixol')->__('Not defined'),
|
42 |
+
),
|
43 |
+
array(
|
44 |
+
'value' => 'BOGOF',
|
45 |
+
'label' => Mage::helper('qixol')->__('Buy one get one free'),
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'value' => 'BOGOR',
|
49 |
+
'label' => Mage::helper('qixol')->__('Buy one get one reduced'),
|
50 |
+
),
|
51 |
+
array(
|
52 |
+
'value' => 'BUNDLE',
|
53 |
+
'label' => Mage::helper('qixol')->__('Bundle'),
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'value' => 'DEAL',
|
57 |
+
'label' => Mage::helper('qixol')->__('Deal'),
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'value' => 'FREEPRODUCT',
|
61 |
+
'label' => Mage::helper('qixol')->__('Free product'),
|
62 |
+
),
|
63 |
+
array(
|
64 |
+
'value' => 'ISSUECOUPON',
|
65 |
+
'label' => Mage::helper('qixol')->__('Issue coupon'),
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'value' => 'ISSUEPOINTS',
|
69 |
+
'label' => Mage::helper('qixol')->__('Issue points'),
|
70 |
+
),
|
71 |
+
array(
|
72 |
+
'value' => 'BASKETREDUCTION',
|
73 |
+
'label' => Mage::helper('qixol')->__('Backet reduction'),
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'value' => 'DELIVERYREDUCTION',
|
77 |
+
'label' => Mage::helper('qixol')->__('Delivery reduction'),
|
78 |
+
),
|
79 |
+
/*array(
|
80 |
+
'value' => 8,
|
81 |
+
'label' => Mage::helper('qixol')->__('Multiple promos'),
|
82 |
+
),*/
|
83 |
+
array(
|
84 |
+
'value' => 'PRODUCTSREDUCTION',
|
85 |
+
'label' => Mage::helper('qixol')->__('Product reduction'),
|
86 |
+
),
|
87 |
+
),
|
88 |
+
));
|
89 |
+
|
90 |
+
$field_last = $fieldset->addField('promo_reference', 'text', array(
|
91 |
+
'label' => Mage::helper('qixol')->__('Promotion reference'),
|
92 |
+
'name' => 'promo_reference',
|
93 |
+
));
|
94 |
+
|
95 |
+
$field_last->setAfterElementHtml('<script>
|
96 |
+
//< ![C
|
97 |
+
function on_change_is_default_for_type(){
|
98 |
+
if ($(\'is_default_for_type\')[$(\'is_default_for_type\').selectedIndex].value==\'1\'){
|
99 |
+
$(\'promo_reference\').setValue("");
|
100 |
+
$(\'promo_reference\').disable();
|
101 |
+
$(\'promo_type_name\').enable();
|
102 |
+
}else {
|
103 |
+
$(\'promo_reference\').enable();
|
104 |
+
$(\'promo_type_name\').selectedIndex=0;
|
105 |
+
$(\'promo_type_name\').disable();
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
document.observe("dom:loaded", function() {
|
111 |
+
|
112 |
+
$("is_default_for_type").observe("change",function(e){
|
113 |
+
on_change_is_default_for_type();
|
114 |
+
});
|
115 |
+
on_change_is_default_for_type();
|
116 |
+
});
|
117 |
+
|
118 |
+
|
119 |
+
//]]>
|
120 |
+
</script>');
|
121 |
+
|
122 |
+
if (Mage::getSingleton('adminhtml/session')->getStickerData()) {
|
123 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getStickerData());
|
124 |
+
Mage::getSingleton('adminhtml/session')->setStickerData(null);
|
125 |
+
} elseif (Mage::registry('sticker_data')) {
|
126 |
+
$form->setValues(Mage::registry('sticker_data')->getData());
|
127 |
+
}
|
128 |
+
return parent::_prepareForm();
|
129 |
+
}
|
130 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Edit/Tabs.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('qixol_tabs');
|
7 |
-
$this->setDestElementId('edit_form');
|
8 |
-
$this->setTitle(Mage::helper('qixol')->__('Item Information'));
|
9 |
-
}
|
10 |
-
|
11 |
-
protected function _beforeToHtml() {
|
12 |
-
$this->addTab('form_section', array(
|
13 |
-
'label' => Mage::helper('qixol')->__('Sticker Information'),
|
14 |
-
'alt' => Mage::helper('qixol')->__('Sticker information'),
|
15 |
-
'content' => $this->getLayout()->createBlock('qixol/adminhtml_sticker_edit_tab_form')->toHtml(),
|
16 |
-
));
|
17 |
-
return parent::_beforeToHtml();
|
18 |
-
}
|
19 |
-
|
20 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Sticker_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Item Information'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('form_section', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Sticker Information'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Sticker information'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_sticker_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
return parent::_beforeToHtml();
|
18 |
+
}
|
19 |
+
|
20 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Sticker/Grid.php
CHANGED
@@ -1,160 +1,132 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Sticker_Grid extends Holbi_Qixol_Block_Adminhtml_Widget_Grid {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('stickerGrid');
|
7 |
-
$this->setDefaultSort('sticker_id');
|
8 |
-
$this->setDefaultDir('ASC');
|
9 |
-
$this->setSaveParametersInSession(true);
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareCollection() {
|
13 |
-
$collection = Mage::getModel('qixol/sticker')->getCollection();
|
14 |
-
$this->setCollection($collection);
|
15 |
-
return parent::_prepareCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _prepareColumns() {
|
19 |
-
$this->addColumn('sticker_id', array(
|
20 |
-
'header' => Mage::helper('qixol')->__('ID'),
|
21 |
-
'align' => 'center',
|
22 |
-
'width' => '30px',
|
23 |
-
'index' => 'sticker_id',
|
24 |
-
));
|
25 |
-
|
26 |
-
$this->addColumn('filename', array(
|
27 |
-
'header' => Mage::helper('qixol')->__('Image'),
|
28 |
-
'align' => 'center',
|
29 |
-
'index' => 'filename',
|
30 |
-
'type' => 'sticker',
|
31 |
-
'escape' => true,
|
32 |
-
'sortable' => false,
|
33 |
-
'width' => '150px',
|
34 |
-
));
|
35 |
-
|
36 |
-
$this->addColumn('
|
37 |
-
'header' => Mage::helper('qixol')->__('
|
38 |
-
'width' => '250px',
|
39 |
-
'index' => '
|
40 |
-
));
|
41 |
-
|
42 |
-
$this->addColumn('
|
43 |
-
'header' => Mage::helper('qixol')->__('
|
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 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
$this->
|
130 |
-
|
131 |
-
|
132 |
-
'label' => Mage::helper('qixol')->__('Delete'),
|
133 |
-
'url' => $this->getUrl('*/*/massDelete'),
|
134 |
-
'confirm' => Mage::helper('qixol')->__('Are you sure?')
|
135 |
-
));
|
136 |
-
|
137 |
-
$statuses = Mage::getSingleton('qixol/status')->getOptionArray();
|
138 |
-
|
139 |
-
array_unshift($statuses, array('label' => '', 'value' => ''));
|
140 |
-
$this->getMassactionBlock()->addItem('status', array(
|
141 |
-
'label' => Mage::helper('qixol')->__('Change status'),
|
142 |
-
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
143 |
-
'additional' => array(
|
144 |
-
'visibility' => array(
|
145 |
-
'name' => 'status',
|
146 |
-
'type' => 'select',
|
147 |
-
'class' => 'required-entry',
|
148 |
-
'label' => Mage::helper('qixol')->__('Status'),
|
149 |
-
'values' => $statuses
|
150 |
-
)
|
151 |
-
)
|
152 |
-
));
|
153 |
-
return $this;
|
154 |
-
}
|
155 |
-
|
156 |
-
public function getRowUrl($row) {
|
157 |
-
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
158 |
-
}
|
159 |
-
|
160 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Sticker_Grid extends Holbi_Qixol_Block_Adminhtml_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('stickerGrid');
|
7 |
+
$this->setDefaultSort('sticker_id');
|
8 |
+
$this->setDefaultDir('ASC');
|
9 |
+
$this->setSaveParametersInSession(true);
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareCollection() {
|
13 |
+
$collection = Mage::getModel('qixol/sticker')->getCollection();
|
14 |
+
$this->setCollection($collection);
|
15 |
+
return parent::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
$this->addColumn('sticker_id', array(
|
20 |
+
'header' => Mage::helper('qixol')->__('ID'),
|
21 |
+
'align' => 'center',
|
22 |
+
'width' => '30px',
|
23 |
+
'index' => 'sticker_id',
|
24 |
+
));
|
25 |
+
|
26 |
+
$this->addColumn('filename', array(
|
27 |
+
'header' => Mage::helper('qixol')->__('Image'),
|
28 |
+
'align' => 'center',
|
29 |
+
'index' => 'filename',
|
30 |
+
'type' => 'sticker',
|
31 |
+
'escape' => true,
|
32 |
+
'sortable' => false,
|
33 |
+
'width' => '150px',
|
34 |
+
));
|
35 |
+
|
36 |
+
$this->addColumn('promo_reference', array(
|
37 |
+
'header' => Mage::helper('qixol')->__('Promotion reference'),
|
38 |
+
'width' => '250px',
|
39 |
+
'index' => 'promo_reference',
|
40 |
+
));
|
41 |
+
|
42 |
+
$this->addColumn('promo_type_name', array(
|
43 |
+
'header' => Mage::helper('qixol')->__('Promotion type name'),
|
44 |
+
'width' => '100px',
|
45 |
+
'index' => 'promo_type_name',
|
46 |
+
'type' => 'options',
|
47 |
+
'options' => array(
|
48 |
+
'' => Mage::helper('qixol')->__(''),
|
49 |
+
'BOGOF' => Mage::helper('qixol')->__('Buy one get one free'),
|
50 |
+
'BOGOR' => Mage::helper('qixol')->__('Buy one get one reduced'),
|
51 |
+
'BUNDLE' => Mage::helper('qixol')->__('Bundle'),
|
52 |
+
'DEAL' => Mage::helper('qixol')->__('Deal'),
|
53 |
+
'FREEPRODUCT' => Mage::helper('qixol')->__('Free product'),
|
54 |
+
'ISSUECOUPON' => Mage::helper('qixol')->__('Issue coupon'),
|
55 |
+
|
56 |
+
'ISSUEPOINTS' => Mage::helper('qixol')->__('Issue points'),
|
57 |
+
'BASKETREDUCTION' => Mage::helper('qixol')->__('Basket reduction'),
|
58 |
+
'DELIVERYREDUCTION' => Mage::helper('qixol')->__('Delivery coupon'),
|
59 |
+
|
60 |
+
/*7 => 'Issue points',
|
61 |
+
8 => 'Multiple promos',*/
|
62 |
+
'PRODUCTSREDUCTION' => Mage::helper('qixol')->__('Product reduction'),
|
63 |
+
),
|
64 |
+
));
|
65 |
+
|
66 |
+
$this->addColumn('is_default_for_type', array(
|
67 |
+
'header' => Mage::helper('qixol')->__('Default for promotion type'),
|
68 |
+
'width' => '100px',
|
69 |
+
'index' => 'is_default_for_type',
|
70 |
+
'type' => 'options',
|
71 |
+
'options' => array(
|
72 |
+
0 => Mage::helper('qixol')->__('No'),
|
73 |
+
1 => Mage::helper('qixol')->__('Yes'),
|
74 |
+
),
|
75 |
+
));
|
76 |
+
|
77 |
+
$this->addColumn('action',
|
78 |
+
array(
|
79 |
+
'header' => Mage::helper('qixol')->__('Action'),
|
80 |
+
'width' => '80',
|
81 |
+
'type' => 'action',
|
82 |
+
'getter' => 'getId',
|
83 |
+
'actions' => array(
|
84 |
+
array(
|
85 |
+
'caption' => Mage::helper('qixol')->__('Edit'),
|
86 |
+
'url' => array('base' => '*/*/edit'),
|
87 |
+
'field' => 'id'
|
88 |
+
)
|
89 |
+
),
|
90 |
+
'filter' => false,
|
91 |
+
'sortable' => false,
|
92 |
+
'index' => 'stores',
|
93 |
+
'is_system' => true,
|
94 |
+
));
|
95 |
+
|
96 |
+
return parent::_prepareColumns();
|
97 |
+
}
|
98 |
+
|
99 |
+
protected function _prepareMassaction() {
|
100 |
+
$this->setMassactionIdField('sticker_id');
|
101 |
+
$this->getMassactionBlock()->setFormFieldName('sticker');
|
102 |
+
|
103 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
104 |
+
'label' => Mage::helper('qixol')->__('Delete'),
|
105 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
106 |
+
'confirm' => Mage::helper('qixol')->__('Are you sure?')
|
107 |
+
));
|
108 |
+
|
109 |
+
$statuses = Mage::getSingleton('qixol/status')->getOptionArray();
|
110 |
+
|
111 |
+
array_unshift($statuses, array('label' => '', 'value' => ''));
|
112 |
+
$this->getMassactionBlock()->addItem('status', array(
|
113 |
+
'label' => Mage::helper('qixol')->__('Change status'),
|
114 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
115 |
+
'additional' => array(
|
116 |
+
'visibility' => array(
|
117 |
+
'name' => 'status',
|
118 |
+
'type' => 'select',
|
119 |
+
'class' => 'required-entry',
|
120 |
+
'label' => Mage::helper('qixol')->__('Status'),
|
121 |
+
'values' => $statuses
|
122 |
+
)
|
123 |
+
)
|
124 |
+
));
|
125 |
+
return $this;
|
126 |
+
}
|
127 |
+
|
128 |
+
public function getRowUrl($row) {
|
129 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
130 |
+
}
|
131 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap.php
CHANGED
@@ -4,8 +4,8 @@ class Holbi_Qixol_Block_Adminhtml_Storesmap extends Mage_Adminhtml_Block_Widget_
|
|
4 |
public function __construct() {
|
5 |
$this->_controller = 'adminhtml_storesmap';
|
6 |
$this->_blockGroup = 'qixol';
|
7 |
-
$this->_headerText = Mage::helper('qixol')->__('
|
8 |
-
$this->_addButtonLabel = Mage::helper('qixol')->__('Add
|
9 |
parent::__construct();
|
10 |
}
|
11 |
}
|
4 |
public function __construct() {
|
5 |
$this->_controller = 'adminhtml_storesmap';
|
6 |
$this->_blockGroup = 'qixol';
|
7 |
+
$this->_headerText = Mage::helper('qixol')->__('Store Integration Codes');
|
8 |
+
$this->_addButtonLabel = Mage::helper('qixol')->__('Add Store Integration Code');
|
9 |
parent::__construct();
|
10 |
}
|
11 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'qixol';
|
9 |
-
$this->_controller = 'adminhtml_storesmap';
|
10 |
-
|
11 |
-
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
-
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
-
|
14 |
-
$this->_addButton('saveandcontinue', array(
|
15 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
-
'onclick' => 'saveAndContinueEdit()',
|
17 |
-
'class' => 'save',
|
18 |
-
), -100);
|
19 |
-
|
20 |
-
$this->_formScripts[] = "
|
21 |
-
|
22 |
-
function saveAndContinueEdit(){
|
23 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
-
}
|
25 |
-
|
26 |
-
";
|
27 |
-
}
|
28 |
-
|
29 |
-
public function getHeaderText() {
|
30 |
-
if (Mage::registry('storesmap_data') && Mage::registry('storesmap_data')->getId()) {
|
31 |
-
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('storesmap_data')->getTitle()));
|
32 |
-
} else {
|
33 |
-
return Mage::helper('qixol')->__('Add Item');
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'qixol';
|
9 |
+
$this->_controller = 'adminhtml_storesmap';
|
10 |
+
|
11 |
+
$this->_updateButton('save', 'label', Mage::helper('qixol')->__('Save Item'));
|
12 |
+
$this->_updateButton('delete', 'label', Mage::helper('qixol')->__('Delete Item'));
|
13 |
+
|
14 |
+
$this->_addButton('saveandcontinue', array(
|
15 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
16 |
+
'onclick' => 'saveAndContinueEdit()',
|
17 |
+
'class' => 'save',
|
18 |
+
), -100);
|
19 |
+
|
20 |
+
$this->_formScripts[] = "
|
21 |
+
|
22 |
+
function saveAndContinueEdit(){
|
23 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
24 |
+
}
|
25 |
+
|
26 |
+
";
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getHeaderText() {
|
30 |
+
if (Mage::registry('storesmap_data') && Mage::registry('storesmap_data')->getId()) {
|
31 |
+
return Mage::helper('qixol')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('storesmap_data')->getTitle()));
|
32 |
+
} else {
|
33 |
+
return Mage::helper('qixol')->__('Add Item');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit/Form.php
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
'id' => 'edit_form',
|
8 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
-
'method' => 'post',
|
10 |
-
)
|
11 |
-
);
|
12 |
-
|
13 |
-
$form->setUseContainer(true);
|
14 |
-
$this->setForm($form);
|
15 |
-
return parent::_prepareForm();
|
16 |
-
}
|
17 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
+
'method' => 'post',
|
10 |
+
)
|
11 |
+
);
|
12 |
+
|
13 |
+
$form->setUseContainer(true);
|
14 |
+
$this->setForm($form);
|
15 |
+
return parent::_prepareForm();
|
16 |
+
}
|
17 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit/Tab/Form.php
CHANGED
@@ -1,66 +1,133 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
-
|
4 |
-
protected function _prepareForm() {
|
5 |
-
$hlp=Mage::helper('qixol');
|
6 |
-
$form = new Varien_Data_Form();
|
7 |
-
$this->setForm($form);
|
8 |
-
$fieldset = $form->addFieldset('storesmap_form', array('legend' => $hlp->__('Item information')));
|
9 |
-
//$version = substr(Mage::getVersion(), 0, 3);
|
10 |
-
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('quxol/wysiwyg_config')->getConfig()" : "'class'=>''");
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
$store_name_array_list=Array();
|
15 |
-
$list_map_names_exists=array();
|
16 |
-
|
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 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
if (
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
3 |
+
|
4 |
+
protected function _prepareForm() {
|
5 |
+
$hlp=Mage::helper('qixol');
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('storesmap_form', array('legend' => $hlp->__('Item information')));
|
9 |
+
//$version = substr(Mage::getVersion(), 0, 3);
|
10 |
+
//$config = (($version == '1.4' || $version == '1.5') ? "'config' => Mage::getSingleton('quxol/wysiwyg_config')->getConfig()" : "'class'=>''");
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
$store_name_array_list=Array();
|
15 |
+
$list_map_names_exists=array();
|
16 |
+
|
17 |
+
foreach ($list_map_names as $list_map)
|
18 |
+
{
|
19 |
+
$list_map_names_exists[$list_map->getWebsite()][$list_map->getStoreGroup()][$list_map->getStoreName()] = $list_map->getStoreName();
|
20 |
+
}
|
21 |
+
|
22 |
+
$dropDownList = array();
|
23 |
+
|
24 |
+
foreach (Mage::app()->getWebsites() as $website)
|
25 |
+
{
|
26 |
+
$storeGroups = array();
|
27 |
+
|
28 |
+
foreach ($website->getGroups() as $group)
|
29 |
+
{
|
30 |
+
$stores = $group->getStores();
|
31 |
+
$storesArray = array();
|
32 |
+
foreach ($stores as $store)
|
33 |
+
{
|
34 |
+
$storesArray[] = array(
|
35 |
+
'value' => $website->getName() . '::' . $group->getName() . '::' . $store->getName(),
|
36 |
+
'label' => $store->getName()
|
37 |
+
);
|
38 |
+
/*
|
39 |
+
$store_name_array_list[$website->getName()][$group->getName()][$store->getName()] = $store->getName();
|
40 |
+
if (isset($list_map_names_exists[$website->getName()][$group->getName()][$store->getName()]))
|
41 |
+
{
|
42 |
+
unset($store_name_array_list[$website->getName()][$group->getName()][$store->getName()]);
|
43 |
+
}
|
44 |
+
*/
|
45 |
+
}
|
46 |
+
$storeGroups[] = array(
|
47 |
+
'label' => $group->getName(),
|
48 |
+
'value' => $storesArray
|
49 |
+
);
|
50 |
+
}
|
51 |
+
$dropDownList[] = array(
|
52 |
+
'label' => $website->getName(),
|
53 |
+
'value' => $storeGroups
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
// if (count($list_map_names_exists))
|
58 |
+
// {
|
59 |
+
// foreach ($list_map_names_exists as $exists_old_code)
|
60 |
+
// {
|
61 |
+
// $store_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
62 |
+
// }
|
63 |
+
// }
|
64 |
+
|
65 |
+
$fieldset->addField('store_dropdown', 'select', array(
|
66 |
+
'label' => Mage::helper('qixol')->__('Store Name'),
|
67 |
+
'class' => 'required-entry',
|
68 |
+
'required' => true,
|
69 |
+
'name' => 'store_dropdown',
|
70 |
+
'values' => $dropDownList
|
71 |
+
));
|
72 |
+
|
73 |
+
$fieldset->addField('integration_code', 'text', array(
|
74 |
+
'label' => Mage::helper('qixol')->__('Integration Code'),
|
75 |
+
'class' => 'required-entry',
|
76 |
+
'required' => true,
|
77 |
+
'name' => 'integration_code',
|
78 |
+
'after_element_html' => Mage::helper('qixol')->__('Code to be sent to Promo.'),
|
79 |
+
));
|
80 |
+
|
81 |
+
$fieldset->addField('website', 'hidden', array(
|
82 |
+
'name' => 'website'
|
83 |
+
));
|
84 |
+
|
85 |
+
$fieldset->addField('store_group', 'hidden', array(
|
86 |
+
'name' => 'store_group'
|
87 |
+
));
|
88 |
+
|
89 |
+
$lastField = $fieldset->addField('store_name', 'hidden', array(
|
90 |
+
'name' => 'store_name'
|
91 |
+
));
|
92 |
+
|
93 |
+
$lastField->setAfterElementHtml($this->prepareScript());
|
94 |
+
|
95 |
+
if (Mage::getSingleton('adminhtml/session')->getStoresmapData()) {
|
96 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getStoresmapData());
|
97 |
+
Mage::getSingleton('adminhtml/session')->getStoresmapData(null);
|
98 |
+
} elseif (Mage::registry('storesmap_data')) {
|
99 |
+
$form->setValues(Mage::registry('storesmap_data')->getData());
|
100 |
+
}
|
101 |
+
return parent::_prepareForm();
|
102 |
+
}
|
103 |
+
|
104 |
+
private function prepareScript()
|
105 |
+
{
|
106 |
+
return '<script>
|
107 |
+
//< ![C
|
108 |
+
function store_dropdown_onChange(){
|
109 |
+
setDataFields();
|
110 |
+
}
|
111 |
+
|
112 |
+
function setDataFields() {
|
113 |
+
var storeDetails = $("store_dropdown").value.split(\'::\');
|
114 |
+
$("website").value = storeDetails[0];
|
115 |
+
$("store_group").value = storeDetails[1];
|
116 |
+
$("store_name").value = storeDetails[2];
|
117 |
+
}
|
118 |
+
|
119 |
+
document.observe("dom:loaded", function() {
|
120 |
+
|
121 |
+
$("store_dropdown").observe("change",function(e){
|
122 |
+
store_dropdown_onChange();
|
123 |
+
});
|
124 |
+
|
125 |
+
setDataFields();
|
126 |
+
|
127 |
+
});
|
128 |
+
|
129 |
+
|
130 |
+
//]]>
|
131 |
+
</script>';
|
132 |
+
}
|
133 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Edit/Tabs.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('qixol_tabs');
|
7 |
-
$this->setDestElementId('edit_form');
|
8 |
-
$this->setTitle(Mage::helper('qixol')->__('
|
9 |
-
}
|
10 |
-
|
11 |
-
protected function _beforeToHtml() {
|
12 |
-
$this->addTab('form_section', array(
|
13 |
-
'label' => Mage::helper('qixol')->__('
|
14 |
-
'alt' => Mage::helper('qixol')->__('
|
15 |
-
'content' => $this->getLayout()->createBlock('qixol/adminhtml_storesmap_edit_tab_form')->toHtml(),
|
16 |
-
));
|
17 |
-
return parent::_beforeToHtml();
|
18 |
-
}
|
19 |
-
|
20 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Storesmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('qixol_tabs');
|
7 |
+
$this->setDestElementId('edit_form');
|
8 |
+
$this->setTitle(Mage::helper('qixol')->__('Stores'));
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _beforeToHtml() {
|
12 |
+
$this->addTab('form_section', array(
|
13 |
+
'label' => Mage::helper('qixol')->__('Integration Codes'),
|
14 |
+
'alt' => Mage::helper('qixol')->__('Integration Codes'),
|
15 |
+
'content' => $this->getLayout()->createBlock('qixol/adminhtml_storesmap_edit_tab_form')->toHtml(),
|
16 |
+
));
|
17 |
+
return parent::_beforeToHtml();
|
18 |
+
}
|
19 |
+
|
20 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Storesmap/Grid.php
CHANGED
@@ -1,97 +1,110 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Adminhtml_Storesmap_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->setId('storesmapGrid');
|
7 |
-
$this->setDefaultSort('store_name');
|
8 |
-
$this->setDefaultDir('ASC');
|
9 |
-
$this->setSaveParametersInSession(true);
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareCollection() {
|
13 |
-
$collection = Mage::getModel('qixol/storesmap')->getCollection();
|
14 |
-
$this->setCollection($collection);
|
15 |
-
return parent::_prepareCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _prepareColumns() {
|
19 |
-
$hlp = Mage::helper('qixol');
|
20 |
-
$list_map_names=Mage::getModel('qixol/storesmap')->getCollection();
|
21 |
-
|
22 |
-
$store_name_array_list=Array();
|
23 |
-
$list_map_names_exists=array();
|
24 |
-
|
25 |
-
foreach ($list_map_names as $list_map){
|
26 |
-
$list_map_names_exists[$list_map->getStoreName()]=$list_map->getStoreName();
|
27 |
-
}
|
28 |
-
|
29 |
-
|
30 |
-
foreach (Mage::app()->getWebsites() as $website) {
|
31 |
-
foreach ($website->getGroups() as $group) {
|
32 |
-
$stores = $group->getStores();
|
33 |
-
foreach ($stores as $store) {
|
34 |
-
$store_name_array_list[$store->getName()] = $store->getName();
|
35 |
-
if (isset($list_map_names_exists[$store->getName()])) unset($store_name_array_list[$store->getName()]);
|
36 |
-
}
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
if (count($list_map_names_exists)){
|
41 |
-
foreach ($list_map_names_exists as $exists_old_code)
|
42 |
-
$store_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
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 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Adminhtml_Storesmap_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
$this->setId('storesmapGrid');
|
7 |
+
$this->setDefaultSort('store_name');
|
8 |
+
$this->setDefaultDir('ASC');
|
9 |
+
$this->setSaveParametersInSession(true);
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareCollection() {
|
13 |
+
$collection = Mage::getModel('qixol/storesmap')->getCollection();
|
14 |
+
$this->setCollection($collection);
|
15 |
+
return parent::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns() {
|
19 |
+
$hlp = Mage::helper('qixol');
|
20 |
+
$list_map_names=Mage::getModel('qixol/storesmap')->getCollection();
|
21 |
+
|
22 |
+
$store_name_array_list=Array();
|
23 |
+
$list_map_names_exists=array();
|
24 |
+
|
25 |
+
foreach ($list_map_names as $list_map){
|
26 |
+
$list_map_names_exists[$list_map->getStoreName()]=$list_map->getStoreName();
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
31 |
+
foreach ($website->getGroups() as $group) {
|
32 |
+
$stores = $group->getStores();
|
33 |
+
foreach ($stores as $store) {
|
34 |
+
$store_name_array_list[$store->getName()] = $store->getName();
|
35 |
+
if (isset($list_map_names_exists[$store->getName()])) unset($store_name_array_list[$store->getName()]);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
if (count($list_map_names_exists)){
|
41 |
+
foreach ($list_map_names_exists as $exists_old_code)
|
42 |
+
$store_name_array_list[$exists_old_code] = $hlp->__($exists_old_code);
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
$this->addColumn('website', array(
|
48 |
+
'header' => $hlp->__('Website'),
|
49 |
+
'align' => 'left',
|
50 |
+
'width' => '250px',
|
51 |
+
'index' => 'website'
|
52 |
+
));
|
53 |
+
|
54 |
+
$this->addColumn('store_group', array(
|
55 |
+
'header' => $hlp->__('Store Group'),
|
56 |
+
'align' => 'left',
|
57 |
+
'width' => '250px',
|
58 |
+
'index' => 'store_group'
|
59 |
+
));
|
60 |
+
|
61 |
+
$this->addColumn('store_name', array(
|
62 |
+
'header' => $hlp->__('Store Name'),
|
63 |
+
'type' => 'stores',
|
64 |
+
'align' => 'left',
|
65 |
+
'width' => '250px',
|
66 |
+
'index' => 'store_name',
|
67 |
+
'type' => 'options',
|
68 |
+
'options' => $store_name_array_list
|
69 |
+
));
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
$this->addColumn('integration_code', array(
|
74 |
+
'header' => $hlp->__('Integration Code'),
|
75 |
+
'width' => '350px',
|
76 |
+
'index' => 'integration_code'
|
77 |
+
));
|
78 |
+
|
79 |
+
$this->addColumn('action',
|
80 |
+
array(
|
81 |
+
'header' => $hlp->__('Action'),
|
82 |
+
'width' => '80',
|
83 |
+
'type' => 'action',
|
84 |
+
'getter' => 'getId',
|
85 |
+
'actions' => array(
|
86 |
+
array(
|
87 |
+
'caption' => $hlp->__('Edit'),
|
88 |
+
'url' => array('base' => '*/*/edit'),
|
89 |
+
'field' => 'id'
|
90 |
+
),
|
91 |
+
array(
|
92 |
+
'caption' => $hlp->__('Delete'),
|
93 |
+
'url' => array('base' => '*/*/delete'),
|
94 |
+
'field' => 'id'
|
95 |
+
)
|
96 |
+
),
|
97 |
+
'filter' => false,
|
98 |
+
'sortable' => false,
|
99 |
+
'index' => 'stores',
|
100 |
+
'is_system' => true,
|
101 |
+
));
|
102 |
+
|
103 |
+
return parent::_prepareColumns();
|
104 |
+
}
|
105 |
+
|
106 |
+
public function getRowUrl($row) {
|
107 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
108 |
+
}
|
109 |
+
|
110 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column.php';
|
3 |
-
|
4 |
-
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget_Grid_Column {
|
5 |
-
|
6 |
-
protected function _getRendererByType() {
|
7 |
-
switch (strtolower($this->getType())) {
|
8 |
-
case 'banner':
|
9 |
-
$rendererClass = 'qixol/adminhtml_widget_grid_column_renderer_banner';
|
10 |
-
break;
|
11 |
-
case 'sticker':
|
12 |
-
$rendererClass = 'qixol/adminhtml_widget_grid_column_renderer_sticker';
|
13 |
-
break;
|
14 |
-
default:
|
15 |
-
$rendererClass = parent::_getRendererByType();
|
16 |
-
break;
|
17 |
-
}
|
18 |
-
return $rendererClass;
|
19 |
-
}
|
20 |
-
|
21 |
-
protected function _getFilterByType() {
|
22 |
-
switch (strtolower($this->getType())) {
|
23 |
-
case 'banner':
|
24 |
-
$filterClass = 'qixol/adminhtml_widget_grid_column_filter_banner';
|
25 |
-
break;
|
26 |
-
case 'sticker':
|
27 |
-
$filterClass = 'qixol/adminhtml_widget_grid_column_filter_banner';
|
28 |
-
break;
|
29 |
-
default:
|
30 |
-
$filterClass = parent::_getFilterByType();
|
31 |
-
break;
|
32 |
-
}
|
33 |
-
return $filterClass;
|
34 |
-
}
|
35 |
-
|
36 |
}
|
1 |
+
<?php
|
2 |
+
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column.php';
|
3 |
+
|
4 |
+
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget_Grid_Column {
|
5 |
+
|
6 |
+
protected function _getRendererByType() {
|
7 |
+
switch (strtolower($this->getType())) {
|
8 |
+
case 'banner':
|
9 |
+
$rendererClass = 'qixol/adminhtml_widget_grid_column_renderer_banner';
|
10 |
+
break;
|
11 |
+
case 'sticker':
|
12 |
+
$rendererClass = 'qixol/adminhtml_widget_grid_column_renderer_sticker';
|
13 |
+
break;
|
14 |
+
default:
|
15 |
+
$rendererClass = parent::_getRendererByType();
|
16 |
+
break;
|
17 |
+
}
|
18 |
+
return $rendererClass;
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _getFilterByType() {
|
22 |
+
switch (strtolower($this->getType())) {
|
23 |
+
case 'banner':
|
24 |
+
$filterClass = 'qixol/adminhtml_widget_grid_column_filter_banner';
|
25 |
+
break;
|
26 |
+
case 'sticker':
|
27 |
+
$filterClass = 'qixol/adminhtml_widget_grid_column_filter_banner';
|
28 |
+
break;
|
29 |
+
default:
|
30 |
+
$filterClass = parent::_getFilterByType();
|
31 |
+
break;
|
32 |
+
}
|
33 |
+
return $filterClass;
|
34 |
+
}
|
35 |
+
|
36 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column/Filter/Banner.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php';
|
4 |
-
|
5 |
-
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column_Filter_Banner extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Text {
|
6 |
-
|
7 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php';
|
4 |
+
|
5 |
+
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column_Filter_Banner extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Text {
|
6 |
+
|
7 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column/Renderer/Banner.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php';
|
4 |
-
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column_Renderer_Banner extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
5 |
-
|
6 |
-
public function __construct() {
|
7 |
-
|
8 |
-
}
|
9 |
-
|
10 |
-
public function render(Varien_Object $row) {
|
11 |
-
return $this->_getValue($row);
|
12 |
-
}
|
13 |
-
|
14 |
-
protected function _getValue(Varien_Object $row) {
|
15 |
-
$dored = false;
|
16 |
-
$out = '';
|
17 |
-
if ($getter = $this->getColumn()->getGetter()) {
|
18 |
-
$val = $row->$getter();
|
19 |
-
}
|
20 |
-
$val = $row->getData($this->getColumn()->getIndex());
|
21 |
-
if (trim($val)!=''){
|
22 |
-
$url = Mage::helper('qixol')->getImageUrl($val);
|
23 |
-
$size = Mage::helper('qixol')->getImageThumbSize($val);
|
24 |
-
$file_extis = Mage::helper('qixol')->getFileExists($val);
|
25 |
-
$popLink = "popWin('$url','image','width=800,height=600,resizable=yes,scrollbars=yes')";
|
26 |
-
if (is_array($size) && $file_extis)
|
27 |
-
$out = '<a href="javascript:;" onclick="'.$popLink.'"><img src="'.$url.'" width="'.$size['width'].'" height="'.$size['height'].'" style="border: 2px solid #CCCCCC;"/></a>';
|
28 |
-
}
|
29 |
-
return $out;
|
30 |
-
}
|
31 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php';
|
4 |
+
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column_Renderer_Banner extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
5 |
+
|
6 |
+
public function __construct() {
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
public function render(Varien_Object $row) {
|
11 |
+
return $this->_getValue($row);
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _getValue(Varien_Object $row) {
|
15 |
+
$dored = false;
|
16 |
+
$out = '';
|
17 |
+
if ($getter = $this->getColumn()->getGetter()) {
|
18 |
+
$val = $row->$getter();
|
19 |
+
}
|
20 |
+
$val = $row->getData($this->getColumn()->getIndex());
|
21 |
+
if (trim($val)!=''){
|
22 |
+
$url = Mage::helper('qixol')->getImageUrl($val);
|
23 |
+
$size = Mage::helper('qixol')->getImageThumbSize($val);
|
24 |
+
$file_extis = Mage::helper('qixol')->getFileExists($val);
|
25 |
+
$popLink = "popWin('$url','image','width=800,height=600,resizable=yes,scrollbars=yes')";
|
26 |
+
if (is_array($size) && $file_extis)
|
27 |
+
$out = '<a href="javascript:;" onclick="'.$popLink.'"><img src="'.$url.'" width="'.$size['width'].'" height="'.$size['height'].'" style="border: 2px solid #CCCCCC;"/></a>';
|
28 |
+
}
|
29 |
+
return $out;
|
30 |
+
}
|
31 |
}
|
app/code/community/Holbi/Qixol/Block/Adminhtml/Widget/Grid/Column/Renderer/Sticker.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php';
|
4 |
-
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column_Renderer_Sticker extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
5 |
-
|
6 |
-
public function __construct() {
|
7 |
-
|
8 |
-
}
|
9 |
-
|
10 |
-
public function render(Varien_Object $row) {
|
11 |
-
return $this->_getValue($row);
|
12 |
-
}
|
13 |
-
|
14 |
-
protected function _getValue(Varien_Object $row) {
|
15 |
-
$dored = false;
|
16 |
-
$out = '';
|
17 |
-
if ($getter = $this->getColumn()->getGetter()) {
|
18 |
-
$val = $row->$getter();
|
19 |
-
}
|
20 |
-
|
21 |
-
$val = $row->getData($this->getColumn()->getIndex());
|
22 |
-
if (trim($val)!=''){
|
23 |
-
$url = Mage::helper('qixol')->getImageUrl($val);
|
24 |
-
$size = Mage::helper('qixol')->getImageThumbSize($val);
|
25 |
-
$file_extis = Mage::helper('qixol')->getFileExists($val);
|
26 |
-
$popLink = "popWin('$url','image','width=800,height=600,resizable=yes,scrollbars=yes')";
|
27 |
-
if (is_array($size) && $file_extis)
|
28 |
-
$out = '<a href="javascript:;" onclick="'.$popLink.'"><img src="'.$url.'" width="'.$size['width'].'" height="'.$size['height'].'" style="border: 2px solid #CCCCCC;"/></a>';
|
29 |
-
}else {
|
30 |
-
$val = $row->getData('use_default_sticker');
|
31 |
-
if ($val!=''){
|
32 |
-
$url=Mage::getModel('qixol/sticker')->getDefaultSticker($val);
|
33 |
-
$popLink = "popWin('$url','image','width=800,height=600,resizable=yes,scrollbars=yes')";
|
34 |
-
$out = '<a href="javascript:;" onclick="'.$popLink.'"><img src="'.$url.'" width="100" style="border: 2px solid #CCCCCC;"/></a>';
|
35 |
-
}
|
36 |
-
}
|
37 |
-
return $out;
|
38 |
-
}
|
39 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php';
|
4 |
+
class Holbi_Qixol_Block_Adminhtml_Widget_Grid_Column_Renderer_Sticker extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
5 |
+
|
6 |
+
public function __construct() {
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
public function render(Varien_Object $row) {
|
11 |
+
return $this->_getValue($row);
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _getValue(Varien_Object $row) {
|
15 |
+
$dored = false;
|
16 |
+
$out = '';
|
17 |
+
if ($getter = $this->getColumn()->getGetter()) {
|
18 |
+
$val = $row->$getter();
|
19 |
+
}
|
20 |
+
|
21 |
+
$val = $row->getData($this->getColumn()->getIndex());
|
22 |
+
if (trim($val)!=''){
|
23 |
+
$url = Mage::helper('qixol')->getImageUrl($val);
|
24 |
+
$size = Mage::helper('qixol')->getImageThumbSize($val);
|
25 |
+
$file_extis = Mage::helper('qixol')->getFileExists($val);
|
26 |
+
$popLink = "popWin('$url','image','width=800,height=600,resizable=yes,scrollbars=yes')";
|
27 |
+
if (is_array($size) && $file_extis)
|
28 |
+
$out = '<a href="javascript:;" onclick="'.$popLink.'"><img src="'.$url.'" width="'.$size['width'].'" height="'.$size['height'].'" style="border: 2px solid #CCCCCC;"/></a>';
|
29 |
+
}else {
|
30 |
+
$val = $row->getData('use_default_sticker');
|
31 |
+
if ($val!=''){
|
32 |
+
$url=Mage::getModel('qixol/sticker')->getDefaultSticker($val);
|
33 |
+
$popLink = "popWin('$url','image','width=800,height=600,resizable=yes,scrollbars=yes')";
|
34 |
+
$out = '<a href="javascript:;" onclick="'.$popLink.'"><img src="'.$url.'" width="100" style="border: 2px solid #CCCCCC;"/></a>';
|
35 |
+
}
|
36 |
+
}
|
37 |
+
return $out;
|
38 |
+
}
|
39 |
}
|
app/code/community/Holbi/Qixol/Block/Banner.php
CHANGED
@@ -1,54 +1,54 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Banner extends Mage_Core_Block_Template {
|
3 |
-
|
4 |
-
public function _prepareLayout() {
|
5 |
-
return parent::_prepareLayout();
|
6 |
-
}
|
7 |
-
|
8 |
-
public function getBanner() {
|
9 |
-
if (!$this->hasData('banner')) {
|
10 |
-
$this->setData('banner', Mage::registry('banner'));
|
11 |
-
}
|
12 |
-
return $this->getData('banner');
|
13 |
-
}
|
14 |
-
|
15 |
-
public function getResizeImage($bannerPath, $groupName, $w = 0, $h = 0) {
|
16 |
-
$name = '';
|
17 |
-
$_helper = Mage::helper('qixol');
|
18 |
-
$bannerDirPath = $_helper->updateDirSepereator($bannerPath);
|
19 |
-
$baseDir = Mage::getBaseDir();
|
20 |
-
$mediaDir = Mage::getBaseDir('media');
|
21 |
-
$mediaUrl = Mage::getBaseUrl('media');
|
22 |
-
$resizeDir = $mediaDir . DS . 'custom' . DS . 'banners' . DS . 'resize' . DS;
|
23 |
-
$resizeUrl = $mediaUrl.'custom/banners/resize/';
|
24 |
-
$imageName = basename($bannerDirPath);
|
25 |
-
|
26 |
-
if (@file_exists($mediaDir . DS . $bannerDirPath)) {
|
27 |
-
$name = $mediaDir . DS . $bannerPath;
|
28 |
-
$this->checkDir($resizeDir . $groupName);
|
29 |
-
$smallImgPath = $resizeDir . $groupName . DS . $imageName;
|
30 |
-
$smallImg = $resizeUrl . $groupName .'/'. $imageName;
|
31 |
-
}
|
32 |
-
|
33 |
-
if ($name != '') {
|
34 |
-
$resizeObject = Mage::getModel('qixol/bannerresize');
|
35 |
-
$resizeObject->setImage($name);
|
36 |
-
if ($resizeObject->resizeLimitwh($w, $h, $smallImgPath) === false) {
|
37 |
-
return $resizeObject->error();
|
38 |
-
} else {
|
39 |
-
return $smallImg;
|
40 |
-
}
|
41 |
-
} else {
|
42 |
-
return '';
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
protected function checkDir($directory) {
|
47 |
-
if (!is_dir($directory)) {
|
48 |
-
umask(0);
|
49 |
-
mkdir($directory, 0777,true);
|
50 |
-
return true;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Banner extends Mage_Core_Block_Template {
|
3 |
+
|
4 |
+
public function _prepareLayout() {
|
5 |
+
return parent::_prepareLayout();
|
6 |
+
}
|
7 |
+
|
8 |
+
public function getBanner() {
|
9 |
+
if (!$this->hasData('banner')) {
|
10 |
+
$this->setData('banner', Mage::registry('banner'));
|
11 |
+
}
|
12 |
+
return $this->getData('banner');
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getResizeImage($bannerPath, $groupName, $w = 0, $h = 0) {
|
16 |
+
$name = '';
|
17 |
+
$_helper = Mage::helper('qixol');
|
18 |
+
$bannerDirPath = $_helper->updateDirSepereator($bannerPath);
|
19 |
+
$baseDir = Mage::getBaseDir();
|
20 |
+
$mediaDir = Mage::getBaseDir('media');
|
21 |
+
$mediaUrl = Mage::getBaseUrl('media');
|
22 |
+
$resizeDir = $mediaDir . DS . 'custom' . DS . 'banners' . DS . 'resize' . DS;
|
23 |
+
$resizeUrl = $mediaUrl.'custom/banners/resize/';
|
24 |
+
$imageName = basename($bannerDirPath);
|
25 |
+
|
26 |
+
if (@file_exists($mediaDir . DS . $bannerDirPath)) {
|
27 |
+
$name = $mediaDir . DS . $bannerPath;
|
28 |
+
$this->checkDir($resizeDir . $groupName);
|
29 |
+
$smallImgPath = $resizeDir . $groupName . DS . $imageName;
|
30 |
+
$smallImg = $resizeUrl . $groupName .'/'. $imageName;
|
31 |
+
}
|
32 |
+
|
33 |
+
if ($name != '') {
|
34 |
+
$resizeObject = Mage::getModel('qixol/bannerresize');
|
35 |
+
$resizeObject->setImage($name);
|
36 |
+
if ($resizeObject->resizeLimitwh($w, $h, $smallImgPath) === false) {
|
37 |
+
return $resizeObject->error();
|
38 |
+
} else {
|
39 |
+
return $smallImg;
|
40 |
+
}
|
41 |
+
} else {
|
42 |
+
return '';
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function checkDir($directory) {
|
47 |
+
if (!is_dir($directory)) {
|
48 |
+
umask(0);
|
49 |
+
mkdir($directory, 0777,true);
|
50 |
+
return true;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
}
|
app/code/community/Holbi/Qixol/Block/Sticker.php
CHANGED
@@ -1,54 +1,54 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Block_Sticker extends Mage_Core_Block_Template {
|
3 |
-
|
4 |
-
public function _prepareLayout() {
|
5 |
-
return parent::_prepareLayout();
|
6 |
-
}
|
7 |
-
|
8 |
-
public function getSticker() {
|
9 |
-
if (!$this->hasData('sticker')) {
|
10 |
-
$this->setData('sticker', Mage::registry('sticker'));
|
11 |
-
}
|
12 |
-
return $this->getData('sticker');
|
13 |
-
}
|
14 |
-
|
15 |
-
public function getResizeImage($bannerPath, $groupName, $w = 0, $h = 0) {
|
16 |
-
$name = '';
|
17 |
-
$_helper = Mage::helper('qixol');
|
18 |
-
$bannerDirPath = $_helper->updateDirSepereator($bannerPath);
|
19 |
-
$baseDir = Mage::getBaseDir();
|
20 |
-
$mediaDir = Mage::getBaseDir('media');
|
21 |
-
$mediaUrl = Mage::getBaseUrl('media');
|
22 |
-
$resizeDir = $mediaDir . DS . 'custom' . DS . 'stickers' . DS . 'resize' . DS;
|
23 |
-
$resizeUrl = $mediaUrl.'custom/stickers/resize/';
|
24 |
-
$imageName = basename($bannerDirPath);
|
25 |
-
|
26 |
-
if (@file_exists($mediaDir . DS . $bannerDirPath)) {
|
27 |
-
$name = $mediaDir . DS . $bannerPath;
|
28 |
-
$this->checkDir($resizeDir . $groupName);
|
29 |
-
$smallImgPath = $resizeDir . $groupName . DS . $imageName;
|
30 |
-
$smallImg = $resizeUrl . $groupName .'/'. $imageName;
|
31 |
-
}
|
32 |
-
|
33 |
-
if ($name != '') {
|
34 |
-
$resizeObject = Mage::getModel('qixol/stickerresize');
|
35 |
-
$resizeObject->setImage($name);
|
36 |
-
if ($resizeObject->resizeLimitwh($w, $h, $smallImgPath) === false) {
|
37 |
-
return $resizeObject->error();
|
38 |
-
} else {
|
39 |
-
return $smallImg;
|
40 |
-
}
|
41 |
-
} else {
|
42 |
-
return '';
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
protected function checkDir($directory) {
|
47 |
-
if (!is_dir($directory)) {
|
48 |
-
umask(0);
|
49 |
-
mkdir($directory, 0777,true);
|
50 |
-
return true;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Block_Sticker extends Mage_Core_Block_Template {
|
3 |
+
|
4 |
+
public function _prepareLayout() {
|
5 |
+
return parent::_prepareLayout();
|
6 |
+
}
|
7 |
+
|
8 |
+
public function getSticker() {
|
9 |
+
if (!$this->hasData('sticker')) {
|
10 |
+
$this->setData('sticker', Mage::registry('sticker'));
|
11 |
+
}
|
12 |
+
return $this->getData('sticker');
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getResizeImage($bannerPath, $groupName, $w = 0, $h = 0) {
|
16 |
+
$name = '';
|
17 |
+
$_helper = Mage::helper('qixol');
|
18 |
+
$bannerDirPath = $_helper->updateDirSepereator($bannerPath);
|
19 |
+
$baseDir = Mage::getBaseDir();
|
20 |
+
$mediaDir = Mage::getBaseDir('media');
|
21 |
+
$mediaUrl = Mage::getBaseUrl('media');
|
22 |
+
$resizeDir = $mediaDir . DS . 'custom' . DS . 'stickers' . DS . 'resize' . DS;
|
23 |
+
$resizeUrl = $mediaUrl.'custom/stickers/resize/';
|
24 |
+
$imageName = basename($bannerDirPath);
|
25 |
+
|
26 |
+
if (@file_exists($mediaDir . DS . $bannerDirPath)) {
|
27 |
+
$name = $mediaDir . DS . $bannerPath;
|
28 |
+
$this->checkDir($resizeDir . $groupName);
|
29 |
+
$smallImgPath = $resizeDir . $groupName . DS . $imageName;
|
30 |
+
$smallImg = $resizeUrl . $groupName .'/'. $imageName;
|
31 |
+
}
|
32 |
+
|
33 |
+
if ($name != '') {
|
34 |
+
$resizeObject = Mage::getModel('qixol/stickerresize');
|
35 |
+
$resizeObject->setImage($name);
|
36 |
+
if ($resizeObject->resizeLimitwh($w, $h, $smallImgPath) === false) {
|
37 |
+
return $resizeObject->error();
|
38 |
+
} else {
|
39 |
+
return $smallImg;
|
40 |
+
}
|
41 |
+
} else {
|
42 |
+
return '';
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function checkDir($directory) {
|
47 |
+
if (!is_dir($directory)) {
|
48 |
+
umask(0);
|
49 |
+
mkdir($directory, 0777,true);
|
50 |
+
return true;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
}
|
app/code/community/Holbi/Qixol/Model/Advert.php
CHANGED
@@ -3,40 +3,46 @@ class Holbi_Qixol_Model_Advert extends Mage_Core_Model_Abstract {
|
|
3 |
function __construct(){
|
4 |
|
5 |
}
|
6 |
-
|
7 |
-
$image=false;
|
8 |
-
$products_has_promotion_image=Mage::getResourceSingleton('qixol/sticker');
|
9 |
-
$product_stick_images=$products_has_promotion_image->getStickerImage($product,$type);
|
10 |
-
|
11 |
-
if (is_array($product_stick_images)&&count($product_stick_images)==1) { //if 1 sticker
|
12 |
-
$image=$product_stick_images[0]['filename'];
|
13 |
-
if (($image!==false)&&strlen($image)>5)
|
14 |
-
$image=Mage::getBaseUrl('media').$image;
|
15 |
-
return $image;
|
16 |
-
}elseif(is_array($product_stick_images)&&count($product_stick_images)>1){
|
17 |
-
foreach ($product_stick_images as $image_array){
|
18 |
-
if (($image_array['filename']!==false)&&strlen($image_array['filename'])>5){
|
19 |
-
$image[]=Mage::getBaseUrl('media').$image_array['filename'];
|
20 |
-
}
|
21 |
-
}
|
22 |
-
return $image;
|
23 |
-
}
|
24 |
-
return $image;
|
25 |
-
}
|
26 |
-
|
27 |
function getCategoryTopAdv($_productCollection){
|
28 |
//replace with promotion text
|
29 |
|
30 |
-
$text_to_return='';
|
31 |
-
|
32 |
-
$advertisment=Mage::getResourceSingleton('qixol/banner');
|
33 |
-
$adv_array
|
34 |
-
if ($adv_array!==false&&count($adv_array)){
|
35 |
-
foreach($adv_array as $advert){
|
36 |
-
if ($advert['filename']
|
37 |
-
$text_to_return.=
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
}
|
42 |
|
@@ -65,17 +71,49 @@ class Holbi_Qixol_Model_Advert extends Mage_Core_Model_Abstract {
|
|
65 |
|
66 |
$text_to_return='';
|
67 |
|
68 |
-
$products_has_promotion=Mage::getResourceSingleton('qixol/banner');
|
69 |
-
$product_data
|
70 |
-
if ($product_data!==false&&count($product_data)){
|
71 |
foreach($product_data as $advert){
|
72 |
if ($advert['filename']!=''&&strlen($advert['filename'])>5){
|
73 |
-
$text_to_return.=
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
}
|
78 |
-
return $text_to_return!=''
|
79 |
|
80 |
}
|
81 |
|
@@ -96,35 +134,58 @@ class Holbi_Qixol_Model_Advert extends Mage_Core_Model_Abstract {
|
|
96 |
return $text_to_return!=''?/*"<div><ul>".*/$text_to_return/*."</ul></div>"*/:"";
|
97 |
}
|
98 |
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
101 |
|
102 |
-
$
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
113 |
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
-
|
117 |
|
118 |
-
$products_has_promotion=Mage::getResourceSingleton('qixol/banner');
|
119 |
-
$product_data=$products_has_promotion->getAllProductTextAdv($product);
|
120 |
-
if ($product_data!==false&&count($product_data)){
|
121 |
-
//$text_to_return.="";
|
122 |
-
//$text_to_return.="";
|
123 |
-
foreach($product_data as $advert) {
|
124 |
-
$text_to_return.="<tr><td>".(trim($advert['url'])!=''?"<a href='".$advert['url']."'>":"").$advert['promotion_text'].(trim($advert['url'])!=''?"</a>":"")."</td><td style='width:100px;'>".(($advert['discountpercent']>0||$advert['discountamount']>0)?($advert['discountpercent']>0?$advert['discountpercent']."%":$advert['discountamount'])." Off":" ")."</td></tr>";
|
125 |
-
}
|
126 |
-
//$text_to_return.="";
|
127 |
-
}
|
128 |
-
return $text_to_return!=''?/*"<div><ul>".*/$text_to_return/*."</ul></div>"*/:"";
|
129 |
-
}
|
130 |
}
|
3 |
function __construct(){
|
4 |
|
5 |
}
|
6 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
function getCategoryTopAdv($_productCollection){
|
8 |
//replace with promotion text
|
9 |
|
10 |
+
$text_to_return = '';
|
11 |
+
|
12 |
+
$advertisment = Mage::getResourceSingleton('qixol/banner');
|
13 |
+
$adv_array = $advertisment->getCategoryTopAdv($_productCollection);
|
14 |
+
if ($adv_array !== false && count($adv_array)) {
|
15 |
+
foreach($adv_array as $advert) {
|
16 |
+
if (!empty($advert['filename']) && strlen($advert['filename']) > 5) {
|
17 |
+
$text_to_return .= "<div>";
|
18 |
+
if (!empty($advert['url'])) {
|
19 |
+
$text_to_return .= "<a href='";
|
20 |
+
$text_to_return .= $advert['url'];
|
21 |
+
$text_to_return .= "'>";
|
22 |
+
}
|
23 |
+
$text_to_return .= "<img title='";
|
24 |
+
$text_to_return .= $advert['promotion_text'];
|
25 |
+
$text_to_return .= "' src='";
|
26 |
+
$text_to_return .= Mage::getBaseUrl('media');
|
27 |
+
$text_to_return .= $advert['filename'];
|
28 |
+
$text_to_return .= "'>";
|
29 |
+
if (!empty($advert['url'])) {
|
30 |
+
$text_to_return .= "</a>";
|
31 |
+
}
|
32 |
+
$text_to_return .= "</div>";
|
33 |
+
} else {
|
34 |
+
$text_to_return .= "<div>";
|
35 |
+
if (!empty($advert['url'])) {
|
36 |
+
$text_to_return .= "<a href='";
|
37 |
+
$text_to_return .= $advert['url'];
|
38 |
+
$text_to_return .= "'>";
|
39 |
+
}
|
40 |
+
$text_to_return .= $advert['promotion_text'];
|
41 |
+
if (!empty($advert['url'])) {
|
42 |
+
$text_to_return .= "</a>";
|
43 |
+
}
|
44 |
+
$text_to_return .= "</div>";
|
45 |
+
}
|
46 |
}
|
47 |
}
|
48 |
|
71 |
|
72 |
$text_to_return='';
|
73 |
|
74 |
+
$products_has_promotion = Mage::getResourceSingleton('qixol/banner');
|
75 |
+
$product_data = $products_has_promotion->getProductTextAdv($product,'Top');
|
76 |
+
if ($product_data !== false && count($product_data)){
|
77 |
foreach($product_data as $advert){
|
78 |
if ($advert['filename']!=''&&strlen($advert['filename'])>5){
|
79 |
+
$text_to_return .= "<div>";
|
80 |
+
if (trim($advert['url'])!='')
|
81 |
+
{
|
82 |
+
$text_to_return .= "<a href='";
|
83 |
+
$text_to_return .= $advert['url'];
|
84 |
+
$text_to_return .= "'>";
|
85 |
+
}
|
86 |
+
$text_to_return .= "<img title='";
|
87 |
+
$text_to_return .= $advert['promotion_text'];
|
88 |
+
$text_to_return .= "' src='";
|
89 |
+
$text_to_return .= Mage::getBaseUrl('media');
|
90 |
+
$text_to_return .= $advert['filename'];
|
91 |
+
$text_to_return .= "'>";
|
92 |
+
if (trim($advert['url'])!='')
|
93 |
+
{
|
94 |
+
$text_to_return .= "</a>";
|
95 |
+
}
|
96 |
+
$text_to_return .= "</div>";
|
97 |
+
}
|
98 |
+
else
|
99 |
+
{
|
100 |
+
$text_to_return .= "<div>";
|
101 |
+
if (trim($advert['url'])!='')
|
102 |
+
{
|
103 |
+
$text_to_return .= "<a href='";
|
104 |
+
$text_to_return .= $advert['url'];
|
105 |
+
$text_to_return .= "'>";
|
106 |
+
}
|
107 |
+
$text_to_return .= $advert['promotion_text'];
|
108 |
+
if (trim($advert['url'])!='')
|
109 |
+
{
|
110 |
+
$text_to_return .= "</a>";
|
111 |
+
}
|
112 |
+
$text_to_return .= "</div>";
|
113 |
+
}
|
114 |
}
|
115 |
}
|
116 |
+
return $text_to_return != ''? /*"<div><ul>".*/$text_to_return/*."</ul></div>"*/:"";
|
117 |
|
118 |
}
|
119 |
|
134 |
return $text_to_return!=''?/*"<div><ul>".*/$text_to_return/*."</ul></div>"*/:"";
|
135 |
}
|
136 |
|
137 |
+
/* STICKER FUNCTIONS - START */
|
138 |
+
|
139 |
+
function isSticked($product){
|
140 |
+
$image=false;
|
141 |
+
$products_has_promotion_image=Mage::getResourceSingleton('qixol/sticker');
|
142 |
+
$product_stick_images=$products_has_promotion_image->getStickerImage($product);
|
143 |
|
144 |
+
if (is_array($product_stick_images)&&count($product_stick_images)==1) { //if 1 sticker
|
145 |
+
$image=$product_stick_images[0]['filename'];
|
146 |
+
if (($image!==false)&&strlen($image)>5)
|
147 |
+
$image=Mage::getBaseUrl('media').$image;
|
148 |
+
return $image;
|
149 |
+
}elseif(is_array($product_stick_images)&&count($product_stick_images)>1){
|
150 |
+
foreach ($product_stick_images as $image_array){
|
151 |
+
if (($image_array['filename']!==false)&&strlen($image_array['filename'])>5){
|
152 |
+
$image[]=Mage::getBaseUrl('media').$image_array['filename'];
|
153 |
+
}
|
154 |
+
}
|
155 |
+
return $image;
|
156 |
+
}
|
157 |
+
return $image;
|
158 |
+
}
|
159 |
|
160 |
+
function getAllProductAdv($product){
|
161 |
+
|
162 |
+
$text_to_return='';
|
163 |
+
|
164 |
+
$products_has_promotion = Mage::getResourceSingleton('qixol/sticker');
|
165 |
+
$product_data = $products_has_promotion->getAllProductTextAdv($product);
|
166 |
+
if ($product_data !== false && count($product_data)) {
|
167 |
+
//$text_to_return.="";
|
168 |
+
//$text_to_return.="";
|
169 |
+
foreach($product_data as $advert) {
|
170 |
+
$text_to_return .= "<tr><td>";
|
171 |
+
$text_to_return .= (empty($advert['promotion_text']) ? $advert['promotion_name'] : $advert['promotion_text']);
|
172 |
+
$text_to_return .= "</td><td style='width:100px;'>";
|
173 |
+
if ($advert['promotion_type'] == 'BOGOF') {
|
174 |
+
$text_to_return .= 'Get one free';
|
175 |
+
} else {
|
176 |
+
if ($advert['discountpercent'] > 0) {
|
177 |
+
$text_to_return .= number_format($advert['discountpercent']) . "%";
|
178 |
+
} else {
|
179 |
+
$text_to_return .= number_format($advert['discountamount'], 2);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
$text_to_return .= "</td></tr>";
|
183 |
+
}
|
184 |
+
//$text_to_return.="";
|
185 |
+
}
|
186 |
+
return $text_to_return!=''?/*"<div><ul>".*/$text_to_return/*."</ul></div>"*/:"";
|
187 |
+
}
|
188 |
|
189 |
+
/* STICKER FUNCTIONS - END */
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
app/code/community/Holbi/Qixol/Model/Banner.php
CHANGED
@@ -1,71 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Banner extends Mage_Core_Model_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/banner');
|
7 |
-
}
|
8 |
-
|
9 |
-
public function load($id){
|
10 |
-
parent::load($id);
|
11 |
-
$this->getBannerImages();
|
12 |
-
return $this;
|
13 |
-
}
|
14 |
-
public function save(){
|
15 |
-
$banner_images=array();
|
16 |
-
|
17 |
-
if ($this->_data['banner_images']){
|
18 |
-
$banner_images=$this->_data['banner_images'];
|
19 |
-
unset($this->_data['banner_images']);
|
20 |
-
}
|
21 |
-
parent::save();
|
22 |
-
if ($this->getBannerId()>0){
|
23 |
-
$this->setSaveBannerImages($banner_images);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
public function getAllAvailBannerIds(){
|
27 |
-
$collection = Mage::getResourceModel('qixol/banner_collection')
|
28 |
-
->getAllIds();
|
29 |
-
return $collection;
|
30 |
-
}
|
31 |
-
|
32 |
-
public function getAllBanners() {
|
33 |
-
$collection = Mage::getResourceModel('qixol/banner_collection');
|
34 |
-
$collection->getSelect()->where('status = ?', 1);
|
35 |
-
$data = array();
|
36 |
-
foreach ($collection as $record) {
|
37 |
-
$data[$record->getId()] = array('value' => $record->getId(), 'label' => $record->getfilename());
|
38 |
-
}
|
39 |
-
return $data;
|
40 |
-
}
|
41 |
-
|
42 |
-
public function getDataByBannerIds($bannerIds) {
|
43 |
-
$data = array();
|
44 |
-
if ($bannerIds != '') {
|
45 |
-
$collection = Mage::getResourceModel('qixol/banner_collection');
|
46 |
-
$collection->getSelect()->where('banner_id IN (' . $bannerIds . ')')->order('sort_order');
|
47 |
-
foreach ($collection as $record) {
|
48 |
-
$status = $record->getStatus();
|
49 |
-
if ($status == 1) {
|
50 |
-
$data[] = $record;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
}
|
54 |
-
return $data;
|
55 |
-
}
|
56 |
-
|
57 |
-
public function getBannerImages($bannerid=0) {
|
58 |
-
if ($bannerid==0) $bannerid=$this->getBannerId();
|
59 |
-
$banner_images = Mage::getResourceModel('qixol/banner')->getBannerImages($bannerid);
|
60 |
-
$parced_images=Array();
|
61 |
-
if (is_array($banner_images))
|
62 |
-
foreach ($banner_images as $banner_image){
|
63 |
-
$parced_images[]=$banner_image['banner_image_id'];
|
64 |
-
}
|
65 |
-
$this->setBannerImages($parced_images);
|
66 |
-
}
|
67 |
-
|
68 |
-
public function setSaveBannerImages($banner_images) {
|
69 |
-
Mage::getResourceModel('qixol/banner')->setBannerImages($this->getbannerId(),$banner_images);
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Banner extends Mage_Core_Model_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/banner');
|
7 |
+
}
|
8 |
+
|
9 |
+
public function load($id){
|
10 |
+
parent::load($id);
|
11 |
+
$this->getBannerImages();
|
12 |
+
return $this;
|
13 |
+
}
|
14 |
+
public function save(){
|
15 |
+
$banner_images=array();
|
16 |
+
|
17 |
+
if ($this->_data['banner_images']){
|
18 |
+
$banner_images=$this->_data['banner_images'];
|
19 |
+
unset($this->_data['banner_images']);
|
20 |
+
}
|
21 |
+
parent::save();
|
22 |
+
if ($this->getBannerId()>0){
|
23 |
+
$this->setSaveBannerImages($banner_images);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
public function getAllAvailBannerIds(){
|
27 |
+
$collection = Mage::getResourceModel('qixol/banner_collection')
|
28 |
+
->getAllIds();
|
29 |
+
return $collection;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getAllBanners() {
|
33 |
+
$collection = Mage::getResourceModel('qixol/banner_collection');
|
34 |
+
$collection->getSelect()->where('status = ?', 1);
|
35 |
+
$data = array();
|
36 |
+
foreach ($collection as $record) {
|
37 |
+
$data[$record->getId()] = array('value' => $record->getId(), 'label' => $record->getfilename());
|
38 |
+
}
|
39 |
+
return $data;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getDataByBannerIds($bannerIds) {
|
43 |
+
$data = array();
|
44 |
+
if ($bannerIds != '') {
|
45 |
+
$collection = Mage::getResourceModel('qixol/banner_collection');
|
46 |
+
$collection->getSelect()->where('banner_id IN (' . $bannerIds . ')')->order('sort_order');
|
47 |
+
foreach ($collection as $record) {
|
48 |
+
$status = $record->getStatus();
|
49 |
+
if ($status == 1) {
|
50 |
+
$data[] = $record;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
return $data;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function getBannerImages($bannerid=0) {
|
58 |
+
if ($bannerid==0) $bannerid=$this->getBannerId();
|
59 |
+
$banner_images = Mage::getResourceModel('qixol/banner')->getBannerImages($bannerid);
|
60 |
+
$parced_images=Array();
|
61 |
+
if (is_array($banner_images))
|
62 |
+
foreach ($banner_images as $banner_image){
|
63 |
+
$parced_images[]=$banner_image['banner_image_id'];
|
64 |
+
}
|
65 |
+
$this->setBannerImages($parced_images);
|
66 |
+
}
|
67 |
+
|
68 |
+
public function setSaveBannerImages($banner_images) {
|
69 |
+
Mage::getResourceModel('qixol/banner')->setBannerImages($this->getbannerId(),$banner_images);
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getBannerImageCollection()
|
73 |
+
{
|
74 |
+
return Mage::getResourceModel('qixol/bannerimage_collection');
|
75 |
+
}
|
76 |
+
|
77 |
+
public function getBannerImageIds()
|
78 |
+
{
|
79 |
+
return $this->getResource()->getBannerImageIds($this);
|
80 |
+
}
|
81 |
}
|
app/code/community/Holbi/Qixol/Model/Bannerboxes.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Bannerboxes extends Mage_Core_Model_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/bannerboxes', "banner_box_type");
|
7 |
-
}
|
8 |
-
|
9 |
-
public function getOptionArray(){
|
10 |
-
$hlp = Mage::helper('qixol');
|
11 |
-
$collections=$this->getCollection();
|
12 |
-
$list_return=array();
|
13 |
-
foreach ($collections as $banner_box){
|
14 |
-
if (strpos((string)$banner_box->getBannerBoxType(),'STICKER')===false)
|
15 |
-
$list_return[]=array(
|
16 |
-
'value' => (string)$banner_box->getBannerBoxType(),
|
17 |
-
'label' => $hlp->__((string)$banner_box->getBannerBoxType())
|
18 |
-
);
|
19 |
-
}
|
20 |
-
return $list_return;
|
21 |
-
}
|
22 |
-
|
23 |
-
public function getStickerOptionArray(){
|
24 |
-
$hlp = Mage::helper('qixol');
|
25 |
-
$collections=$this->getCollection();
|
26 |
-
$list_return=array();
|
27 |
-
foreach ($collections as $banner_box){
|
28 |
-
if (strpos((string)$banner_box->getBannerBoxType(),'STICKER')!==false)
|
29 |
-
$list_return[]=array(
|
30 |
-
'value' => (string)$banner_box->getBannerBoxType(),
|
31 |
-
'label' => $hlp->__((string)$banner_box->getBannerBoxType())
|
32 |
-
);
|
33 |
-
}
|
34 |
-
return $list_return;
|
35 |
-
}
|
36 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Bannerboxes extends Mage_Core_Model_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/bannerboxes', "banner_box_type");
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getOptionArray(){
|
10 |
+
$hlp = Mage::helper('qixol');
|
11 |
+
$collections=$this->getCollection();
|
12 |
+
$list_return=array();
|
13 |
+
foreach ($collections as $banner_box){
|
14 |
+
if (strpos((string)$banner_box->getBannerBoxType(),'STICKER')===false)
|
15 |
+
$list_return[]=array(
|
16 |
+
'value' => (string)$banner_box->getBannerBoxType(),
|
17 |
+
'label' => $hlp->__((string)$banner_box->getBannerBoxType())
|
18 |
+
);
|
19 |
+
}
|
20 |
+
return $list_return;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function getStickerOptionArray(){
|
24 |
+
$hlp = Mage::helper('qixol');
|
25 |
+
$collections=$this->getCollection();
|
26 |
+
$list_return=array();
|
27 |
+
foreach ($collections as $banner_box){
|
28 |
+
if (strpos((string)$banner_box->getBannerBoxType(),'STICKER')!==false)
|
29 |
+
$list_return[]=array(
|
30 |
+
'value' => (string)$banner_box->getBannerBoxType(),
|
31 |
+
'label' => $hlp->__((string)$banner_box->getBannerBoxType())
|
32 |
+
);
|
33 |
+
}
|
34 |
+
return $list_return;
|
35 |
+
}
|
36 |
}
|
app/code/community/Holbi/Qixol/Model/Bannerimage.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//class Mage_Api_Model_User extends Mage_Core_Model_Abstract
|
3 |
+
class Holbi_Qixol_Model_Bannerimage extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Prefix of model events names
|
7 |
+
*
|
8 |
+
* @var string
|
9 |
+
*/
|
10 |
+
protected $_eventPrefix = 'qixol_bannerimage';
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Constructor
|
14 |
+
*/
|
15 |
+
protected function _construct()
|
16 |
+
{
|
17 |
+
$this->_init('qixol/bannerimage', 'banner_image_id');
|
18 |
+
}
|
19 |
+
|
20 |
+
// public function save()
|
21 |
+
// {
|
22 |
+
// $this->_beforeSave();
|
23 |
+
// $data = array(
|
24 |
+
// 'filename' => $this->getFilename(),
|
25 |
+
// 'sort_order' => $this->getSortorder()
|
26 |
+
// );
|
27 |
+
//
|
28 |
+
// if ($this->getId() > 0) {
|
29 |
+
// $data['banner_image_id'] = $this->getId();
|
30 |
+
// }
|
31 |
+
//
|
32 |
+
// if ($this->getPromotionReference())
|
33 |
+
// {
|
34 |
+
// $data['promotion_reference'] = $this->getPromotionReference();
|
35 |
+
// }
|
36 |
+
//
|
37 |
+
// if ($this->getUrl()) {
|
38 |
+
// $data['url'] = $this->_getEncodedApiKey($this->getUrl());
|
39 |
+
// }
|
40 |
+
//
|
41 |
+
// if ($this->getComment()) {
|
42 |
+
// $data['comment'] = $this->_getEncodedApiKey($this->getComment());
|
43 |
+
// }
|
44 |
+
//
|
45 |
+
// $this->setData($data);
|
46 |
+
// $this->_getResource()->save($this);
|
47 |
+
// $this->_afterSave();
|
48 |
+
// return $this;
|
49 |
+
// }
|
50 |
+
//
|
51 |
+
// public function delete()
|
52 |
+
// {
|
53 |
+
// $this->_beforeDelete();
|
54 |
+
// $this->_getResource()->delete($this);
|
55 |
+
// $this->_afterDelete();
|
56 |
+
// return $this;
|
57 |
+
// }
|
58 |
+
//
|
59 |
+
// public function saveRelations()
|
60 |
+
// {
|
61 |
+
// $this->_getResource()->_saveRelations($this);
|
62 |
+
// return $this;
|
63 |
+
// }
|
64 |
+
//
|
65 |
+
// public function deleteFromRole()
|
66 |
+
// {
|
67 |
+
// $this->_getResource()->deleteFromRole($this);
|
68 |
+
// return $this;
|
69 |
+
// }
|
70 |
+
//
|
71 |
+
// public function add()
|
72 |
+
// {
|
73 |
+
// $this->_getResource()->add($this);
|
74 |
+
// return $this;
|
75 |
+
// }
|
76 |
+
|
77 |
+
public function getCollection() {
|
78 |
+
return Mage::getResourceModel('qixol/bannerimage_collection');
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Get helper instance
|
83 |
+
*
|
84 |
+
* @param string $helperName
|
85 |
+
* @return Mage_Core_Helper_Abstract
|
86 |
+
*/
|
87 |
+
protected function _getHelper($helperName)
|
88 |
+
{
|
89 |
+
return Mage::helper($helperName);
|
90 |
+
}
|
91 |
+
}
|
app/code/community/Holbi/Qixol/Model/Bannerimages.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Holbi_Qixol_Model_Bannerimages extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
public function _construct(){
|
6 |
-
|
7 |
-
$this->_init("qixol/bannerimages",'banner_image_id');
|
8 |
-
|
9 |
-
}
|
10 |
-
|
11 |
-
public function getOptionArray(){
|
12 |
-
$hlp = Mage::helper('qixol');
|
13 |
-
$collections=$this->getCollection();
|
14 |
-
$list_return=array();
|
15 |
-
foreach ($collections as $banner_image){
|
16 |
-
$list_return[]=array(
|
17 |
-
'value' => (string)$banner_image->getBannerImageId(),
|
18 |
-
'label' => $hlp->__((string)$banner_image->getFilename())
|
19 |
-
);
|
20 |
-
}
|
21 |
-
return $list_return;
|
22 |
-
}
|
23 |
-
|
24 |
-
}
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Holbi/Qixol/Model/Customergrouspmap.php
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Customergrouspmap extends Mage_Core_Model_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/customergrouspmap', "customer_group_name");
|
7 |
-
}
|
8 |
-
|
9 |
-
public function getOptionArray(){
|
10 |
-
$hlp = Mage::helper('qixol');
|
11 |
-
$collections=$this->getCollection();
|
12 |
-
$list_return=array();
|
13 |
-
foreach ($collections as $item){
|
14 |
-
$list_return[]=array(
|
15 |
-
'value' => (string)$item->getCustomerGroupName(),
|
16 |
-
'label' => $hlp->__((string)$item->getCustomerGroupName())
|
17 |
-
);
|
18 |
-
}
|
19 |
-
return $list_return;
|
20 |
-
}
|
21 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Customergrouspmap extends Mage_Core_Model_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/customergrouspmap', "customer_group_name");
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getOptionArray(){
|
10 |
+
$hlp = Mage::helper('qixol');
|
11 |
+
$collections=$this->getCollection();
|
12 |
+
$list_return=array();
|
13 |
+
foreach ($collections as $item){
|
14 |
+
$list_return[]=array(
|
15 |
+
'value' => (string)$item->getCustomerGroupName(),
|
16 |
+
'label' => $hlp->__((string)$item->getCustomerGroupName())
|
17 |
+
);
|
18 |
+
}
|
19 |
+
return $list_return;
|
20 |
+
}
|
21 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Banner.php
CHANGED
@@ -1,239 +1,147 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Banner extends Mage_Core_Model_Mysql4_Abstract
|
3 |
-
|
4 |
-
private $
|
5 |
-
private $
|
6 |
-
private $
|
7 |
-
private $
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
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 |
-
->reset('columns')
|
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 |
-
$condition_2 = $this->_getReadAdapter()->quoteInto('
|
82 |
-
$condition_3 = $this->_getReadAdapter()->quoteInto('
|
83 |
-
$condition_4 = $this->_getReadAdapter()->quoteInto(
|
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 |
-
" ((qphp.parent_product_id='".(int)$product_id."' and qphp.product_id in (".join(",",$child_ids).")) or (qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0) )":
|
148 |
-
" qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0")." and b.status>0 and (pt.promotion_text!='' or bi.filename!='') and b.banner_link_name like '%".$banner_link_name."%'")
|
149 |
-
->group("qphp.promotion_id")->order('b.sort_order')
|
150 |
-
->reset('columns')->columns(array('pt.promotion_text','bi.filename',"b.url"));
|
151 |
-
*/
|
152 |
-
$condition_1 = $this->_getReadAdapter()->quoteInto('bhi.banner_id=b.banner_id','');
|
153 |
-
$condition_2 = $this->_getReadAdapter()->quoteInto('bi.banner_image_id=bhi.banner_image_id','');
|
154 |
-
$condition_3 = $this->_getReadAdapter()->quoteInto('b.banner_group=pt.promotion_type','');
|
155 |
-
$condition_4 = $this->_getReadAdapter()->quoteInto("qphp.promotion_id=pt.promotion_id ",'');
|
156 |
-
|
157 |
-
$where=" b.status>0 and (pt.promotion_text is null or pt.promotion_text!='' or bi.filename!='') and b.banner_link_name like '%".$banner_link_name."%' and (qphp.promotion_id is null or (".
|
158 |
-
(count($child_ids)?
|
159 |
-
" ((qphp.parent_product_id='".(int)$product_id."' and qphp.product_id in (".join(",",$child_ids).")) or (qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0) )":
|
160 |
-
" qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0")
|
161 |
-
."))";
|
162 |
-
|
163 |
-
$select = $this->_getReadAdapter()->select()->from(array('b'=>$this->getTable('qixol/banner')))
|
164 |
-
->joinLeft(array('bhi'=>$this->getTable('qixol/bannertoimage')), $condition_1)
|
165 |
-
->joinLeft(array('bi'=>$this->getTable('qixol/bannerimages')), $condition_2)
|
166 |
-
->joinLeft(array('pt'=>$this->getTable('promotions')), $condition_3)
|
167 |
-
->joinLeft(array('qphp'=>$this->getTable('promotionhasproduct')), $condition_4)
|
168 |
-
->where($where)->group(array("b.banner_id","bi.banner_image_id"))->order('b.sort_order')->reset('columns')->columns(array('pt.promotion_text','bi.filename',"b.url"));
|
169 |
-
|
170 |
-
$data=$this->_getReadAdapter()->fetchAll($select);
|
171 |
-
|
172 |
-
if (count($data)) return $data;
|
173 |
-
return false;
|
174 |
-
}
|
175 |
-
|
176 |
-
public function getAllProductTextAdv($product,$adv_type='Inline') {
|
177 |
-
//create the list of product->child if parent
|
178 |
-
$product_id=$product->getId();
|
179 |
-
$child_ids=array();
|
180 |
-
if ($product->isConfigurable()){
|
181 |
-
$associatedProducts = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);
|
182 |
-
foreach ($product->getTypeInstance()->getUsedProducts() as $childProduct) {
|
183 |
-
$child_ids[]=$childProduct->getId();
|
184 |
-
}
|
185 |
-
}
|
186 |
-
//
|
187 |
-
$condition_4 = $this->_getReadAdapter()->quoteInto("qphp.promotion_id=pt.promotion_id ",'');
|
188 |
-
$where=
|
189 |
-
(count($child_ids)?
|
190 |
-
" ((qphp.parent_product_id='".(int)$product_id."' and qphp.product_id in (".join(",",$child_ids).")) or (qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0) )":
|
191 |
-
" qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0");
|
192 |
-
|
193 |
-
$select = $this->_getReadAdapter()->select()->from(array('qphp'=>$this->getTable('promotionhasproduct')))
|
194 |
-
->joinLeft(array('pt'=>$this->getTable('promotions')), $condition_4)
|
195 |
-
->where($where)->group(array("pt.promotion_id"))->reset('columns')->columns(array('pt.promotion_text','pt.discountpercent','pt.discountamount'));
|
196 |
-
|
197 |
-
$data=$this->_getReadAdapter()->fetchAll($select);
|
198 |
-
if (count($data)) return $data;
|
199 |
-
return false;
|
200 |
-
}
|
201 |
-
|
202 |
-
public function getCartInlineAdv(){
|
203 |
-
$where = $this->_getReadAdapter()->quoteInto(" is_for_product = ? ",0);
|
204 |
-
$condition_1 = $this->_getReadAdapter()->quoteInto('b.banner_group=pt.promotion_type','');
|
205 |
-
$condition_3 = $this->_getReadAdapter()->quoteInto('bhi.banner_id=b.banner_id','');
|
206 |
-
$condition_4 = $this->_getReadAdapter()->quoteInto('bi.banner_image_id=bhi.banner_image_id','');
|
207 |
-
$select = $this->_getReadAdapter()->select()->from(array('pt'=>$this->getTable('promotions')))
|
208 |
-
->join(array('b'=>$this->getTable('qixol/banner')), $condition_1)
|
209 |
-
->joinLeft(array('bhi'=>$this->getTable('qixol/bannertoimage')), $condition_3)
|
210 |
-
->joinLeft(array('bi'=>$this->getTable('qixol/bannerimages')), $condition_4)
|
211 |
-
->where($where." and b.status>0 and b.banner_link_name like '%".$this->backet_inline_advertisment_name."%'")
|
212 |
-
->order('b.sort_order')
|
213 |
-
->reset('columns')->columns(array('promotion_text','bi.filename',"b.url","b.url"));
|
214 |
-
$data=$this->_getReadAdapter()->fetchAll($select);
|
215 |
-
if (count($data)) return $data;
|
216 |
-
return false;
|
217 |
-
}
|
218 |
-
|
219 |
-
public function getBannerImages($bannerid){
|
220 |
-
$where = $this->_getReadAdapter()->quoteInto(" banner_id = ? ",$bannerid);
|
221 |
-
$select = $this->_getReadAdapter()->select()->from(array('b'=>$this->getTable('qixol/bannertoimage')))->where($where);
|
222 |
-
$data=$this->_getReadAdapter()->fetchAll($select);
|
223 |
-
if (count($data)) return $data;
|
224 |
-
return array();
|
225 |
-
}
|
226 |
-
|
227 |
-
public function setBannerImages($bannerid,$banner_images){
|
228 |
-
if ($bannerid>0&&count($banner_images)>0){
|
229 |
-
$where = $this->_getWriteAdapter()->quoteInto(" banner_id = ? ",$bannerid);
|
230 |
-
$this->_getWriteAdapter()->delete($this->getTable('qixol/bannertoimage'),$where);
|
231 |
-
foreach ($banner_images as $banner_image_id){
|
232 |
-
$this->_getWriteAdapter()->insert(
|
233 |
-
$this->getTable('qixol/bannertoimage'),
|
234 |
-
array("banner_id" => $bannerid, "banner_image_id" => $banner_image_id)
|
235 |
-
);
|
236 |
-
}
|
237 |
-
}
|
238 |
-
}
|
239 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Banner extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
private $category_top_advertisment_name='CATEGORY_TOP';
|
5 |
+
private $product_top_advertisment_name='PRODUCT_TOP';
|
6 |
+
private $product_bottom_advertisment_name='PRODUCT_BOTTOM';
|
7 |
+
private $product_inline_advertisment_name='PRODUCT_INLINE';
|
8 |
+
|
9 |
+
public function _construct() {
|
10 |
+
$this->_init('qixol/banner', 'banner_id');
|
11 |
+
}
|
12 |
+
|
13 |
+
public function getCategoryTopAdv($_productCollection) {
|
14 |
+
$advertisment_text='';
|
15 |
+
$product_to_child=array();
|
16 |
+
foreach ($_productCollection as $_product){
|
17 |
+
$product_to_child[$_product->getId()]=array();
|
18 |
+
if ($_product->isConfigurable()){
|
19 |
+
$child_ids=array();
|
20 |
+
$associatedProducts = $_product->getTypeInstance()->getConfigurableAttributesAsArray($_product);
|
21 |
+
foreach ($_product->getTypeInstance()->getUsedProducts() as $childProduct) {
|
22 |
+
$child_ids[]=$childProduct->getId();
|
23 |
+
}
|
24 |
+
$product_to_child[$_product->getId()]=$child_ids;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
$where='';
|
30 |
+
foreach ($product_to_child as $product_id=>$childs){
|
31 |
+
$where.=(strlen($where)>0?" or ":"")."(".((count($childs)?
|
32 |
+
" ((qphp.parent_product_id='".(int)$product_id."' and qphp.product_id in (".join(",",$childs).")) or (qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0) )":
|
33 |
+
" qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0")." ")." ) ";
|
34 |
+
}
|
35 |
+
|
36 |
+
$condition_2 = $this->_getReadAdapter()->quoteInto('bi.banner_id=b.banner_id','');
|
37 |
+
$condition_3 = $this->_getReadAdapter()->quoteInto('bi.promotion_reference=pt.yourref',''); // and bi.promotion_reference != \'\','');
|
38 |
+
$condition_4 = $this->_getReadAdapter()->quoteInto("qphp.promotion_id=pt.promotion_id ",'');
|
39 |
+
|
40 |
+
$where=" b.status>0 and (pt.promotion_text!='' or pt.promotion_text is null or bi.filename!='') and b.display_zone like '%".$this->category_top_advertisment_name."%' and (qphp.promotion_id is null or (".$where."))";
|
41 |
+
|
42 |
+
$select = $this->_getReadAdapter()->select()->from(array('b'=>$this->getTable('qixol/banner')))
|
43 |
+
->join(array('bi'=>$this->getTable('qixol/bannerimage')), $condition_2)
|
44 |
+
->joinLeft(array('pt'=>$this->getTable('promotions')), $condition_3)
|
45 |
+
->joinLeft(array('qphp'=>$this->getTable('promotionhasproduct')), $condition_4)
|
46 |
+
->where($where)->group(array("b.banner_id","bi.banner_image_id"))
|
47 |
+
->order('bi.sort_order')
|
48 |
+
->reset('columns')
|
49 |
+
->columns(array('bi.comment','bi.filename',"bi.url"));
|
50 |
+
|
51 |
+
$data=$this->_getReadAdapter()->fetchAll($select);
|
52 |
+
|
53 |
+
if (count($data)) return $data;
|
54 |
+
return false;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function getProductTextAdv($product,$adv_type='Inline') {
|
58 |
+
//create the list of product->child if parent
|
59 |
+
$product_id=$product->getId();
|
60 |
+
$child_ids=array();
|
61 |
+
if ($product->isConfigurable()){
|
62 |
+
$associatedProducts = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);
|
63 |
+
foreach ($product->getTypeInstance()->getUsedProducts() as $childProduct) {
|
64 |
+
$child_ids[]=$childProduct->getId();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
switch ($adv_type){
|
69 |
+
case "Bottom":
|
70 |
+
$display_zone=$this->product_bottom_advertisment_name;
|
71 |
+
break;
|
72 |
+
case "Top":
|
73 |
+
$display_zone=$this->product_top_advertisment_name;
|
74 |
+
break;
|
75 |
+
case "Inline":
|
76 |
+
default :
|
77 |
+
$display_zone=$this->product_inline_advertisment_name;
|
78 |
+
break;
|
79 |
+
}
|
80 |
+
|
81 |
+
$condition_2 = $this->_getReadAdapter()->quoteInto('bi.banner_id=b.banner_id','');
|
82 |
+
$condition_3 = $this->_getReadAdapter()->quoteInto('bi.promotion_reference=pt.yourref', ''); // and bi.promotion_reference != \'\','');
|
83 |
+
$condition_4 = $this->_getReadAdapter()->quoteInto("qphp.promotion_id=pt.promotion_id ",'');
|
84 |
+
|
85 |
+
$where = "b.status > 0 and ";
|
86 |
+
$where .= "(pt.promotion_text is null or pt.promotion_text!='' or bi.filename!='') and ";
|
87 |
+
$where .= "b.display_zone like '%" . $display_zone . "%' and ";
|
88 |
+
$where .= "(qphp.promotion_id is null or (";
|
89 |
+
if (count($child_ids))
|
90 |
+
{
|
91 |
+
$where .= " ((qphp.parent_product_id='" . (int)$product_id . "' and ";
|
92 |
+
$where .= "qphp.product_id in (" . join(",",$child_ids) . ")) or ";
|
93 |
+
$where .= "(qphp.product_id='" . (int)$product_id."' and ";
|
94 |
+
$where .= "qphp.parent_product_id=0) )";
|
95 |
+
}
|
96 |
+
else
|
97 |
+
{
|
98 |
+
$where .= " qphp.product_id='" . (int)$product_id . "' and qphp.parent_product_id=0";
|
99 |
+
}
|
100 |
+
$where .= "))";
|
101 |
+
|
102 |
+
$select = $this->_getReadAdapter()->select()->from(array('b'=>$this->getTable('qixol/banner')))
|
103 |
+
->join(array('bi'=>$this->getTable('qixol/bannerimage')), $condition_2)
|
104 |
+
->joinLeft(array('pt'=>$this->getTable('promotions')), $condition_3)
|
105 |
+
->joinLeft(array('qphp'=>$this->getTable('promotionhasproduct')), $condition_4)
|
106 |
+
->where($where)
|
107 |
+
->group(array("bi.banner_id","bi.banner_image_id"))
|
108 |
+
->order('bi.sort_order')
|
109 |
+
->reset('columns')
|
110 |
+
->columns(array('bi.comment','bi.filename',"bi.url"));
|
111 |
+
|
112 |
+
$data=$this->_getReadAdapter()->fetchAll($select);
|
113 |
+
|
114 |
+
if (count($data)) return $data;
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
|
118 |
+
public function getBannerImages($bannerid){
|
119 |
+
$where = $this->_getReadAdapter()->quoteInto(" banner_id = ? ",$bannerid);
|
120 |
+
$select = $this->_getReadAdapter()->select()->from(array('b'=>$this->getTable('qixol/bannerimage')))->where($where);
|
121 |
+
$data=$this->_getReadAdapter()->fetchAll($select);
|
122 |
+
if (count($data)) return $data;
|
123 |
+
return array();
|
124 |
+
}
|
125 |
+
|
126 |
+
public function getBannerImageIds(Holbi_Qixol_Model_Banner $banner)
|
127 |
+
{
|
128 |
+
$read = $this->_getReadAdapter();
|
129 |
+
$select = $read->select()
|
130 |
+
->from($this->getTable('qixol/bannerimage'), array('banner_id'))
|
131 |
+
->where('banner_id = ?', $banner->getId());
|
132 |
+
return $read->fetchCol($select);
|
133 |
+
}
|
134 |
+
|
135 |
+
public function setBannerImages($bannerid,$banner_images){
|
136 |
+
if ($bannerid>0&&count($banner_images)>0){
|
137 |
+
$where = $this->_getWriteAdapter()->quoteInto(" banner_id = ? ",$bannerid);
|
138 |
+
$this->_getWriteAdapter()->delete($this->getTable('qixol/bannerimage'),$where);
|
139 |
+
foreach ($banner_images as $banner_image_id){
|
140 |
+
$this->_getWriteAdapter()->insert(
|
141 |
+
$this->getTable('qixol/bannerimage'),
|
142 |
+
array("banner_id" => $bannerid, "banner_image_id" => $banner_image_id)
|
143 |
+
);
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Banner/Collection.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Banner_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/banner');
|
7 |
-
}
|
8 |
-
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Banner_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/banner');
|
7 |
+
}
|
8 |
+
|
9 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Bannerboxes/Collection.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Bannerboxes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/bannerboxes');
|
7 |
-
}
|
8 |
-
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Bannerboxes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/bannerboxes');
|
7 |
+
}
|
8 |
+
|
9 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimage.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Bannerimage extends Mage_Core_Model_Mysql4_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
$this->_init('qixol/bannerimage', 'banner_image_id');
|
6 |
+
}
|
7 |
+
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimage/Collection.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Bannerimage_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('qixol/bannerimage');
|
7 |
+
}
|
8 |
+
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimages.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Bannerimages extends Mage_Core_Model_Mysql4_Abstract
|
3 |
-
{
|
4 |
-
public function _construct()
|
5 |
-
{
|
6 |
-
$this->_init('qixol/bannerimages','banner_image_id');
|
7 |
-
}
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Holbi/Qixol/Model/Mysql4/Bannerimages/Collection.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Bannerimages_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/bannerimages');
|
7 |
-
}
|
8 |
-
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Holbi/Qixol/Model/Mysql4/Customergrouspmap/Collection.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Customergrouspmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/customergrouspmap');
|
7 |
-
}
|
8 |
-
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Customergrouspmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/customergrouspmap');
|
7 |
+
}
|
8 |
+
|
9 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Shippingmap/Collection.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Shippingmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/shippingmap');
|
7 |
-
}
|
8 |
-
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Shippingmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/shippingmap');
|
7 |
+
}
|
8 |
+
|
9 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Sticker.php
CHANGED
@@ -1,50 +1,238 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Sticker extends Mage_Core_Model_Mysql4_Abstract {
|
3 |
-
private $category_stickers_advertisment_name='CATEGORY_STICKERS';
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
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 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Sticker extends Mage_Core_Model_Mysql4_Abstract {
|
3 |
+
private $category_stickers_advertisment_name='CATEGORY_STICKERS';
|
4 |
+
|
5 |
+
public function _construct() {
|
6 |
+
// Note that the banner_id refers to the key field in your database table.
|
7 |
+
$this->_init('qixol/sticker', 'sticker_id');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getStickerImage($product) {
|
11 |
+
|
12 |
+
// How to get the stickers:
|
13 |
+
// get promotions that are valid for this product
|
14 |
+
// get stickers for specific promotion references for these promotions - take ALL stickers matching this reference
|
15 |
+
// next get custom stickers for promotion types other than any matched in the second step
|
16 |
+
// finally get system default stickers for any remaining unmatched promotion types
|
17 |
+
|
18 |
+
/**************************************************************************
|
19 |
+
// get promotions that are valid for this product (and child products)
|
20 |
+
**************************************************************************/
|
21 |
+
$promotions = $this->getPromotionsForProduct($product);
|
22 |
+
|
23 |
+
if (count($promotions) == 0) {
|
24 |
+
return false;
|
25 |
+
}
|
26 |
+
|
27 |
+
/**************************************************************************
|
28 |
+
// get stickers for any promotion references (!= '')
|
29 |
+
**************************************************************************/
|
30 |
+
$promotionSpecificStickers = $this->getPromotionSpecificStickers($promotions);
|
31 |
+
|
32 |
+
$matchedTypes = array();
|
33 |
+
$filenames = array();
|
34 |
+
|
35 |
+
if (is_array($promotionSpecificStickers)) {
|
36 |
+
if (count($promotionSpecificStickers) > 0) {
|
37 |
+
foreach ($promotionSpecificStickers as $promotionSpecificSticker) {
|
38 |
+
array_push($matchedTypes, $promotionSpecificSticker['promotion_type_name']);
|
39 |
+
array_push($filenames, array('filename' => $promotionSpecificSticker['filename']));
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**************************************************************************
|
45 |
+
// next get custom stickers for promotion types other than any matched in the second step
|
46 |
+
**************************************************************************/
|
47 |
+
$defaultStickers = $this->getPromotionDefaultStickers($promotions, $matchedTypes);
|
48 |
+
|
49 |
+
if (is_array($defaultStickers)) {
|
50 |
+
if (count($defaultStickers) > 0) {
|
51 |
+
foreach ($defaultStickers as $defaultSticker) {
|
52 |
+
array_push($matchedTypes, $defaultSticker['promotion_type_name']);
|
53 |
+
array_push($filenames, array('filename' => $defaultSticker['filename']));
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**************************************************************************
|
59 |
+
// next get system stickers for remaining promotion types
|
60 |
+
**************************************************************************/
|
61 |
+
$systemStickers = $this->getPromotionSystemStickers($promotions, $matchedTypes);
|
62 |
+
|
63 |
+
if (is_array($systemStickers)) {
|
64 |
+
if (count($systemStickers) > 0) {
|
65 |
+
foreach ($systemStickers as $systemSticker) {
|
66 |
+
array_push($matchedTypes, $systemSticker['promotion_type_name']);
|
67 |
+
array_push($filenames, array('filename' => $systemSticker['filename']));
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
return $filenames;
|
73 |
+
}
|
74 |
+
|
75 |
+
public function getAllProductTextAdv($product) {
|
76 |
+
/*
|
77 |
+
//create the list of product->child if parent
|
78 |
+
$product_id=$product->getId();
|
79 |
+
$child_ids=array();
|
80 |
+
if ($product->isConfigurable()){
|
81 |
+
$associatedProducts = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);
|
82 |
+
foreach ($product->getTypeInstance()->getUsedProducts() as $childProduct) {
|
83 |
+
$child_ids[]=$childProduct->getId();
|
84 |
+
}
|
85 |
+
}
|
86 |
+
//
|
87 |
+
$condition_4 = $this->_getReadAdapter()->quoteInto("qphp.promotion_id=pt.promotion_id ",'');
|
88 |
+
$where=
|
89 |
+
(count($child_ids)?
|
90 |
+
" ((qphp.parent_product_id='".(int)$product_id."' and qphp.product_id in (".join(",",$child_ids).")) or (qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0) )":
|
91 |
+
" qphp.product_id='".(int)$product_id."' and qphp.parent_product_id=0");
|
92 |
+
|
93 |
+
$select = $this->_getReadAdapter()->select()->from(array('qphp'=>$this->getTable('promotionhasproduct')))
|
94 |
+
->joinLeft(array('pt'=>$this->getTable('promotions')), $condition_4)
|
95 |
+
->where($where)->group(array("pt.promotion_id"))->reset('columns')
|
96 |
+
->columns(array('pt.promotion_text','pt.discountpercent','pt.discountamount'));
|
97 |
+
|
98 |
+
$data=$this->_getReadAdapter()->fetchAll($select);
|
99 |
+
*/
|
100 |
+
$promotions = $this->getPromotionsForProduct($product);
|
101 |
+
|
102 |
+
if (count($promotions)) return $promotions;
|
103 |
+
return false;
|
104 |
+
}
|
105 |
+
|
106 |
+
private function getPromotionsForProduct($product){
|
107 |
+
//create the list of product->child if parent
|
108 |
+
$product_id=$product->getId();
|
109 |
+
$child_ids=array();
|
110 |
+
if ($product->isConfigurable()){
|
111 |
+
$associatedProducts = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);
|
112 |
+
foreach ($product->getTypeInstance()->getUsedProducts() as $childProduct) {
|
113 |
+
$child_ids[]=$childProduct->getId();
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
$join = 'product.promotion_id = promo.promotion_id';
|
118 |
+
$whereString = '';
|
119 |
+
$whereString = '(';
|
120 |
+
|
121 |
+
$whereString .= "(";
|
122 |
+
$whereString .= "(promo.is_everyday=0) and ";
|
123 |
+
$whereString .= "((promo.from_date='0000-00-00 00:00:00') or (TIME(promo.from_date) < CURTIME())) and ";
|
124 |
+
$whereString .= "((promo.till_date='0000-00-00 00:00:00') or (TIME(promo.till_date) > CURTIME()))";
|
125 |
+
$whereString .= ")";
|
126 |
+
|
127 |
+
$whereString .= " or ";
|
128 |
+
|
129 |
+
$whereString .= "(";
|
130 |
+
$whereString .= "(promo.is_everyday=1) and ";
|
131 |
+
$whereString .= "(TIME(promo.from_date) < CURTIME()) and ";
|
132 |
+
$whereString .= "(TIME(promo.till_date) > CURTIME())";
|
133 |
+
$whereString .= ")";
|
134 |
+
|
135 |
+
$whereString .= ")";
|
136 |
+
|
137 |
+
$whereString .= " and ";
|
138 |
+
|
139 |
+
if (count($child_ids)) {
|
140 |
+
$whereString .= "((product.parent_product_id = '".(int)$product_id."' and "
|
141 |
+
."product.product_id in (".join(",",$child_ids).")) or "
|
142 |
+
."(product.product_id = '".(int)$product_id."' and product.parent_product_id = 0) )";
|
143 |
+
} else {
|
144 |
+
$whereString .= "product.product_id = '".(int)$product_id."' and product.parent_product_id = 0";
|
145 |
+
}
|
146 |
+
|
147 |
+
$select = $this->_getReadAdapter()->select()->distinct()
|
148 |
+
->from(array('product' => $this->getTable('promotionhasproduct')))
|
149 |
+
->join(array('promo' => $this->getTable('promotions')), $join)
|
150 |
+
->where($whereString)
|
151 |
+
->reset('columns')
|
152 |
+
->columns(array('promotion_type' => 'promo.promotion_type',
|
153 |
+
'promotion_name' => 'promo.promotion_name',
|
154 |
+
'promo_reference' => 'promo.yourref',
|
155 |
+
'promotion_text' => 'promo.promotion_text',
|
156 |
+
'discountpercent' => 'promo.discountpercent',
|
157 |
+
'discountamount' => 'promo.discountamount'));
|
158 |
+
|
159 |
+
return $this->_getReadAdapter()->fetchAll($select);
|
160 |
+
}
|
161 |
+
|
162 |
+
private function getPromotionSpecificStickers($promotions) {
|
163 |
+
$references = array();
|
164 |
+
foreach($promotions as $key => $value) {
|
165 |
+
if ($value[promo_reference] != '') {
|
166 |
+
array_push($references, $value[promo_reference]);
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
if (count($references) == 0) {
|
171 |
+
return;
|
172 |
+
}
|
173 |
+
|
174 |
+
$join = 'sticker.promo_reference = promo.yourref';
|
175 |
+
|
176 |
+
$whereStringReferences = join('\',\'', $references);
|
177 |
+
$whereStringReferences = 'promo_reference in (\'' . $whereStringReferences . '\')';
|
178 |
+
|
179 |
+
$select = $this->_getReadAdapter()->select()
|
180 |
+
->from(array('sticker' => $this->getTable('sticker')))
|
181 |
+
->join(array('promo' => $this->getTable('promotions')), $join)
|
182 |
+
->where($whereStringReferences)
|
183 |
+
->reset('columns')
|
184 |
+
->columns(array('filename' => 'filename', 'promotion_type_name' => 'promo.promotion_type'));
|
185 |
+
|
186 |
+
return $this->_getReadAdapter()->fetchAll($select);
|
187 |
+
}
|
188 |
+
|
189 |
+
private function getPromotionDefaultStickers($promotions, $matchedTypes) {
|
190 |
+
$whereString = '(is_default_for_type = 1) and (is_system_default_for_type = 0)';
|
191 |
+
if (is_array($matchedTypes)) {
|
192 |
+
if (count($matchedTypes) > 0) {
|
193 |
+
$whereString .= ' and promo_type_name not in (\'' . join('\',\'', $matchedTypes) . '\')';
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
$unmatchedTypes = array();
|
198 |
+
foreach($promotions as $key => $value) {
|
199 |
+
if ($value[promotion_type] != '') {
|
200 |
+
array_push($unmatchedTypes, $value[promotion_type]);
|
201 |
+
}
|
202 |
+
}
|
203 |
+
$whereString .= ' and promo_type_name in (\'' . join('\',\'', $unmatchedTypes) . '\')';
|
204 |
+
|
205 |
+
$select = $this->_getReadAdapter()->select()
|
206 |
+
->from($this->getTable('sticker'))
|
207 |
+
->where($whereString)
|
208 |
+
->reset('columns')
|
209 |
+
->columns(array('filename' => 'filename', 'promotion_type_name' => 'promo_type_name'));
|
210 |
+
|
211 |
+
return $this->_getReadAdapter()->fetchAll($select);
|
212 |
+
}
|
213 |
+
|
214 |
+
private function getPromotionSystemStickers($promotions, $matchedTypes) {
|
215 |
+
$whereString = '(is_default_for_type = 1) and (is_system_default_for_type = 1)';
|
216 |
+
if (is_array($matchedTypes)) {
|
217 |
+
if (count($matchedTypes) > 0) {
|
218 |
+
$whereString .= ' and promo_type_name not in (\'' . join('\',\'', $matchedTypes) . '\')';
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
$unmatchedTypes = array();
|
223 |
+
foreach($promotions as $key => $value) {
|
224 |
+
if ($value[promotion_type] != '') {
|
225 |
+
array_push($unmatchedTypes, $value[promotion_type]);
|
226 |
+
}
|
227 |
+
}
|
228 |
+
$whereString .= ' and promo_type_name in (\'' . join('\',\'', $unmatchedTypes) . '\')';
|
229 |
+
|
230 |
+
$select = $this->_getReadAdapter()->select()
|
231 |
+
->from($this->getTable('sticker'))
|
232 |
+
->where($whereString)
|
233 |
+
->reset('columns')
|
234 |
+
->columns(array('filename' => 'filename', 'promotion_type_name' => 'promo_type_name'));
|
235 |
+
|
236 |
+
return $this->_getReadAdapter()->fetchAll($select);
|
237 |
+
}
|
238 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Sticker/Collection.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Sticker_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/sticker');
|
7 |
-
}
|
8 |
-
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Sticker_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/sticker');
|
7 |
+
}
|
8 |
+
|
9 |
}
|
app/code/community/Holbi/Qixol/Model/Mysql4/Storesmap/Collection.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Mysql4_Storesmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/storesmap');
|
7 |
-
}
|
8 |
-
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Mysql4_Storesmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/storesmap');
|
7 |
+
}
|
8 |
+
|
9 |
}
|
app/code/community/Holbi/Qixol/Model/PromoService.php
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require('iPromoService.php');
|
4 |
+
require_once('config.php');
|
5 |
+
|
6 |
+
abstract class PromoService implements iPromoService
|
7 |
+
{
|
8 |
+
public abstract function CustomerGroupExport($data);
|
9 |
+
public abstract function ShippingMethodsExport($data);
|
10 |
+
public abstract function CurrenciesExport($data);
|
11 |
+
public abstract function StoresExport($data);
|
12 |
+
public abstract function ProductsExport($data);
|
13 |
+
|
14 |
+
public abstract function PromotionsForProducts($data);
|
15 |
+
public abstract function PromotionsForBaskets($data);
|
16 |
+
|
17 |
+
public abstract function BasketValidate($data);
|
18 |
+
public abstract function CouponCodeValidate($couponCode);
|
19 |
+
public abstract function RetrieveValidatedBasket($basketRef);
|
20 |
+
public abstract function BasketCheck();
|
21 |
+
|
22 |
+
public function parsePromotionsForBaskets($promotion_new_xml=''){
|
23 |
+
$xml_object = simplexml_load_string($promotion_new_xml);
|
24 |
+
//print_r($xml_object);
|
25 |
+
if ($xml_object instanceof SimpleXMLElement) {
|
26 |
+
foreach ($xml_object as $xml_root_key=>$xml_object_sub){
|
27 |
+
if ($xml_root_key=='promotions'){
|
28 |
+
foreach ($xml_object_sub as $xml_promotions){
|
29 |
+
unset($promotion_model);
|
30 |
+
$attributes=$xml_promotions->attributes();
|
31 |
+
$promotion_model=Mage::getModel('qixol/promotions')->load((int)$attributes['id']);
|
32 |
+
if (count($promotion_model->getData())>0){
|
33 |
+
$promotion_model->setUpdateTime(date("Y-m-d H:i:s"));
|
34 |
+
} else {
|
35 |
+
unset($promotion_model);
|
36 |
+
$promotion_model=Mage::getModel('qixol/promotions');
|
37 |
+
$promotion_model->setCreatedTime(date("Y-m-d H:i:s"));
|
38 |
+
$promotion_model->setUpdateTime('0000-00-00 00:00:00');
|
39 |
+
}
|
40 |
+
|
41 |
+
$promotion_model->setPromotionId((int)$attributes['id']);
|
42 |
+
$promotion_model->setPromotionType(isset($attributes['type'])?(string)$attributes['type']:"");
|
43 |
+
|
44 |
+
$promotion_model->setDiscountpercent(isset($attributes['discountpercent'])?(double)$attributes['discountpercent']:0);
|
45 |
+
$promotion_model->setDiscountamount(isset($attributes['discountamount'])?(double)$attributes['discountamount']:0);
|
46 |
+
$promotion_model->setHascouponrestrictions(isset($attributes['hascouponrestrictions'])?(int)$attributes['hascouponrestrictions']:0);
|
47 |
+
|
48 |
+
$promotion_model->setPromotionName(isset($xml_promotions->name)?(string)$xml_promotions->name:"");
|
49 |
+
$promotion_model->setPromotionText(isset($xml_promotions->displaytext)?(string)$xml_promotions->displaytext:"");
|
50 |
+
|
51 |
+
try {
|
52 |
+
$promotion_model->save();
|
53 |
+
} catch(Exception $e) {
|
54 |
+
print_r($e);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
//delete not updated simple way
|
60 |
+
$promotion_has_products=Mage::getResourceModel('qixol/promotions');
|
61 |
+
$promotion_has_products->removeOldDayPromotion();
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
function parsePromotionsForProducts($promotion_new_xml=''){
|
66 |
+
$active_promotions=array();
|
67 |
+
$new_promotions=array();
|
68 |
+
$promotions_list=Mage::getModel('qixol/Promotions')->getCollection();
|
69 |
+
foreach ($promotions_list as $current_promotion){
|
70 |
+
$active_promotions[$current_promotion->getPromotionId()]=$current_promotion->getPromotionType();
|
71 |
+
}
|
72 |
+
//first test data
|
73 |
+
//$promotion_new_xml='<response><promotions><promotion id="106" type="BUNDLE" yourref="QIXOL-2" bundleprice="50.00"><name>Qixol 2</name><displaytext>Buy three test config products for 50</displaytext></promotion><promotion id="107" type="BOGOF" discountpercent="50.00"><name>Qixol 3a</name><displaytext>test config product 4 - BOGOF</displaytext></promotion><promotion id="108" type="BOGOF" discountpercent="50.00"><name>Qixol 3b</name><displaytext>Test Config product 5 BOGOF</displaytext></promotion><promotion id="109" type="BOGOR" discountpercent="50.00"><name>Qixol 4a</name><displaytext>test config product 6 BOGOR</displaytext></promotion><promotion id="110" type="BOGOR" discountpercent="2.00"><name>Qixol 4b</name><displaytext>test config product 7 BOGOR</displaytext></promotion><promotion id="111" type="BOGOR" discountpercent="24.99"><name>Qixol 4c</name><displaytext>Buy two "Test config product 8" get the second for 24.99</displaytext></promotion><promotion id="112" type="DEAL"><name>Qixol 5a</name><displaytext>Buy a small green, small black and small white product, get the cheapest free</displaytext></promotion><promotion id="113" type="DEAL"><name>Qixol 5b</name><displaytext>Buy a medium red, medium white and medium black product for 19.99</displaytext></promotion><promotion id="116" type="FREEPRODUCT"><name>Qixol 7a</name><displaytext>Buy "test product 1 / Test1_01" get "test product 2 / 123456" free (applies ONCE only)</displaytext></promotion><promotion id="117" type="FREEPRODUCT"><name>Qixol 7b</name><displaytext>Buy "test product 4 / test_4" get "test product 5 / test_5" free for each "test product 4"</displaytext></promotion><promotion id="118" type="ISSUECOUPON"><name>Qixol 8a</name><displaytext>Buy "testing" (test2_01) get a coupon code</displaytext></promotion><promotion id="121" type="PRODUCTSREDUCTION" discountpercent="30.00"><name>Qixol 10</name><displaytext>Use an issued coupon, get 30% off any Size = L product</displaytext></promotion></promotions><products><product productcode="config_11"/><product productcode="config_11" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="config_11" variantcode="test2_01_03"/><product productcode="config_11" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test3_3"/><product productcode="config_11" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test7_7"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test8_8"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="config_10"/><product productcode="config_10" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="config_10" variantcode="test2_01_03"/><product productcode="config_10" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_10" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_10" variantcode="test3_3"/><product productcode="config_10" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9"/><product productcode="config_9" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test7_7"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test8_8"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="test8_8"/><product productcode="test7_7"/><product productcode="config_8"><promotions><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test2_01_03"><promotions><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test3_3"><promotions><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_7"><promotions><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test2_01_03"><promotions><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test3_3"><promotions><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_6"><promotions><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_5"><promotions><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test2_01_03"><promotions><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test3_3"><promotions><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="Test6_6"/><product productcode="test5_5"/><product productcode="test4_4"/><product productcode="test3_3"/><product productcode="config_4"><promotions><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test2_01_03"><promotions><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="107" requiredqty="2"/></promotions></product><product productcode="test2_2"/><product productcode="test1_1"/><product productcode="config_3"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_3" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_3" variantcode="test2_01_03"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_2"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_2" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_2" variantcode="test2_01_03"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_1"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_1" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_1" variantcode="test2_01_03"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="test_5"/><product productcode="test_4"><promotions><promotion id="117" requiredqty="1"/></promotions></product><product productcode="test_3"/><product productcode="123456"/><product productcode="test2_01_03"/><product productcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="test2_01"><promotions><promotion id="118" requiredqty="1"/></promotions></product><product productcode="test2_01" variantcode="test2_01_01"><promotions><promotion id="118" requiredqty="1"/><promotion id="121" requiredqty="1"/></promotions></product><product productcode="test2_01" variantcode="test2_01_03"><promotions><promotion id="118" requiredqty="1"/></promotions></product><product productcode="Test1_01"><promotions><promotion id="116" requiredqty="1"/></promotions></product></products><summary result="true"/></response>';
|
74 |
+
$xml_object = simplexml_load_string($promotion_new_xml);
|
75 |
+
//print_r($xml_object);
|
76 |
+
if ($xml_object instanceof SimpleXMLElement) {
|
77 |
+
foreach ($xml_object->promotions->promotion as $xml_promotions){
|
78 |
+
unset($promotion_model);
|
79 |
+
$attributes=$xml_promotions->attributes();
|
80 |
+
$promotion_model=Mage::getModel('qixol/promotions')->load((int)$attributes['id']);
|
81 |
+
if (count($promotion_model->getData())>0){
|
82 |
+
$promotion_model->setUpdateTime(date("Y-m-d H:i:s"));
|
83 |
+
|
84 |
+
} else {
|
85 |
+
unset($promotion_model);
|
86 |
+
$promotion_model=Mage::getModel('qixol/promotions');
|
87 |
+
$promotion_model->setCreatedTime(date("Y-m-d H:i:s"));
|
88 |
+
$promotion_model->setUpdateTime('0000-00-00 00:00:00');
|
89 |
+
}
|
90 |
+
|
91 |
+
$promotion_model->setPromotionId((int)$attributes['id']);
|
92 |
+
$promotion_model->setIsForProduct(1);
|
93 |
+
$promotion_model->setPromotionType(isset($attributes['type'])?(string)$attributes['type']:"");
|
94 |
+
$new_promotions[$promotion_model->getPromotionId()]=$promotion_model->getPromotionType();
|
95 |
+
|
96 |
+
$promotion_model->setDiscountamount(isset($attributes['discountamount'])?(double)$attributes['discountamount']:0);
|
97 |
+
|
98 |
+
$promotion_model->setDiscountpercent(isset($attributes['discountpercent'])?(double)$attributes['discountpercent']:0);
|
99 |
+
$promotion_model->setYourref(isset($attributes['yourref'])?(string)$attributes['yourref']:"");
|
100 |
+
|
101 |
+
$promotion_model->setBundleprice(isset($attributes['bundleprice'])?(double)$attributes['bundleprice']:0);
|
102 |
+
$promotion_model->setPromotionName(isset($xml_promotions->name)?(string)$xml_promotions->name:"");
|
103 |
+
$promotion_model->setPromotionText(isset($xml_promotions->displaytext)?(string)$xml_promotions->displaytext:"");
|
104 |
+
$promotion_model->setFromDate('0000-00-00 00:00:00');
|
105 |
+
$promotion_model->setTillDate('0000-00-00 00:00:00');
|
106 |
+
|
107 |
+
if (isset($xml_promotions->availabletimes)&&isset($xml_promotions->availabletimes->availabletime)){
|
108 |
+
foreach ($xml_promotions->availabletimes->availabletime as $availabletime){
|
109 |
+
$time_attributes=$availabletime->attributes();
|
110 |
+
if ((string)$time_attributes['start']!=''){
|
111 |
+
$promotion_model->setFromDate('2000-01-01 '.(string)$time_attributes['start']);
|
112 |
+
$promotion_model->setIsEveryday(1);
|
113 |
+
}
|
114 |
+
if ((string)$time_attributes['start']!=''){
|
115 |
+
$promotion_model->setTillDate('2000-01-01 '.(string)$time_attributes['end']);
|
116 |
+
$promotion_model->setIsEveryday(1);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
if ($promotion_model->getFromDate()=='0000-00-00 00:00:00'&&$promotion_model->setTillDate()=='0000-00-00 00:00:00'){
|
121 |
+
$promotion_model->setIsEveryday(0);
|
122 |
+
}
|
123 |
+
try {
|
124 |
+
$promotion_model->save();
|
125 |
+
} catch(Exception $e) {
|
126 |
+
print_r($e);
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
//temporary because of bag settings this flag
|
133 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
134 |
+
$write_data->query("update qixol_promotions_type set is_everyday=1 where from_date!='0000-00-00 00:00:00' or till_date!='0000-00-00 00:00:00'");
|
135 |
+
|
136 |
+
foreach ($xml_object->products->product as $xml_products){
|
137 |
+
//print_r($xml_products);
|
138 |
+
$attributes=$xml_products->attributes();
|
139 |
+
if (isset($xml_products->promotions)&&!isset($xml_products->promotions->promotion[0])){
|
140 |
+
$ttemp_data=$xml_products->promotions->promotion;
|
141 |
+
unset($xml_products->promotions->promotion);
|
142 |
+
$xml_products->promotions->promotion[0]=$ttemp_data;
|
143 |
+
unset($ttemp_data);
|
144 |
+
}
|
145 |
+
foreach ($xml_products->promotions->promotion as $idx_name=>$xml_promotion_data){
|
146 |
+
|
147 |
+
|
148 |
+
//if ($idx_name=='promotions'){
|
149 |
+
//foreach ($xml_promotion as $xml_promotion_data){
|
150 |
+
$xml_promotion_data_attributes=$xml_promotion_data->attributes();
|
151 |
+
$promotion_to_product_array=array();
|
152 |
+
$promotion_to_product_array['created_time']=date("Y-m-d H:i:s");
|
153 |
+
$promotion_to_product_array['update_time']=date("Y-m-d H:i:s");
|
154 |
+
//get product id
|
155 |
+
$promotion_to_product_array['product_id']=0;
|
156 |
+
$product_search_tmp = Mage::getModel('catalog/product');
|
157 |
+
if ($product_id_tmp=$product_search_tmp->getIdBySku(((string)$attributes['variantcode']!=''?(string)$attributes['variantcode']:(string)$attributes['productcode']))){
|
158 |
+
$promotion_to_product_array['product_id']=(int)$product_id_tmp;
|
159 |
+
}
|
160 |
+
//get parent_id
|
161 |
+
$promotion_to_product_array['parent_product_id']=0;
|
162 |
+
if ((string)$attributes['variantcode']!=''){
|
163 |
+
$product_search_tmp = Mage::getModel('catalog/product');
|
164 |
+
if ($product_id_tmp=$product_search_tmp->getIdBySku((string)$attributes['productcode'])){
|
165 |
+
$promotion_to_product_array['parent_product_id']=(int)$product_id_tmp;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
$promotion_to_product_array['promotion_id']=(int)$xml_promotion_data_attributes['id'];;
|
170 |
+
$promotion_to_product_array['parentsku']=((string)$attributes['variantcode']!=''?(string)$attributes['productcode']:'');
|
171 |
+
$promotion_to_product_array['sku']=((string)$attributes['variantcode']!=''?(string)$attributes['variantcode']:(string)$attributes['productcode']);
|
172 |
+
|
173 |
+
$promotion_to_product_array['requiredqty']=(isset($xml_promotion_data_attributes['requiredqty'])?(int)$xml_promotion_data_attributes['requiredqty']:0);
|
174 |
+
$promotion_to_product_array['multipleproductrestrictions']=isset($xml_promotion_data_attributes['multipleproductrestrictions'])?(int)$xml_promotion_data_attributes['multipleproductrestrictions']:0;
|
175 |
+
$promotion_has_products=Mage::getResourceSingleton('qixol/promotions');
|
176 |
+
$promotion_has_products->updatePromotionProduct($promotion_to_product_array);
|
177 |
+
}
|
178 |
+
// }
|
179 |
+
//}
|
180 |
+
|
181 |
+
}
|
182 |
+
//delete not updated simple way
|
183 |
+
$promotion_has_products=Mage::getResourceModel('qixol/promotions');
|
184 |
+
$promotion_has_products->removeOldPromotion();
|
185 |
+
$promotion_has_products->removeOldPromotedProduct();
|
186 |
+
/* $condition=$promotion_has_products->_getWriteAdapter()->quoteInto('(update_time <= ?)', "(now() - interval 1 hour)");
|
187 |
+
$promotion_has_products->_getWriteAdapter()->delete($this->getTable('promotions'), $condition);
|
188 |
+
*/
|
189 |
+
|
190 |
+
/*foreach ($active_promotions as $p_id=>$p_type){
|
191 |
+
if (!isset($new_promotions[$p_id])){
|
192 |
+
//delete
|
193 |
+
}elseif($new_promotions[$p_id]!=$p_type){
|
194 |
+
//promotion type changed ???
|
195 |
+
}
|
196 |
+
|
197 |
+
}*/
|
198 |
+
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
app/code/community/Holbi/Qixol/Model/RESTPromoService.php
ADDED
@@ -0,0 +1,357 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once ('config.php');
|
4 |
+
require_once('PromoService.php');
|
5 |
+
|
6 |
+
class RESTPromoService extends PromoService implements iPromoService
|
7 |
+
{
|
8 |
+
|
9 |
+
private function callQixolPromoRestService($method, $url, $data = false)
|
10 |
+
{
|
11 |
+
$curl = curl_init();
|
12 |
+
|
13 |
+
switch ($method)
|
14 |
+
{
|
15 |
+
case 'POST':
|
16 |
+
curl_setopt($curl, CURLOPT_POST, 1);
|
17 |
+
|
18 |
+
if ($data)
|
19 |
+
{
|
20 |
+
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
21 |
+
}
|
22 |
+
break;
|
23 |
+
|
24 |
+
case 'PUT':
|
25 |
+
curl_setopt($curl, CURLOPT_PUT, 1);
|
26 |
+
break;
|
27 |
+
|
28 |
+
default:
|
29 |
+
if ($data)
|
30 |
+
{
|
31 |
+
$url = sprintf("%s?%s", $url, http_build_query($data));
|
32 |
+
}
|
33 |
+
break;
|
34 |
+
}
|
35 |
+
|
36 |
+
// curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
37 |
+
// curl_setopt($curl, CURLOPT_USERPWD, "username:password");
|
38 |
+
|
39 |
+
curl_setopt($curl, CURLOPT_URL, $url);
|
40 |
+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
41 |
+
|
42 |
+
$result = curl_exec($curl);
|
43 |
+
|
44 |
+
curl_close($curl);
|
45 |
+
|
46 |
+
return $result;
|
47 |
+
}
|
48 |
+
|
49 |
+
private function restServiceUrl()
|
50 |
+
{
|
51 |
+
$evaluationServicesUrl = 'http://evaluation.qixolpromo.com/';
|
52 |
+
$liveServicesUrl = 'http://evaluation.qixolpromo.com/';
|
53 |
+
|
54 |
+
switch (Mage::getStoreConfig('qixol/integraion/services')) {
|
55 |
+
case 'evaluation':
|
56 |
+
$restServiceUrl = $evaluationServicesUrl;
|
57 |
+
break;
|
58 |
+
case 'live':
|
59 |
+
$restServiceUrl = $liveServicesUrl;
|
60 |
+
break;
|
61 |
+
case 'custom':
|
62 |
+
$restServiceUrl = Mage::getStoreConfig('qixol/integraion/restServiceAddress');
|
63 |
+
// TODO: check a string exists and is a valid URL?
|
64 |
+
if (substr_compare(substr($restServiceUrl, -1), '/', 0) != 0)
|
65 |
+
{
|
66 |
+
$restServiceUrl .= '/';
|
67 |
+
}
|
68 |
+
break;
|
69 |
+
default:
|
70 |
+
$restServiceUrl = $evaluationServicesUrl;
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
return $restServiceUrl;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function CustomerGroupExport($data)
|
77 |
+
{
|
78 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/import/entityvalues';
|
79 |
+
try
|
80 |
+
{
|
81 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
82 |
+
|
83 |
+
if (empty($result))
|
84 |
+
{
|
85 |
+
$returnValue->messsage = 'Stores - no response';
|
86 |
+
$returnValue->success = false;
|
87 |
+
}
|
88 |
+
else
|
89 |
+
{
|
90 |
+
$returnValue->message = $result;
|
91 |
+
$returnValue->success = true;
|
92 |
+
}
|
93 |
+
|
94 |
+
return $returnValue;
|
95 |
+
}
|
96 |
+
catch(Exception $e)
|
97 |
+
{
|
98 |
+
$returnValue->message = print_r($e->faultstring);
|
99 |
+
$returnValue->success = false;
|
100 |
+
|
101 |
+
return $returnValue;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
public function ShippingMethodsExport($data)
|
106 |
+
{
|
107 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/import/entityvalues';
|
108 |
+
try
|
109 |
+
{
|
110 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
111 |
+
|
112 |
+
if (empty($result))
|
113 |
+
{
|
114 |
+
$returnValue->messsage = 'Stores - no response';
|
115 |
+
$returnValue->success = false;
|
116 |
+
}
|
117 |
+
else
|
118 |
+
{
|
119 |
+
$returnValue->message = $result;
|
120 |
+
$returnValue->success = true;
|
121 |
+
}
|
122 |
+
|
123 |
+
return $returnValue;
|
124 |
+
}
|
125 |
+
catch(Exception $e)
|
126 |
+
{
|
127 |
+
$returnValue->message = print_r($e->faultstring);
|
128 |
+
$returnValue->success = false;
|
129 |
+
|
130 |
+
return $returnValue;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
public function CurrenciesExport($data)
|
135 |
+
{
|
136 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/import/entityvalues';
|
137 |
+
try
|
138 |
+
{
|
139 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
140 |
+
|
141 |
+
if (empty($result))
|
142 |
+
{
|
143 |
+
$returnValue->messsage = 'Stores - no response';
|
144 |
+
$returnValue->success = false;
|
145 |
+
}
|
146 |
+
else
|
147 |
+
{
|
148 |
+
$returnValue->message = $result;
|
149 |
+
$returnValue->success = true;
|
150 |
+
}
|
151 |
+
|
152 |
+
return $returnValue;
|
153 |
+
}
|
154 |
+
catch(Exception $e)
|
155 |
+
{
|
156 |
+
$returnValue->message = print_r($e->faultstring);
|
157 |
+
$returnValue->success = false;
|
158 |
+
|
159 |
+
return $returnValue;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
public function StoresExport($data)
|
164 |
+
{
|
165 |
+
// TODO: /import/entityvalues
|
166 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/import/hierarchyvalues';
|
167 |
+
try
|
168 |
+
{
|
169 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
170 |
+
|
171 |
+
if (empty($result))
|
172 |
+
{
|
173 |
+
$returnValue->messsage = 'Stores - no response';
|
174 |
+
$returnValue->success = false;
|
175 |
+
}
|
176 |
+
else
|
177 |
+
{
|
178 |
+
$returnValue->message = $result;
|
179 |
+
$returnValue->success = true;
|
180 |
+
}
|
181 |
+
return $returnValue;
|
182 |
+
}
|
183 |
+
catch(Exception $e)
|
184 |
+
{
|
185 |
+
$returnValue->message = print_r($e->faultstring);
|
186 |
+
$returnValue->success = false;
|
187 |
+
|
188 |
+
return $returnValue;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
public function ProductsExport($data)
|
193 |
+
{
|
194 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/import/products';
|
195 |
+
try
|
196 |
+
{
|
197 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
198 |
+
|
199 |
+
if (empty($result))
|
200 |
+
{
|
201 |
+
$returnValue->messsage = 'Stores - no response';
|
202 |
+
$returnValue->success = false;
|
203 |
+
}
|
204 |
+
else
|
205 |
+
{
|
206 |
+
$returnValue->message = $result;
|
207 |
+
$returnValue->success = true;
|
208 |
+
}
|
209 |
+
|
210 |
+
return $returnValue;
|
211 |
+
}
|
212 |
+
catch(Exception $e)
|
213 |
+
{
|
214 |
+
$returnValue->message = print_r($e->faultstring);
|
215 |
+
$returnValue->success = false;
|
216 |
+
|
217 |
+
return $returnValue;
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
public function PromotionsForProducts($data)
|
222 |
+
{
|
223 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/export/promotionsforproducts';
|
224 |
+
try
|
225 |
+
{
|
226 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
227 |
+
|
228 |
+
if (empty($result))
|
229 |
+
{
|
230 |
+
$returnValue->messsage = 'Stores - no response';
|
231 |
+
$returnValue->success = false;
|
232 |
+
}
|
233 |
+
else
|
234 |
+
{
|
235 |
+
$returnValue->message = $result;
|
236 |
+
$returnValue->success = true;
|
237 |
+
}
|
238 |
+
|
239 |
+
return $returnValue;
|
240 |
+
}
|
241 |
+
catch(Exception $e)
|
242 |
+
{
|
243 |
+
$returnValue->message = print_r($e->faultstring);
|
244 |
+
$returnValue->success = false;
|
245 |
+
|
246 |
+
return $returnValue;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
public function PromotionsForBaskets($data)
|
251 |
+
{
|
252 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/export/promotionsforbaskets';
|
253 |
+
try
|
254 |
+
{
|
255 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
256 |
+
|
257 |
+
if (empty($result))
|
258 |
+
{
|
259 |
+
$returnValue->messsage = 'Stores - no response';
|
260 |
+
$returnValue->success = false;
|
261 |
+
}
|
262 |
+
else
|
263 |
+
{
|
264 |
+
$returnValue->message = $result;
|
265 |
+
$returnValue->success = true;
|
266 |
+
}
|
267 |
+
|
268 |
+
return $returnValue;
|
269 |
+
}
|
270 |
+
catch(Exception $e)
|
271 |
+
{
|
272 |
+
$returnValue->message = print_r($e->faultstring);
|
273 |
+
$returnValue->success = false;
|
274 |
+
|
275 |
+
return $returnValue;
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
public function CouponCodesImport()
|
280 |
+
{
|
281 |
+
$returnValue->message = 'NOT IMPLEMENTED';
|
282 |
+
$returnValue->success = false;
|
283 |
+
return $returnValue;
|
284 |
+
}
|
285 |
+
|
286 |
+
public function BasketValidate($data)
|
287 |
+
{
|
288 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/basket/validate';
|
289 |
+
try
|
290 |
+
{
|
291 |
+
$result = $this->callQixolPromoRestService('POST', $url, $data);
|
292 |
+
|
293 |
+
if (empty($result))
|
294 |
+
{
|
295 |
+
$returnValue->messsage = 'Stores - no response';
|
296 |
+
$returnValue->success = false;
|
297 |
+
}
|
298 |
+
else
|
299 |
+
{
|
300 |
+
$returnValue->message = $result;
|
301 |
+
$returnValue->success = true;
|
302 |
+
}
|
303 |
+
|
304 |
+
return $returnValue;
|
305 |
+
}
|
306 |
+
catch(Exception $e)
|
307 |
+
{
|
308 |
+
$returnValue->message = print_r($e->faultstring);
|
309 |
+
$returnValue->success = false;
|
310 |
+
|
311 |
+
return $returnValue;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
public function CouponCodeValidate($couponCode)
|
316 |
+
{
|
317 |
+
$url = $this->restServiceUrl().'api/'.Mage::getStoreConfig('qixol/integraion/companykey').'/basket/validatecouponcode/'.$couponCode;
|
318 |
+
try
|
319 |
+
{
|
320 |
+
$result = $this->callQixolPromoRestService('POST', $url, $couponCode);
|
321 |
+
|
322 |
+
if (empty($result))
|
323 |
+
{
|
324 |
+
$returnValue->messsage = 'Stores - no response';
|
325 |
+
$returnValue->success = false;
|
326 |
+
}
|
327 |
+
else
|
328 |
+
{
|
329 |
+
$returnValue->message = $result;
|
330 |
+
$returnValue->success = true;
|
331 |
+
}
|
332 |
+
|
333 |
+
return $returnValue;
|
334 |
+
}
|
335 |
+
catch(Exception $e)
|
336 |
+
{
|
337 |
+
$returnValue->message = print_r($e->faultstring);
|
338 |
+
$returnValue->success = false;
|
339 |
+
|
340 |
+
return $returnValue;
|
341 |
+
}
|
342 |
+
}
|
343 |
+
|
344 |
+
public function RetrieveValidatedBasket($basketRef)
|
345 |
+
{
|
346 |
+
$returnValue->message = 'NOT IMPLEMENTED';
|
347 |
+
$returnValue->success = false;
|
348 |
+
return $returnValue;
|
349 |
+
}
|
350 |
+
|
351 |
+
public function BasketCheck()
|
352 |
+
{
|
353 |
+
$returnValue->message = 'NOT IMPLEMENTED';
|
354 |
+
$returnValue->success = false;
|
355 |
+
return $returnValue;
|
356 |
+
}
|
357 |
+
}
|
app/code/community/Holbi/Qixol/Model/SOAPPromoService.php
ADDED
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once ('config.php');
|
4 |
+
require_once('PromoService.php');
|
5 |
+
|
6 |
+
class SOAPPromoService extends PromoService implements iPromoService
|
7 |
+
{
|
8 |
+
|
9 |
+
private function importServiceUrl() {
|
10 |
+
$evaluationImportServicesUrl = 'http://evaluation.qixolpromo.com/ImportService.svc';
|
11 |
+
$liveImportServicesUrl = 'http://evaluation.qixolpromo.com/ImportService.svc';
|
12 |
+
|
13 |
+
switch (Mage::getStoreConfig('qixol/integraion/services')) {
|
14 |
+
case 'evaluation':
|
15 |
+
$importServiceUrl = $evaluationImportServicesUrl;
|
16 |
+
break;
|
17 |
+
case 'live':
|
18 |
+
$importServiceUrl = $liveImportServicesUrl;
|
19 |
+
break;
|
20 |
+
case 'custom':
|
21 |
+
$importServiceUrl = Mage::getStoreConfig('qixol/integraion/importManagerServiceAddress');
|
22 |
+
break;
|
23 |
+
default:
|
24 |
+
$importServiceUrl = $evaluationImportServicesUrl;
|
25 |
+
break;
|
26 |
+
}
|
27 |
+
return $importServiceUrl;
|
28 |
+
}
|
29 |
+
|
30 |
+
private function exportServiceUrl() {
|
31 |
+
$evaluationExportServicesUrl = 'http://evaluation.qixolpromo.com/ExportService.svc';
|
32 |
+
$liveExportServicesUrl = 'http://evaluation.qixolpromo.com/ExportService.svc';
|
33 |
+
|
34 |
+
switch (Mage::getStoreConfig('qixol/integraion/services')) {
|
35 |
+
case 'evaluation':
|
36 |
+
$exportServiceUrl = $evaluationExportServicesUrl;
|
37 |
+
break;
|
38 |
+
case 'live':
|
39 |
+
$exportServiceUrl = $liveExportServicesUrl;
|
40 |
+
break;
|
41 |
+
case 'custom':
|
42 |
+
$exportServiceUrl = Mage::getStoreConfig('qixol/integraion/exportManagerServiceAddress');
|
43 |
+
break;
|
44 |
+
default:
|
45 |
+
$exportServiceUrl = $evaluationExportServicesUrl;
|
46 |
+
break;
|
47 |
+
}
|
48 |
+
return $exportServiceUrl;
|
49 |
+
}
|
50 |
+
|
51 |
+
private function basketServiceUrl() {
|
52 |
+
|
53 |
+
$evaluationBasketServicesUrl = 'http://evaluation.qixolpromo.com/BasketService.svc';
|
54 |
+
$liveBasketServicesUrl = 'http://evaluation.qixolpromo.com/BaskettService.svc';
|
55 |
+
|
56 |
+
switch (Mage::getStoreConfig('qixol/integraion/services')) {
|
57 |
+
case 'evaluation':
|
58 |
+
$basketServiceUrl = $evaluationBasketServicesUrl;
|
59 |
+
break;
|
60 |
+
case 'live':
|
61 |
+
$basketServiceUrl = $liveBasketServicesUrl;
|
62 |
+
break;
|
63 |
+
case 'custom':
|
64 |
+
$basketServiceUrl = Mage::getStoreConfig('qixol/integraion/basketManagerServiceAddress');
|
65 |
+
break;
|
66 |
+
default:
|
67 |
+
$basketServiceUrl = $evaluationBasketServicesUrl;
|
68 |
+
break;
|
69 |
+
}
|
70 |
+
return $basketServiceUrl;
|
71 |
+
}
|
72 |
+
|
73 |
+
function CustomerGroupExport($data)
|
74 |
+
{
|
75 |
+
$soapclient = new soapclient($this->importServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
76 |
+
'location' => $this->importServiceUrl()));
|
77 |
+
$types_array = $soapclient->__getTypes();
|
78 |
+
$functions_array = $soapclient->__getFunctions();
|
79 |
+
|
80 |
+
try {
|
81 |
+
$result = $soapclient->__soapCall('ImportEntityAttributeValues', array('ImportEntityAttributeValues' => array('xmlToImport' => $data)));
|
82 |
+
$returnValue->message = $result->ImportEntityAttributeValuesResult;
|
83 |
+
$returnValue->success = true;
|
84 |
+
return $returnValue;
|
85 |
+
} catch (SoapFault $e) {
|
86 |
+
$returnValue->message = $e->faultstring;
|
87 |
+
$returnValue->success = false;
|
88 |
+
return $returnValue;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
function ShippingMethodsExport($data)
|
93 |
+
{
|
94 |
+
$soapclient = new soapclient($this->importServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
95 |
+
'location' => $this->importServiceUrl()));
|
96 |
+
$types_array = $soapclient->__getTypes();
|
97 |
+
$functions_array = $soapclient->__getFunctions();
|
98 |
+
try {
|
99 |
+
$result = $soapclient->__soapCall('ImportEntityAttributeValues', array('ImportEntityAttributeValues' => array('xmlToImport' => $data)));
|
100 |
+
$returnValue->message = $result->ImportEntityAttributeValuesResult;
|
101 |
+
$returnValue->success = true;
|
102 |
+
return $returnValue;
|
103 |
+
} catch (SoapFault $e) {
|
104 |
+
$returnValue->message = $e->faultstring;
|
105 |
+
$returnValue->success = false;
|
106 |
+
return $returnValue;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
function CurrenciesExport($data)
|
111 |
+
{
|
112 |
+
$soapclient = new soapclient($this->importServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
113 |
+
'location' => $this->importServiceUrl()));
|
114 |
+
$types_array = $soapclient->__getTypes();
|
115 |
+
$functions_array = $soapclient->__getFunctions();
|
116 |
+
try {
|
117 |
+
$result = $soapclient->__soapCall('ImportEntityAttributeValues', array('ImportEntityAttributeValues' => array('xmlToImport' => $data)));
|
118 |
+
$returnValue->message = $result->ImportEntityAttributeValuesResult;
|
119 |
+
$returnValue->success = true;
|
120 |
+
return $returnValue;
|
121 |
+
} catch (SoapFault $e) {
|
122 |
+
$returnValue->message = $e->faultstring;
|
123 |
+
$returnValue->success = false;
|
124 |
+
return $returnValue;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
function StoresExport($data)
|
129 |
+
{
|
130 |
+
$soapclient = new soapclient($this->importServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
131 |
+
'location' => $this->importServiceUrl()));
|
132 |
+
$types_array = $soapclient->__getTypes();
|
133 |
+
$functions_array = $soapclient->__getFunctions();
|
134 |
+
try {
|
135 |
+
$result = $soapclient->__soapCall('ImportEntityAttributeValues', array('ImportEntityAttributeValues' => array('xmlToImport' => $data)));
|
136 |
+
$returnValue->message = $result->ImportEntityAttributeValuesResult;
|
137 |
+
$returnValue->success = true;
|
138 |
+
return $returnValue;
|
139 |
+
} catch (SoapFault $e) {
|
140 |
+
$returnValue->message = $e->faultstring;
|
141 |
+
$returnValue->success = false;
|
142 |
+
return $returnValue;
|
143 |
+
}
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
function ProductsExport($data)
|
148 |
+
{
|
149 |
+
$soapclient = new soapclient($this->importServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
150 |
+
'location' => $this->importServiceUrl()));
|
151 |
+
$types_array = $soapclient->__getTypes();
|
152 |
+
$functions_array = $soapclient->__getFunctions();
|
153 |
+
try {
|
154 |
+
$result = $soapclient->__soapCall('ImportProducts', array('ImportProducts' => array('xmlToImport' => $data)));
|
155 |
+
$returnValue->message = $result->ImportProductsResult;
|
156 |
+
$returnValue->success = true;
|
157 |
+
return $returnValue;
|
158 |
+
} catch (SoapFault $e) {
|
159 |
+
$returnValue->message = $e->faultstring;
|
160 |
+
$returnValue->success = false;
|
161 |
+
return $returnValue;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
public function PromotionsForProducts($data)
|
166 |
+
{
|
167 |
+
$soapclient = new soapclient($this->exportServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
168 |
+
'location' => $this->exportServiceUrl()));
|
169 |
+
try {
|
170 |
+
$result = $soapclient->__soapCall('RetrievePromotionsForProducts', array('RetrievePromotionsForProducts' => array('xmlExportRequest' => $data)));
|
171 |
+
$returnValue->message = $result->RetrievePromotionsForProductsResult;
|
172 |
+
$returnValue->success = true;
|
173 |
+
return $returnValue;
|
174 |
+
} catch (SoapFault $e) {
|
175 |
+
$returnValue->message = $e->faultstring;
|
176 |
+
$returnValue->success = false;
|
177 |
+
return $returnValue;
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
public function PromotionsForBaskets($data)
|
182 |
+
{
|
183 |
+
$soapclient = new soapclient($this->exportServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
184 |
+
'location' => $this->exportServiceUrl()));
|
185 |
+
|
186 |
+
try
|
187 |
+
{
|
188 |
+
$result = $soapclient->__soapCall('RetrievePromotionsForBaskets', array('RetrievePromotionsForBaskets' => array('xmlExportRequest' => $data)));
|
189 |
+
$returnValue->message = $result->RetrievePromotionsForBasketsResult;
|
190 |
+
$returnValue->success = true;
|
191 |
+
return $returnValue;
|
192 |
+
}
|
193 |
+
catch (SoapFault $e)
|
194 |
+
{
|
195 |
+
$returnValue->message = $e->faultstring;
|
196 |
+
$returnValue->success = false;
|
197 |
+
return $returnValue;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
public function CouponCodesImport()
|
202 |
+
{
|
203 |
+
$returnValue->message = 'NOT IMPLEMENTED';
|
204 |
+
$returnValue->success = false;
|
205 |
+
return $returnValue;
|
206 |
+
}
|
207 |
+
|
208 |
+
public function BasketValidate($data)
|
209 |
+
{
|
210 |
+
$soapclient = new soapclient($this->basketServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
211 |
+
'location' => $this->basketServiceUrl()));
|
212 |
+
|
213 |
+
try
|
214 |
+
{
|
215 |
+
$result = $soapclient->__soapCall('ValidateBasket', array('ValidateBasket' => array('basketXml' => $data)));
|
216 |
+
$returnValue->message = $result->ValidateBasketResult;
|
217 |
+
$returnValue->success = true;
|
218 |
+
return $returnValue;
|
219 |
+
} catch (SoapFault $e) {
|
220 |
+
$message = $e->faultstring . '\n';
|
221 |
+
$message .= "REQUEST:\n" . $soapclient->__getLastRequestHeaders();
|
222 |
+
$message .= $soapclient->__getLastRequest() . "\n";
|
223 |
+
$message .= "RESPONSE:\n" . $soapclient->__getLastResponseHeaders();
|
224 |
+
$message .= $soapclient->__getLastResponse() . "\n";
|
225 |
+
|
226 |
+
$returnValue->message = $message;
|
227 |
+
$returnValue->success = false;
|
228 |
+
return $returnValue;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
public function CouponCodeValidate($couponCode)
|
233 |
+
{
|
234 |
+
$soapclient_coupon = new soapclient($this->basketServiceUrl().'?singleWsdl', array( 'trace' => 1,
|
235 |
+
'location' => $this->basketServiceUrl()));
|
236 |
+
|
237 |
+
try
|
238 |
+
{
|
239 |
+
$soapclient_coupon->__soapCall('ValidateCouponCode', array('ValidateCouponCode' =>
|
240 |
+
array('companyKey' =>
|
241 |
+
Mage::getStoreConfig('qixol/integraion/companykey'),
|
242 |
+
'couponCode' => $couponCode)));
|
243 |
+
$returnValue->message = $result->ValidateCouponCodeResult;
|
244 |
+
$returnValue->success = true;
|
245 |
+
return $returnValue;
|
246 |
+
} catch (SoapFault $e) {
|
247 |
+
//$message = $e->faultstring . '\n';
|
248 |
+
//$message .= "REQUEST:\n" . $soapclient->__getLastRequestHeaders();
|
249 |
+
//$message .= $soapclient->__getLastRequest() . "\n";
|
250 |
+
//$message .= "RESPONSE:\n" . $soapclient->__getLastResponseHeaders();
|
251 |
+
//$message .= $soapclient->__getLastResponse() . "\n";
|
252 |
+
|
253 |
+
$returnValue->message = $message;
|
254 |
+
$returnValue->success = false;
|
255 |
+
return $returnValue;
|
256 |
+
}
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
public function RetrieveValidatedBasket($basketRef)
|
261 |
+
{
|
262 |
+
$returnValue->message = 'NOT IMPLEMENTED';
|
263 |
+
$returnValue->success = false;
|
264 |
+
return $returnValue;
|
265 |
+
}
|
266 |
+
|
267 |
+
public function BasketCheck()
|
268 |
+
{
|
269 |
+
$returnValue->message = 'NOT IMPLEMENTED';
|
270 |
+
$returnValue->success = false;
|
271 |
+
return $returnValue;
|
272 |
+
}
|
273 |
+
}
|
app/code/community/Holbi/Qixol/Model/Shippingmap.php
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Shippingmap extends Mage_Core_Model_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/shippingmap', "shipping_name");
|
7 |
-
}
|
8 |
-
|
9 |
-
public function getOptionArray(){
|
10 |
-
$hlp = Mage::helper('qixol');
|
11 |
-
$collections=$this->getCollection();
|
12 |
-
$list_return=array();
|
13 |
-
foreach ($collections as $item){
|
14 |
-
$list_return[]=array(
|
15 |
-
'value' => (string)$item->getShippingName(),
|
16 |
-
'label' => $hlp->__((string)$item->getShippingName())
|
17 |
-
);
|
18 |
-
}
|
19 |
-
return $list_return;
|
20 |
-
}
|
21 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Shippingmap extends Mage_Core_Model_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/shippingmap', "shipping_name");
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getOptionArray(){
|
10 |
+
$hlp = Mage::helper('qixol');
|
11 |
+
$collections=$this->getCollection();
|
12 |
+
$list_return=array();
|
13 |
+
foreach ($collections as $item){
|
14 |
+
$list_return[]=array(
|
15 |
+
'value' => (string)$item->getShippingName(),
|
16 |
+
'label' => $hlp->__((string)$item->getShippingName())
|
17 |
+
);
|
18 |
+
}
|
19 |
+
return $list_return;
|
20 |
+
}
|
21 |
}
|
app/code/community/Holbi/Qixol/Model/Sinch.php
CHANGED
@@ -1,1303 +1,1311 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
//ini_set('memory_limit','256M');
|
4 |
-
require_once ('config.php');
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
private $
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
if(
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
$
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$this->
|
41 |
-
$this->
|
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 |
-
|
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 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
$
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
$
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
//$promotion_new_xml='<response><promotions><promotion id="106" type="BUNDLE" yourref="QIXOL-2" bundleprice="50.00"><name>Qixol 2</name><displaytext>Buy three test config products for 50</displaytext></promotion><promotion id="107" type="BOGOF" discountpercent="50.00"><name>Qixol 3a</name><displaytext>test config product 4 - BOGOF</displaytext></promotion><promotion id="108" type="BOGOF" discountpercent="50.00"><name>Qixol 3b</name><displaytext>Test Config product 5 BOGOF</displaytext></promotion><promotion id="109" type="BOGOR" discountpercent="50.00"><name>Qixol 4a</name><displaytext>test config product 6 BOGOR</displaytext></promotion><promotion id="110" type="BOGOR" discountpercent="2.00"><name>Qixol 4b</name><displaytext>test config product 7 BOGOR</displaytext></promotion><promotion id="111" type="BOGOR" discountpercent="24.99"><name>Qixol 4c</name><displaytext>Buy two "Test config product 8" get the second for 24.99</displaytext></promotion><promotion id="112" type="DEAL"><name>Qixol 5a</name><displaytext>Buy a small green, small black and small white product, get the cheapest free</displaytext></promotion><promotion id="113" type="DEAL"><name>Qixol 5b</name><displaytext>Buy a medium red, medium white and medium black product for 19.99</displaytext></promotion><promotion id="116" type="FREEPRODUCT"><name>Qixol 7a</name><displaytext>Buy "test product 1 / Test1_01" get "test product 2 / 123456" free (applies ONCE only)</displaytext></promotion><promotion id="117" type="FREEPRODUCT"><name>Qixol 7b</name><displaytext>Buy "test product 4 / test_4" get "test product 5 / test_5" free for each "test product 4"</displaytext></promotion><promotion id="118" type="ISSUECOUPON"><name>Qixol 8a</name><displaytext>Buy "testing" (test2_01) get a coupon code</displaytext></promotion><promotion id="121" type="PRODUCTSREDUCTION" discountpercent="30.00"><name>Qixol 10</name><displaytext>Use an issued coupon, get 30% off any Size = L product</displaytext></promotion></promotions><products><product productcode="config_11"/><product productcode="config_11" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="config_11" variantcode="test2_01_03"/><product productcode="config_11" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test3_3"/><product productcode="config_11" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test7_7"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_11" variantcode="test8_8"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="config_10"/><product productcode="config_10" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="config_10" variantcode="test2_01_03"/><product productcode="config_10" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_10" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_10" variantcode="test3_3"/><product productcode="config_10" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9"/><product productcode="config_9" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test7_7"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_9" variantcode="test8_8"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="test8_8"/><product productcode="test7_7"/><product productcode="config_8"><promotions><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test2_01_03"><promotions><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_8" variantcode="test3_3"><promotions><promotion id="111" requiredqty="2"/></promotions></product><product productcode="config_7"><promotions><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test2_01_03"><promotions><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test3_3"><promotions><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_7" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="110" requiredqty="2"/></promotions></product><product productcode="config_6"><promotions><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_6" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="109" requiredqty="2"/></promotions></product><product productcode="config_5"><promotions><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test2_01_03"><promotions><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test3_3"><promotions><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test4_4"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="test5_5"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="config_5" variantcode="Test6_6"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="108" requiredqty="2"/></promotions></product><product productcode="Test6_6"/><product productcode="test5_5"/><product productcode="test4_4"/><product productcode="test3_3"/><product productcode="config_4"><promotions><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test2_01_03"><promotions><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test1_1"><promotions><promotion id="112" requiredqty="1" multipleproductrestrictions="1"/><promotion id="107" requiredqty="2"/></promotions></product><product productcode="config_4" variantcode="test2_2"><promotions><promotion id="113" requiredqty="1" multipleproductrestrictions="1"/><promotion id="107" requiredqty="2"/></promotions></product><product productcode="test2_2"/><product productcode="test1_1"/><product productcode="config_3"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_3" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_3" variantcode="test2_01_03"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_2"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_2" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_2" variantcode="test2_01_03"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_1"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_1" variantcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="config_1" variantcode="test2_01_03"><promotions><promotion id="106" requiredqty="1" multipleproductrestrictions="1"/></promotions></product><product productcode="test_5"/><product productcode="test_4"><promotions><promotion id="117" requiredqty="1"/></promotions></product><product productcode="test_3"/><product productcode="123456"/><product productcode="test2_01_03"/><product productcode="test2_01_01"><promotions><promotion id="121" requiredqty="1"/></promotions></product><product productcode="test2_01"><promotions><promotion id="118" requiredqty="1"/></promotions></product><product productcode="test2_01" variantcode="test2_01_01"><promotions><promotion id="118" requiredqty="1"/><promotion id="121" requiredqty="1"/></promotions></product><product productcode="test2_01" variantcode="test2_01_03"><promotions><promotion id="118" requiredqty="1"/></promotions></product><product productcode="Test1_01"><promotions><promotion id="116" requiredqty="1"/></promotions></product></products><summary result="true"/></response>';
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
$
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
$
|
895 |
-
$
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
}
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
$
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
$
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
$
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
$
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
$
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
$
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
$read_data
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
}
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
$messages=array('id'
|
1247 |
-
}
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
$
|
1264 |
-
|
1265 |
-
|
1266 |
-
$
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//ini_set('memory_limit','256M');
|
4 |
+
require_once ('config.php');
|
5 |
+
require_once('RESTPromoService.php');
|
6 |
+
require_once('SOAPPromoService.php');
|
7 |
+
|
8 |
+
class Holbi_Qixol_Model_Sinch extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
private $process_export_status_table;
|
11 |
+
private $process_export_status_id=array();
|
12 |
+
private $export_poducts_statistic_table;
|
13 |
+
private $export_poducts_statistic_id=array();
|
14 |
+
private $export_by = 'MANUAL';
|
15 |
+
private $promoService;
|
16 |
+
|
17 |
+
function __construct()
|
18 |
+
{
|
19 |
+
$this->process_export_status_table=Mage::getSingleton('core/resource')->getTableName('qixol_process_export_status_table');
|
20 |
+
$this->_logFile=LOG_FILE;
|
21 |
+
$this->pushLog("constructor");
|
22 |
+
|
23 |
+
if (Mage::getStoreConfig('qixol/integraion/serviceProtocol') == 'REST') {
|
24 |
+
$this->promoService = new RESTPromoService();
|
25 |
+
} else {
|
26 |
+
$this->promoService = new SOAPPromoService();
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
function pushLog($log){
|
31 |
+
|
32 |
+
if(trim($log)!=''){
|
33 |
+
Mage::log($log, null, $this->_logFile);
|
34 |
+
//store in some log table if required
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
function cron_run_export(){//call from cron product export
|
39 |
+
$this->pushLog("Start export from cron:".date("Y-m-d H:i:s"));
|
40 |
+
$this->export_by='CRON';
|
41 |
+
$this->run_export_qixolData();
|
42 |
+
$this->pushLog("Finish export from cron".date("Y-m-d H:i:s"));
|
43 |
+
}
|
44 |
+
|
45 |
+
function cron_run_import(){//call from cron product export
|
46 |
+
$this->pushLog("Start export from cron:".date("Y-m-d H:i:s"));
|
47 |
+
$this->export_by='CRON';
|
48 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled')>0){
|
49 |
+
$this->run_import_promotionsForProducts();
|
50 |
+
$this->run_import_promotionsForBaskets();
|
51 |
+
}
|
52 |
+
$this->pushLog("Finish export from cron".date("Y-m-d H:i:s"));
|
53 |
+
}
|
54 |
+
|
55 |
+
function getDataOfLatestExport(){
|
56 |
+
$_status=array();
|
57 |
+
//return only first erroror or all success, or notjhing
|
58 |
+
$tmp_data=$this->getExportStatus('customers');
|
59 |
+
if ($tmp_data['id']>0&&$tmp_data['message']=='error'){
|
60 |
+
$_status=array('last_message'=>'error','export_what'=>'Customers','status_export_message'=>$tmp_data['extended_message']);
|
61 |
+
return $_status;
|
62 |
+
}
|
63 |
+
elseif($tmp_data['id']>0) $_status=array('last_message'=>'success','export_what'=>'Customers');
|
64 |
+
|
65 |
+
$tmp_data=$this->getExportStatus('delivery');
|
66 |
+
if ($tmp_data['id']>0&&$tmp_data['message']=='error'){
|
67 |
+
$_status=array('last_message'=>'error','export_what'=>'Delivery','status_export_message'=>$tmp_data['extended_message']);
|
68 |
+
}
|
69 |
+
elseif ($tmp_data['id']>0) $_status=array('last_message'=>'success','export_what'=>'Delivery');
|
70 |
+
|
71 |
+
$tmp_data=$this->getExportStatus('products');
|
72 |
+
if ($tmp_data['id']>0&&$tmp_data['message']=='error'){
|
73 |
+
$_status=array('last_message'=>'error','export_what'=>'Products','status_export_message'=>$tmp_data['extended_message']);
|
74 |
+
}
|
75 |
+
elseif ($tmp_data['id']>0) $_status=array('last_message'=>'success','export_what'=>'Customers');
|
76 |
+
|
77 |
+
$tmp_data=$this->getExportStatus('currency');
|
78 |
+
if ($tmp_data['id']>0&&$tmp_data['message']=='error'){
|
79 |
+
$_status=array('last_message'=>'error','export_what'=>'Currency','status_export_message'=>$tmp_data['extended_message']);
|
80 |
+
}
|
81 |
+
elseif ($tmp_data['id']>0) $_status=array('last_message'=>'success','export_what'=>'Currency');
|
82 |
+
|
83 |
+
$tmp_data=$this->getExportStatus('store');
|
84 |
+
if ($tmp_data['id']>0&&$tmp_data['message']=='error'){
|
85 |
+
$_status=array('last_message'=>'error','export_what'=>'Store','status_export_message'=>$tmp_data['extended_message']);
|
86 |
+
}
|
87 |
+
elseif ($tmp_data['id']>0) $_status=array('last_message'=>'success','export_what'=>'Store');
|
88 |
+
//disabled ad duplicate now functionality of satat
|
89 |
+
/*$query="SELECT
|
90 |
+
*
|
91 |
+
FROM ".$this->export_poducts_statistic_table."
|
92 |
+
ORDER BY export_id DESC LIMIT 1";
|
93 |
+
$read_data = Mage::getSingleton('core/resource')->getConnection('core_read');
|
94 |
+
// now $write is an instance of Zend_Db_Adapter_Abstract
|
95 |
+
$readresult=$read_data->query($query);
|
96 |
+
$_status = $readresult->fetch();*/
|
97 |
+
return $_status;
|
98 |
+
}
|
99 |
+
|
100 |
+
function run_export(){
|
101 |
+
$this->run_export_qixolData();
|
102 |
+
echo 'done';
|
103 |
+
}
|
104 |
+
|
105 |
+
function run_import(){
|
106 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0){
|
107 |
+
return;
|
108 |
+
}
|
109 |
+
$this->run_import_promotionsForProducts();
|
110 |
+
$this->run_import_promotionsForBaskets();
|
111 |
+
echo 'done';
|
112 |
+
}
|
113 |
+
|
114 |
+
function run_processOrder($cart){
|
115 |
+
global $_SESSION;
|
116 |
+
return $this->run_ImportCart($cart,true);// set true to confirm cart(process cart)
|
117 |
+
}
|
118 |
+
|
119 |
+
function run_ImportCart($cart,$set_confirmed=false){
|
120 |
+
global $_SESSION;
|
121 |
+
$_SESSION['inside_request']=time();
|
122 |
+
|
123 |
+
$item_id=0;
|
124 |
+
$data_products='';
|
125 |
+
$coupons_applyed='';
|
126 |
+
$customer_groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
|
127 |
+
if ($customer_groupId > 0)
|
128 |
+
{
|
129 |
+
$customergroup = Mage::getModel('customer/group')->load($customer_groupId);
|
130 |
+
$customergroupName=$customergroup->getCode($customergroup);
|
131 |
+
}
|
132 |
+
else
|
133 |
+
{
|
134 |
+
$customergroupName='NOT LOGGED IN';
|
135 |
+
}
|
136 |
+
|
137 |
+
foreach ($cart->getAllVisibleItems() as $item)
|
138 |
+
{
|
139 |
+
$item_id++;
|
140 |
+
//getProduct()->getIsVirtual()
|
141 |
+
$data_products.='<item id="'.$item->getId()/*$item_id*/.'" ';
|
142 |
+
if ($item->getProductType()=='configurable'){
|
143 |
+
//$item->getOptionByCode('simple_product')->getValue();
|
144 |
+
$product_search_tmp = Mage::getModel('catalog/product')->load($item->getProductId());
|
145 |
+
$data_products.='productcode="'.$product_search_tmp->getSku().'" variantcode="'.$item->getSku().'"';
|
146 |
+
//print_r($item->_getData('product'));
|
147 |
+
}/*else if ($item->getProductType()=='grouped'){
|
148 |
+
//do not apply now
|
149 |
+
}else if ($item->getProductType()=='bundle'){
|
150 |
+
//do not apply now
|
151 |
+
}*/else { //simple
|
152 |
+
$data_products.=' productcode="'.$item->getSku().'" variantcode="" ';
|
153 |
+
}
|
154 |
+
$data_products.=' barcode="" quantity="'.$item->getQty().'" price="'.$item->getPrice().'" ></item>';
|
155 |
+
//print_r(Zend_Debug::dump($item->debug()));
|
156 |
+
|
157 |
+
//print_r(Zend_Debug::dump($item->debug()));
|
158 |
+
//echo $data_products."<br>\n";
|
159 |
+
}
|
160 |
+
|
161 |
+
//delivery methid if exists and delivery price....
|
162 |
+
$shipping_method_exists=$cart->getShippingAddress()->getShippingMethod();
|
163 |
+
$shipping_price_exists=0;
|
164 |
+
$product_to_enter_in_cart=array();
|
165 |
+
if ($shipping_method_exists!='')
|
166 |
+
{
|
167 |
+
$shipping_price_exists=$cart->getShippingAddress()->getShippingAmount();
|
168 |
+
if ($shipping_price_exists==0)
|
169 |
+
{//somethimes returns zero
|
170 |
+
// sometimes magento returning shipping method but not returning correct price
|
171 |
+
//searching price for method
|
172 |
+
$address = $cart->getShippingAddress();
|
173 |
+
$rates = $address->collectShippingRates()
|
174 |
+
->getGroupedAllShippingRates();
|
175 |
+
foreach ($rates as $carrier)
|
176 |
+
{
|
177 |
+
foreach ($carrier as $rate)
|
178 |
+
{
|
179 |
+
if ($rate->getCode()==$shipping_method_exists)
|
180 |
+
{
|
181 |
+
$shipping_price_exists=$rate->getPrice();
|
182 |
+
break;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
|
190 |
+
if (isset($_SESSION['qixol_quoted_items']['coupons'])&&count($_SESSION['qixol_quoted_items']['coupons'])){
|
191 |
+
$coupons_applyed.='<coupons>';
|
192 |
+
foreach ($_SESSION['qixol_quoted_items']['coupons'] as $entered_coupons=>$tmp_val){
|
193 |
+
if ((bool)$tmp_val['issued']==false)
|
194 |
+
$coupons_applyed.='<coupon code="'.trim($entered_coupons).'"/>';
|
195 |
+
}
|
196 |
+
$coupons_applyed.='</coupons>';
|
197 |
+
}
|
198 |
+
|
199 |
+
//get mapping
|
200 |
+
// TODO: this conversion from data to array happens in lots of places - move it to the model?
|
201 |
+
$list_customer_map_names=Mage::getModel('qixol/Customergrouspmap')->getCollection();
|
202 |
+
$list_customer_integration_codes=array();
|
203 |
+
foreach ($list_customer_map_names as $list_map)
|
204 |
+
{
|
205 |
+
$list_customer_integration_codes[$list_map->getCustomerGroupName()]=$list_map->getIntegrationCode();
|
206 |
+
}
|
207 |
+
// end mapping array
|
208 |
+
|
209 |
+
if (isset($list_customer_integration_codes[$customergroupName]))
|
210 |
+
{
|
211 |
+
$customergroupName=$list_customer_integration_codes[$customergroupName];
|
212 |
+
}
|
213 |
+
|
214 |
+
//get mapping
|
215 |
+
$list_store_integration_codes=Mage::getModel('qixol/Storesmap')->getCollection();
|
216 |
+
|
217 |
+
$list_store_integration_codes_exists=array();
|
218 |
+
|
219 |
+
foreach ($list_store_integration_codes as $list_map)
|
220 |
+
{
|
221 |
+
$list_store_integration_codes_exists[$list_map->getWebsite()][$list_map->getStoreGroup()][$list_map->getStoreName()]=$list_map->getIntegrationCode();
|
222 |
+
}
|
223 |
+
// end mapping array
|
224 |
+
|
225 |
+
//get mapping
|
226 |
+
$list_shipping_map_names=Mage::getModel('qixol/Shippingmap')->getCollection();
|
227 |
+
|
228 |
+
$list_shipping_integration_codes=array();
|
229 |
+
|
230 |
+
foreach ($list_shipping_map_names as $list_map)
|
231 |
+
{
|
232 |
+
$list_shipping_integration_codes[$list_map->getCarrier()][$list_map->getStoreGroup()][$list_map->getShippingName()]=$list_map->getIntegrationCode();
|
233 |
+
}
|
234 |
+
// end mapping array
|
235 |
+
|
236 |
+
$store_integration_code = $list_store_integration_codes_exists[Mage::app()->getStore()->getWebsite()->getName()][Mage::app()->getStore()->getGroup()->getName()][Mage::app()->getStore()->getName()];
|
237 |
+
|
238 |
+
if ($data_products!='')
|
239 |
+
{
|
240 |
+
//echo "call promotions";
|
241 |
+
$basketTotal = $cart->getSubtotal();
|
242 |
+
if ($shipping_price_exists > 0)
|
243 |
+
{
|
244 |
+
$basketTotal += (float)$shipping_price_exists;
|
245 |
+
}
|
246 |
+
$basket = '<basket id="';
|
247 |
+
//$basket .= /*Mage::getSingleton("core/session")->getEncryptedSessionId();*/
|
248 |
+
$basket .= $_SESSION['qixol_quoted_items']['cart_session_id'];
|
249 |
+
$basket .= '" companykey="';
|
250 |
+
$basket .= Mage::getStoreConfig('qixol/integraion/companykey');
|
251 |
+
$basket .= '" baskettotal="';
|
252 |
+
$basket .= $basketTotal;
|
253 |
+
$basket .= '" basketdate="';
|
254 |
+
$basket .= date("Y-m-d\TH:i:s",strtotime("+ 1 DAY"));
|
255 |
+
$basket .= '" channel="';
|
256 |
+
$basket .= Mage::app()->getStore()->getWebsite()->getName();
|
257 |
+
$basket .= '" storegroup="';
|
258 |
+
$basket .= Mage::app()->getStore()->getGroup()->getName();
|
259 |
+
$basket .= '" store="';
|
260 |
+
if (!empty($store_integration_code))
|
261 |
+
{
|
262 |
+
$basket .= $store_integration_code;
|
263 |
+
}
|
264 |
+
else
|
265 |
+
{
|
266 |
+
$basket .= Mage::app()->getStore()->getName();
|
267 |
+
}
|
268 |
+
$basket .= '"';
|
269 |
+
|
270 |
+
// /*Mage::getStoreConfig('qixol/syhchronized/channel')*/.
|
271 |
+
if ($shipping_method_exists != '')
|
272 |
+
{
|
273 |
+
$basket .= ' deliverymethod="';
|
274 |
+
$basket .= $shipping_method_exists;
|
275 |
+
$basket .= '"';
|
276 |
+
}
|
277 |
+
|
278 |
+
if ($shipping_price_exists > 0)
|
279 |
+
{
|
280 |
+
$basket .= ' deliveryprice="';
|
281 |
+
$basket .= $shipping_price_exists;
|
282 |
+
$basket .= '"';
|
283 |
+
}
|
284 |
+
|
285 |
+
$basket .= ' customergroup="';
|
286 |
+
$basket .= $customergroupName;
|
287 |
+
$basket .= '"';
|
288 |
+
|
289 |
+
$basket .= ' currencycode="';
|
290 |
+
$basket .= Mage::app()->getStore()->getCurrentCurrencyCode();
|
291 |
+
$basket .= '"';
|
292 |
+
|
293 |
+
if ($set_confirmed)
|
294 |
+
{
|
295 |
+
$basket .= ' confirmed="true"';
|
296 |
+
}
|
297 |
+
|
298 |
+
$basket .= '>';
|
299 |
+
|
300 |
+
$basket .= $coupons_applyed;
|
301 |
+
|
302 |
+
$basket .= '<items>';
|
303 |
+
$basket .= $data_products;
|
304 |
+
$basket .= '</items></basket>';
|
305 |
+
|
306 |
+
error_log($basket);
|
307 |
+
$result = $this->promoService->BasketValidate($basket);
|
308 |
+
error_log($result->message);
|
309 |
+
if ($result->success)
|
310 |
+
{
|
311 |
+
$xml_shopping_cart_validated = $result->message;
|
312 |
+
$new_cart_structure=array();
|
313 |
+
if (strlen($xml_shopping_cart_validated)>10)
|
314 |
+
{
|
315 |
+
$xml_object = simplexml_load_string($xml_shopping_cart_validated);
|
316 |
+
|
317 |
+
$attributes_cart=$xml_object->attributes();
|
318 |
+
$new_cart_structure['cart_data']=array();
|
319 |
+
$new_cart_structure['cart_data']['id']=(isset($attributes_cart['id'])?(string)$attributes_cart['id']:0);
|
320 |
+
$new_cart_structure['cart_data']['manualdiscount']=(isset($attributes_cart['manualdiscount'])?(float)$attributes_cart['manualdiscount']:0);
|
321 |
+
$new_cart_structure['cart_data']['basketdiscount']=(isset($attributes_cart['basketdiscount'])?(float)$attributes_cart['basketdiscount']:0);
|
322 |
+
$new_cart_structure['cart_data']['linestotaldiscount']=(isset($attributes_cart['linestotaldiscount'])?(float)$attributes_cart['linestotaldiscount']:0);
|
323 |
+
$new_cart_structure['cart_data']['totaldiscount']=(isset($attributes_cart['totaldiscount'])?(float)$attributes_cart['totaldiscount']:0);
|
324 |
+
$new_cart_structure['cart_data']['baskettotal']=(isset($attributes_cart['baskettotal'])?(float)$attributes_cart['baskettotal']:0);
|
325 |
+
$new_cart_structure['cart_data']['originalbaskettotal']=(isset($attributes_cart['originalbaskettotal'])?(float)$attributes_cart['originalbaskettotal']:0);
|
326 |
+
$new_cart_structure['cart_data']['deliverymanualdiscount']=(isset($attributes_cart['deliverymanualdiscount'])?(float)$attributes_cart['deliverymanualdiscount']:0);
|
327 |
+
$new_cart_structure['cart_data']['deliveryprice']=(isset($attributes_cart['deliveryprice'])?(float)$attributes_cart['deliveryprice']:0);
|
328 |
+
$new_cart_structure['cart_data']['deliverypromotiondiscount']=(isset($attributes_cart['deliverypromotiondiscount'])?(float)$attributes_cart['deliverypromotiondiscount']:0);
|
329 |
+
$new_cart_structure['cart_data']['deliverytotaldiscount']=(isset($attributes_cart['deliverytotaldiscount'])?(float)$attributes_cart['deliverytotaldiscount']:0);
|
330 |
+
$new_cart_structure['cart_data']['deliveryoriginalprice']=(isset($attributes_cart['deliveryoriginalprice'])?(float)$attributes_cart['deliveryoriginalprice']:0);
|
331 |
+
|
332 |
+
|
333 |
+
if ($xml_object instanceof SimpleXMLElement)
|
334 |
+
{
|
335 |
+
foreach ($xml_object as $xml_root_key=>$xml_object_sub)
|
336 |
+
{
|
337 |
+
if ($xml_root_key=='items')
|
338 |
+
{
|
339 |
+
$new_cart_structure['items']=array();
|
340 |
+
foreach ($xml_object_sub as $item_key=>$xml_items_sub)
|
341 |
+
{
|
342 |
+
$item_attributes=$xml_items_sub->attributes();
|
343 |
+
|
344 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]=array();
|
345 |
+
|
346 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['quoteid']=(int)$item_attributes['id'];
|
347 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['productcode']=(isset($item_attributes['productcode'])?(string)$item_attributes['productcode']:'');
|
348 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['variantcode']=(isset($item_attributes['variantcode'])?(string)$item_attributes['variantcode']:'');
|
349 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['price']=(isset($item_attributes['price'])?(float)$item_attributes['price']:0.0);
|
350 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['manualdiscount']=(isset($item_attributes['manualdiscount'])?(float)$item_attributes['manualdiscount']:0);
|
351 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['quantity']=(isset($item_attributes['quantity'])?(float)$item_attributes['quantity']:0);
|
352 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['linepromotiondiscount']=(isset($item_attributes['linepromotiondiscount'])?(float)$item_attributes['linepromotiondiscount']:0);
|
353 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['totaldiscount']=(isset($item_attributes['totaldiscount'])?(float)$item_attributes['totaldiscount']:0);
|
354 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['originalprice']=(isset($item_attributes['originalprice'])?(float)$item_attributes['originalprice']:0);
|
355 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['originalquantity']=(isset($item_attributes['originalquantity'])?(float)$item_attributes['originalquantity']:0);
|
356 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['originalamount']=(isset($item_attributes['originalamount'])?(float)$item_attributes['originalamount']:0);
|
357 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['appliedpromotioncount']=(isset($item_attributes['appliedpromotioncount'])?(float)$item_attributes['appliedpromotioncount']:0);
|
358 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['isdelivery']=(isset($item_attributes['isdelivery'])&&strtolower((string)$item_attributes['isdelivery'])=='true'?true:false);
|
359 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['totalissuedpoints']=(isset($item_attributes['totalissuedpoints'])?(int)$item_attributes['totalissuedpoints']:0);
|
360 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['splitfromlineid']=(isset($item_attributes['splitfromlineid'])?(int)$item_attributes['splitfromlineid']:0);
|
361 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['alwaysexcluded']=(isset($item_attributes['alwaysexcluded'])?(int)$item_attributes['alwaysexcluded']:0);
|
362 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['generated']=(isset($item_attributes['generated'])&&strtolower($item_attributes['generated'])=='true'?(true):false);
|
363 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['appliedpromotioncount']=(isset($item_attributes['appliedpromotioncount'])?(float)$item_attributes['appliedpromotioncount']:0);
|
364 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['description']=(isset($xml_items_sub->description)?(string)$xml_items_sub->description:'');
|
365 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['data']['lineamount']=(isset($item_attributes['lineamount'])?(float)$item_attributes['lineamount']:0);
|
366 |
+
|
367 |
+
//get cart item by cart item iD returned from validation
|
368 |
+
|
369 |
+
$item_not_found=true;
|
370 |
+
foreach ($cart->getAllVisibleItems() as $item)
|
371 |
+
{
|
372 |
+
if ($item->getId()==(int)$item_attributes['id'])
|
373 |
+
{
|
374 |
+
$item_not_found=false;
|
375 |
+
$cart_item=$item;
|
376 |
+
unset($product_search_tmp_sku);
|
377 |
+
if ($cart_item->getProductType()=='configurable')
|
378 |
+
{
|
379 |
+
$product_search_tmp = Mage::getModel('catalog/product')->load($cart_item->getProductId());
|
380 |
+
$product_search_tmp_sku=$product_search_tmp->getSku();
|
381 |
+
}
|
382 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['updated_qty']=false;
|
383 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['updated_price']=false;
|
384 |
+
$product_updated=false;
|
385 |
+
//echo "/".$cart_item->getProductType()."||".(string)$item_attributes['productcode']."==".$product_search_tmp_sku."+".(string)$item_attributes['variantcode']."==".$cart_item->getSku()."||";
|
386 |
+
if ((!$cart_item->isDeleted() && !$cart_item->getParentItemId()/*check is visible*/)&&($cart_item->getProductType()=='configurable'&&(string)$item_attributes['productcode']==$product_search_tmp_sku&&(string)$item_attributes['variantcode']==$cart_item->getSku())
|
387 |
+
|| ((string)$item_attributes['variantcode']==''&&(string)$item_attributes['productcode']==$cart_item->getSku()))
|
388 |
+
{
|
389 |
+
if ($item_attributes['quantity']!=$cart_item->getQty())
|
390 |
+
{
|
391 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['updated_qty']=true;
|
392 |
+
/* $cart_item->setQty($item_attributes['quantity']);
|
393 |
+
$product_updated=true;
|
394 |
+
*/
|
395 |
+
}
|
396 |
+
if ((float)$item_attributes['lineamount']!=($cart_item->getPrice()*$cart_item->getQty()))
|
397 |
+
{
|
398 |
+
/* echo "discount:".((float)$item_attributes['lineamount']/(float)$item_attributes['quantity'])."\n<br>\n";
|
399 |
+
$cart_item->setCustomPrice((float)$item_attributes['lineamount']/(float)$item_attributes['quantity']);
|
400 |
+
$cart_item->setOriginalCustomPrice((float)$item_attributes['lineamount']/(float)$item_attributes['quantity']);
|
401 |
+
$cart_item->getProduct()->setIsSuperMode(true);*/
|
402 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['updated_price']=true;
|
403 |
+
//$product_updated=true;
|
404 |
+
}
|
405 |
+
|
406 |
+
/*if ($product_updated){
|
407 |
+
$update_cart=true;
|
408 |
+
$cart_item->save();
|
409 |
+
}
|
410 |
+
echo $cart_item->getProductId().",,,,";*/
|
411 |
+
|
412 |
+
}
|
413 |
+
else
|
414 |
+
{
|
415 |
+
//echo "different<br>";
|
416 |
+
if ((int)Mage::getStoreConfig('qixol/advanced/separateitem')>0)
|
417 |
+
{
|
418 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['new']=true;
|
419 |
+
}
|
420 |
+
else
|
421 |
+
{
|
422 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['updated_qty']=true;
|
423 |
+
}
|
424 |
+
//$product_to_enter_in_cart[]=$item_attributes;
|
425 |
+
}
|
426 |
+
}
|
427 |
+
}
|
428 |
+
$is_splitted_line=false;
|
429 |
+
if ($item_not_found)
|
430 |
+
{
|
431 |
+
if (!isset($item_attributes['splitfromlineid'])||(int)$item_attributes['splitfromlineid']==0)
|
432 |
+
{
|
433 |
+
//$product_to_enter_in_cart[]=$item_attributes;
|
434 |
+
if ((int)Mage::getStoreConfig('qixol/advanced/separateitem')>0)
|
435 |
+
{
|
436 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['new']=true;
|
437 |
+
}
|
438 |
+
else
|
439 |
+
{
|
440 |
+
$check_exists_in_cart=false;
|
441 |
+
foreach ($new_cart_structure['items'] as $current_item_cart_position => $cart_item_to_check)
|
442 |
+
{
|
443 |
+
if ($current_item_cart_position == (int)$item_attributes['id'])
|
444 |
+
{
|
445 |
+
continue;
|
446 |
+
}
|
447 |
+
|
448 |
+
if ($cart_item_to_check['data']['productcode']==(string)$item_attributes['productcode']&&$cart_item_to_check['data']['variantcode']==(string)$item_attributes['variantcode'])
|
449 |
+
{
|
450 |
+
$new_cart_structure['items'][$current_item_cart_position]['updated_qty']=true;
|
451 |
+
$new_cart_structure['items'][$current_item_cart_position]['free_added']=(isset($item_attributes['quantity'])?(float)$item_attributes['quantity']:0);
|
452 |
+
//$new_cart_structure['items'][$current_item_cart_position]['updated_price']=true;
|
453 |
+
//$new_cart_structure['items'][$current_item_cart_position]['data']['price']+=(isset($item_attributes['price'])?(float)$item_attributes['price']:0.0);
|
454 |
+
$new_cart_structure['items'][$current_item_cart_position]['data']['quantity']+=(isset($item_attributes['quantity'])?(float)$item_attributes['quantity']:0);
|
455 |
+
//$new_cart_structure['items'][$current_item_cart_position]['data']['originalamount']+=(isset($item_attributes['originalamount'])?(float)$item_attributes['originalamount']:0.0);
|
456 |
+
//$new_cart_structure['items'][$current_item_cart_position]['data']['totaldiscount']=(isset($item_attributes['originalamount'])?(float)$item_attributes['originalamount']:0.0);
|
457 |
+
$check_exists_in_cart=true;
|
458 |
+
}
|
459 |
+
}
|
460 |
+
if (!$check_exists_in_cart)
|
461 |
+
{
|
462 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['new']=true;
|
463 |
+
if ($new_cart_structure['items'][(int)$item_attributes['id']]['data']['lineamount']==0)
|
464 |
+
{
|
465 |
+
$new_cart_structure['items'][$current_item_cart_position]['free_added']=(isset($item_attributes['quantity'])?(float)$item_attributes['quantity']:0);
|
466 |
+
}
|
467 |
+
}
|
468 |
+
|
469 |
+
}
|
470 |
+
}
|
471 |
+
elseif((int)$item_attributes['splitfromlineid']>0)
|
472 |
+
{
|
473 |
+
//$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['quantity']+=(isset($item_attributes['quantity'])?(float)$item_attributes['quantity']:0);
|
474 |
+
//remove updated quantity for splitted
|
475 |
+
$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['updated_qty']=0;
|
476 |
+
//for splitted there is possible different discount, should be recalcualted in main produc tdiscount
|
477 |
+
$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['totaldiscount']+=(float)$item_attributes['totaldiscount'];
|
478 |
+
$calcualted_discount=$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['totaldiscount']/$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['originalquantity'];
|
479 |
+
$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['price']=$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['originalprice']-$calcualted_discount;
|
480 |
+
$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['lineamount']=($new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['price']*$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['data']['originalquantity']);
|
481 |
+
$is_splitted_line=true;
|
482 |
+
}
|
483 |
+
//echo "new_item";
|
484 |
+
}
|
485 |
+
foreach ($xml_items_sub as $item_tag_key=>$xml_item_sub)
|
486 |
+
{
|
487 |
+
if($item_tag_key=='promotions')
|
488 |
+
{
|
489 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['promotions']=array();
|
490 |
+
foreach ($xml_item_sub as $promotion_id=>$promotion)
|
491 |
+
{
|
492 |
+
$promotion_attributes=$promotion->attributes();
|
493 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']]=array();
|
494 |
+
//print_r($promotion_attributes);
|
495 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']]['id']=(int)$promotion_attributes['id'];
|
496 |
+
|
497 |
+
//$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']]['id']=(isset($promotion_attributes['discountamount'])?(float)$promotion_attributes['discountamount']:0);
|
498 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']]['instance']=(isset($promotion_attributes['instance'])?(int)$promotion_attributes['instance']:0);
|
499 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']]['basketlevel']=(isset($promotion_attributes['basketlevel'])&&strtolower($promotion_attributes['basketlevel'])=='true'?(true):false);
|
500 |
+
$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']]['discountamount']=(isset($promotion_attributes['discountamount'])?(float)$promotion_attributes['discountamount']:0);
|
501 |
+
if ($is_splitted_line)
|
502 |
+
{ //check is promotion exists in main linea
|
503 |
+
if (!isset($new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['promotions'][(int)$promotion_attributes['id']]))
|
504 |
+
{
|
505 |
+
$new_cart_structure['items'][(int)$item_attributes['splitfromlineid']]['promotions'][(int)$promotion_attributes['id']]=$new_cart_structure['items'][(int)$item_attributes['id']]['promotions'][(int)$promotion_attributes['id']];
|
506 |
+
}
|
507 |
+
}
|
508 |
+
//the text and promotion data will be parsed from summary
|
509 |
+
/*if ((bool)$promotion_attributes['basketlevel']!=true){
|
510 |
+
$promotion_data=Mage::getModel('qixol/promotions')->load((int)$promotion_attributes['id']);
|
511 |
+
//print_r($promotion_data->getPromotionType());
|
512 |
+
//print_r($promotion_data->getPromotionText());
|
513 |
+
}*/
|
514 |
+
}
|
515 |
+
|
516 |
+
}
|
517 |
+
}
|
518 |
+
}
|
519 |
+
}
|
520 |
+
elseif($xml_root_key=='coupons')
|
521 |
+
{
|
522 |
+
$new_cart_structure['coupons']=array();
|
523 |
+
//print_r($xml_object_sub);
|
524 |
+
foreach ($xml_object_sub as $item_key=>$xml_items_sub)
|
525 |
+
{
|
526 |
+
if ($item_key=='coupon')
|
527 |
+
{
|
528 |
+
$coupon_attributes=$xml_items_sub->attributes();
|
529 |
+
if (!(strtolower((string)$coupon_attributes['issued'])=='true'))
|
530 |
+
{
|
531 |
+
if(isset($coupon_attributes['code'])&&(string)$coupon_attributes['code']!='')
|
532 |
+
{
|
533 |
+
$new_cart_structure['coupons'][(string)$coupon_attributes['code']]['issued']=false;
|
534 |
+
$new_cart_structure['coupons'][(string)$coupon_attributes['code']]['code']=(string)$coupon_attributes['code'];
|
535 |
+
$new_cart_structure['coupons'][(string)$coupon_attributes['code']]['description']=(isset($xml_items_sub->couponname)&&(string)$xml_items_sub->couponname!=''?(string)$xml_items_sub->couponname:(string)$coupon_attributes['code']);
|
536 |
+
}
|
537 |
+
else
|
538 |
+
{
|
539 |
+
unset($_SESSION['qixol_quoted_items']['coupons'][(string)$coupon_attributes['code']]);
|
540 |
+
}
|
541 |
+
}
|
542 |
+
else
|
543 |
+
{
|
544 |
+
//!!!!!!!!!!!!!!! get valid to for coupon
|
545 |
+
$validtill='0000-00-00 00:00:00';
|
546 |
+
|
547 |
+
$result = $this->promoService->CouponCodeValidate((string)$coupon_attributes['code']);
|
548 |
+
if ($result->success)
|
549 |
+
{
|
550 |
+
$update_item=false;
|
551 |
+
$xml_coupon_code_validated = $result->message;
|
552 |
+
if (strlen($xml_coupon_code_validated)>10)
|
553 |
+
{
|
554 |
+
$xml_coupon_object = simplexml_load_string($xml_coupon_code_validated);
|
555 |
+
foreach ($xml_coupon_object as $xml_coupon_object_root_key=>$xml_coupon_object_object_sub)
|
556 |
+
{
|
557 |
+
if ($xml_coupon_object_root_key=='coupon')
|
558 |
+
{
|
559 |
+
foreach ($xml_coupon_object_object_sub as $xml_coupon_object_coupon_key=>$xml_coupon_object_object_coupon)
|
560 |
+
{
|
561 |
+
if ($xml_coupon_object_coupon_key=='codes')
|
562 |
+
{
|
563 |
+
foreach ($xml_coupon_object_object_coupon as $xml_coupon_object_object_coupon_obj)
|
564 |
+
{
|
565 |
+
$xml_coupon_object_object_coupon_attributes=$xml_coupon_object_object_coupon_obj->attributes();
|
566 |
+
$validtill=date("Y-m-d H:i:s",strtotime((string)$xml_coupon_object_object_coupon_attributes['validto']));
|
567 |
+
}
|
568 |
+
}
|
569 |
+
}
|
570 |
+
}
|
571 |
+
}
|
572 |
+
}
|
573 |
+
}
|
574 |
+
//!!!!!!!!!!!!!!! end valid to for coupon
|
575 |
+
$new_cart_structure['coupons'][(string)$coupon_attributes['code']]['description']=(string)$xml_items_sub->couponname;//(string)$coupon_attributes['reportingcode']
|
576 |
+
$new_cart_structure['coupons'][(string)$coupon_attributes['code']]['validtill']=($validtill=='1970-01-01 00:00:00'?"0000-00-00 00:00:00":$validtill);//(string)$coupon_attributes['code']
|
577 |
+
$new_cart_structure['coupons'][(string)$coupon_attributes['code']]['issued']=true;
|
578 |
+
|
579 |
+
}
|
580 |
+
}
|
581 |
+
}
|
582 |
+
//parce in future
|
583 |
+
}
|
584 |
+
elseif($xml_root_key=='summary')
|
585 |
+
{
|
586 |
+
$new_cart_structure['summary']=array();
|
587 |
+
foreach ($xml_object_sub as $item_key=>$xml_items_sub)
|
588 |
+
{
|
589 |
+
if ($item_key=='promotions')
|
590 |
+
{
|
591 |
+
foreach ($xml_items_sub as $item_1_key=>$xml_item_promotion)
|
592 |
+
{
|
593 |
+
|
594 |
+
$promotion_attributes=$xml_item_promotion->attributes();
|
595 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['type']=(string)$promotion_attributes['type'];
|
596 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['display']=(string)$promotion_attributes['display'];
|
597 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['display_text']=(isset($xml_item_promotion->displaytext)?(string)$xml_item_promotion->displaytext:'');
|
598 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['discountamount']=(isset($promotion_attributes['discountamount'])?(float)$promotion_attributes['discountamount']:0);
|
599 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['basketlevel']=(isset($promotion_attributes['basketlevel'])&&strtolower($promotion_attributes['basketlevel'])=='true'?(true):false);
|
600 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['deliverylevel']=(isset($promotion_attributes['deliverylevel'])&&strtolower($promotion_attributes['deliverylevel'])=='true'?(true):false);
|
601 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['issuedpoints']=(isset($promotion_attributes['issuedpoints'])?((int)$promotion_attributes['issuedpoints']):0);
|
602 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['issuedcoupon']=(isset($promotion_attributes['issuedcoupon'])&&strtolower($promotion_attributes['issuedcoupon'])=='true'?(true):false);
|
603 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['unpublished']=(isset($promotion_attributes['unpublished'])&&strtolower($promotion_attributes['unpublished'])=='true'?(true):false);
|
604 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['issuedproduct']=(isset($promotion_attributes['issuedproduct'])&&strtolower($promotion_attributes['issuedproduct'])=='true'?(true):false);
|
605 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['description']=(isset($xml_item_promotion->description)?(string)$xml_item_promotion->description:'');
|
606 |
+
$new_cart_structure['summary'][(int)$promotion_attributes['id']]['data']['name']=(isset($xml_item_promotion->name)?(string)$xml_item_promotion->name:'');
|
607 |
+
}
|
608 |
+
}
|
609 |
+
elseif($item_key=='messages')
|
610 |
+
{
|
611 |
+
//messages will be here;
|
612 |
+
$new_cart_structure['messages']=array();
|
613 |
+
}
|
614 |
+
}
|
615 |
+
|
616 |
+
}
|
617 |
+
}
|
618 |
+
}
|
619 |
+
}
|
620 |
+
|
621 |
+
/* NO UPDATE CART HERE AS FOR NOW, WILL UPDETE BEFORE ORDER CREATION
|
622 |
+
if ($product_to_enter_in_cart){
|
623 |
+
print_r($product_to_enter_in_cart);
|
624 |
+
//add free product in cart
|
625 |
+
$product_added=false;
|
626 |
+
foreach ($product_to_enter_in_cart as $p_t_e){
|
627 |
+
$product_got_id = Mage::getModel('catalog/product')->getIdBySku((string)$p_t_e['productcode']);
|
628 |
+
if ($product_got_id>0){
|
629 |
+
$product_to_add = Mage::getModel('catalog/product')
|
630 |
+
->setStoreId(Mage::app()->getStore()->getId())
|
631 |
+
->load($product_got_id);
|
632 |
+
$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_to_add);
|
633 |
+
$qty = $stockItem->getQty();
|
634 |
+
// to do, check if product inventory is managed otherwise this can become a minus qty
|
635 |
+
if($product_to_add->isSaleable()&&$qty >= 0) {
|
636 |
+
$cart->addProduct($product_to_add);
|
637 |
+
$product_added=true;
|
638 |
+
}else {
|
639 |
+
echo "error stock";
|
640 |
+
//$cart->addNotificationMessage($cart,'notice',(string)$product_to_enter_in_cart['productcode']. ' cannot be added to the cart!');
|
641 |
+
}
|
642 |
+
} else {
|
643 |
+
echo "error code";
|
644 |
+
//$cart->addNotificationMessage($cart,'notice',(string)$product_to_enter_in_cart['productcode']. ' '. $this->__(' cannot be added to the cart!'));
|
645 |
+
}
|
646 |
+
}
|
647 |
+
}
|
648 |
+
|
649 |
+
if ($product_added||$update_cart){
|
650 |
+
echo "cart update";
|
651 |
+
$cart->save();
|
652 |
+
}
|
653 |
+
*/
|
654 |
+
|
655 |
+
|
656 |
+
//set own price
|
657 |
+
//$item->setCustomPrice($price);
|
658 |
+
//$item->setOriginalCustomPrice($price);
|
659 |
+
/*$promotions_xml=$result->RetrievePromotionsForProductsResult;
|
660 |
+
//print_r($result->RetrievePromotionsForProductsResult);*/
|
661 |
+
|
662 |
+
//store in database for promotions here
|
663 |
+
//$result->RetrievePromotionsForProductsResult
|
664 |
+
|
665 |
+
|
666 |
+
}
|
667 |
+
}
|
668 |
+
//print_r($new_cart_structure);
|
669 |
+
//die();
|
670 |
+
if (isset($new_cart_structure)&&count($new_cart_structure)>0)
|
671 |
+
{
|
672 |
+
return $new_cart_structure;
|
673 |
+
}
|
674 |
+
}
|
675 |
+
|
676 |
+
function run_import_promotionsForProducts(){
|
677 |
+
|
678 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0){
|
679 |
+
return;
|
680 |
+
}
|
681 |
+
|
682 |
+
$this->addExportStatus("process", 'promotions', '', 0);
|
683 |
+
|
684 |
+
$products_list = Mage::getModel('catalog/product')->getCollection()
|
685 |
+
->addAttributeToSelect('*')->addAttributeToFilter('visibility', array('neq'=>1))
|
686 |
+
->addAttributeToSort('entity_id', 'desc');
|
687 |
+
|
688 |
+
foreach ($products_list as $product) {
|
689 |
+
$data .= '<product productcode="'.$product->getSku().'" variantcode="" barcode="" price="'.$product->getPrice().'"><description>'.$this->CDT($product->getName()).'</description><imageurl>'.$this->CDT($product->getImage() != 'no_selection' ? $product->getImageUrl() : '').'</imageurl>';
|
690 |
+
$products_data.='<product productcode="'.$product->getSku().'" variantcode="" />';
|
691 |
+
if ($product->isConfigurable()){ //with variations
|
692 |
+
//$associatedAttributes = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);
|
693 |
+
$childs_products_list=$product->getTypeInstance()->getUsedProducts();
|
694 |
+
foreach ($childs_products_list as $childProduct_tmp) {
|
695 |
+
$childProduct = Mage::getModel('catalog/product')->load($childProduct_tmp->getId());
|
696 |
+
$products_data.='<product productcode="'.$product->getSku().'" variantcode="'.$childProduct->getSku().'" />';
|
697 |
+
}
|
698 |
+
}
|
699 |
+
|
700 |
+
}
|
701 |
+
|
702 |
+
if ($products_data!=''){
|
703 |
+
|
704 |
+
$promotions='<request companykey="'.Mage::getStoreConfig('qixol/integraion/companykey').
|
705 |
+
'" validationdate="'.date("Y-m-d",strtotime("+ 1 DAY")).'T00:00:00" channel="'.Mage::getStoreConfig('qixol/syhchronized/channel').
|
706 |
+
'" storegroup="'.Mage::getStoreConfig('qixol/syhchronized/storegroup').'" store="'.Mage::getStoreConfig('qixol/syhchronized/channel').
|
707 |
+
'" validatefortime="false"><products>'.$products_data.'</products></request>';
|
708 |
+
|
709 |
+
$result = $this->promoService->PromotionsForProducts($promotions);
|
710 |
+
|
711 |
+
if ($result->success) {
|
712 |
+
if ($result->message != ''){
|
713 |
+
$this->promoService->parsePromotionsForProducts($result->message);
|
714 |
+
$this->addExportStatus("success", 'promotions', 'imported', 1);
|
715 |
+
} else {
|
716 |
+
$this->addExportStatus("success", 'promotions', 'imported - no promotions', 1);
|
717 |
+
}
|
718 |
+
} else {
|
719 |
+
$this->addExportStatus("error", 'promotions', addslashes($result->message), 1);
|
720 |
+
$this->pushLog("Finish import promotions error ".$result->message);
|
721 |
+
}
|
722 |
+
} else {
|
723 |
+
$this->addExportStatus("process", 'promotions', 'no products found for promotion retrieval', 1);
|
724 |
+
}
|
725 |
+
return;
|
726 |
+
}
|
727 |
+
|
728 |
+
function run_import_promotionsForBaskets(){
|
729 |
+
|
730 |
+
$this->addExportStatus("process", 'basketpromotions' ,'',0);
|
731 |
+
$promotions='<request companykey="'.Mage::getStoreConfig('qixol/integraion/companykey').
|
732 |
+
'" validationdate="'.date("Y-m-d",strtotime("+ 1 DAY")).'T00:00:00" channel="'.Mage::getStoreConfig('qixol/syhchronized/channel').
|
733 |
+
'" storegroup="'.Mage::getStoreConfig('qixol/syhchronized/storegroup').'" store="'.Mage::getStoreConfig('qixol/syhchronized/channel').
|
734 |
+
'" validatefortime="false"></request>';
|
735 |
+
|
736 |
+
$result = $this->promoService->PromotionsForBaskets($promotions);
|
737 |
+
|
738 |
+
if ($result->success)
|
739 |
+
{
|
740 |
+
$this->promoService->parsePromotionsForBaskets($result->message);
|
741 |
+
$this->addExportStatus("success", 'basketpromotions', 'imported', 1);
|
742 |
+
} else {
|
743 |
+
$this->addExportStatus("error", 'basketpromotions', addslashes($result->message), 1);
|
744 |
+
$this->pushLog("Finish import promotions error ".$result->message);
|
745 |
+
}
|
746 |
+
return;
|
747 |
+
}
|
748 |
+
|
749 |
+
function run_export_customerGroups() {
|
750 |
+
|
751 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0){
|
752 |
+
return;
|
753 |
+
}
|
754 |
+
|
755 |
+
if (Mage::getStoreConfig('qixol/syhchronized/synchcustomer') == 0){
|
756 |
+
return;
|
757 |
+
}
|
758 |
+
|
759 |
+
if ($this->isRunning('customers'))
|
760 |
+
{
|
761 |
+
return;
|
762 |
+
}
|
763 |
+
|
764 |
+
$this->addExportStatus("process", 'customers' ,'',0);
|
765 |
+
|
766 |
+
$list_map_names = Mage::getModel('qixol/Customergrouspmap')->getCollection();
|
767 |
+
|
768 |
+
$group_to_send='';
|
769 |
+
foreach ($list_map_names as $list_map){
|
770 |
+
$group_to_send .= '<item display="';
|
771 |
+
$group_to_send .= $list_map->getCustomerGroupName();
|
772 |
+
$group_to_send .= '">';
|
773 |
+
$group_to_send .= $list_map->getIntegrationCode();
|
774 |
+
$group_to_send .= '</item>';
|
775 |
+
}
|
776 |
+
|
777 |
+
if ($group_to_send != '')
|
778 |
+
{
|
779 |
+
$data = '<import companykey="';
|
780 |
+
$data .= Mage::getStoreConfig('qixol/integraion/companykey');
|
781 |
+
$data .= '" attributetoken="customergroup"><items>';
|
782 |
+
$data .= $group_to_send;
|
783 |
+
$data .= '</items></import>';
|
784 |
+
|
785 |
+
$result = $this->promoService->CustomerGroupExport($data);
|
786 |
+
if ($result->success)
|
787 |
+
{
|
788 |
+
$this->addExportStatus("success", 'customers', addslashes($result->message),1);
|
789 |
+
}
|
790 |
+
else
|
791 |
+
{
|
792 |
+
$this->addExportStatus("error", 'customers', addslashes($result->message),1);
|
793 |
+
}
|
794 |
+
}
|
795 |
+
}
|
796 |
+
|
797 |
+
function run_export_shippingMethods() {
|
798 |
+
|
799 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0)
|
800 |
+
{
|
801 |
+
return;
|
802 |
+
}
|
803 |
+
|
804 |
+
if (Mage::getStoreConfig('qixol/syhchronized/synchship') == 0)
|
805 |
+
{
|
806 |
+
return;
|
807 |
+
}
|
808 |
+
|
809 |
+
if ($this->isRunning('delivery'))
|
810 |
+
{
|
811 |
+
return;
|
812 |
+
}
|
813 |
+
|
814 |
+
$this->addExportStatus("process", 'delivery' ,'',0);
|
815 |
+
|
816 |
+
$list_map_names = Mage::getModel('qixol/Shippingmap')->getCollection();
|
817 |
+
|
818 |
+
$list_map_names_exists=array();
|
819 |
+
|
820 |
+
foreach ($list_map_names as $list_map){
|
821 |
+
$list_map_names_exists[$list_map->getShippingName()] = $list_map->getShippingNameMap();
|
822 |
+
}
|
823 |
+
|
824 |
+
//$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
825 |
+
$methods = Mage::getSingleton('shipping/config')->getAllCarriers();
|
826 |
+
|
827 |
+
$selectedgroups = Mage::getStoreConfig('qixol/shippings/list');
|
828 |
+
|
829 |
+
unset($selectedgroups_array);
|
830 |
+
|
831 |
+
if(trim($selectedgroups)!='')
|
832 |
+
{
|
833 |
+
$selectedgroups_array=explode(",",$selectedgroups);
|
834 |
+
}
|
835 |
+
|
836 |
+
foreach($list_map_names as $list_map)
|
837 |
+
{
|
838 |
+
$shipping_to_send .= '<item display="';
|
839 |
+
$shipping_to_send .= $list_map->getCarrierTitle() . ': ' . $list_map->getCarrierMethod();
|
840 |
+
$shipping_to_send .= '">';
|
841 |
+
$shipping_to_send .= $list_map->getIntegrationCode();
|
842 |
+
$shipping_to_send .= '</item>';
|
843 |
+
}
|
844 |
+
|
845 |
+
if ($shipping_to_send!='')
|
846 |
+
{
|
847 |
+
$data='<import companykey="'.Mage::getStoreConfig('qixol/integraion/companykey').'" attributetoken="deliverymethod"><items>'.$shipping_to_send.'</items></import>';
|
848 |
+
$result = $this->promoService->ShippingMethodsExport($data);
|
849 |
+
if ($result->success)
|
850 |
+
{
|
851 |
+
$this->addExportStatus("success", 'delivery' ,addslashes($result->message),1);
|
852 |
+
}
|
853 |
+
else
|
854 |
+
{
|
855 |
+
$this->addExportStatus("error", 'delivery' ,addslashes($result->message),1);
|
856 |
+
}
|
857 |
+
}
|
858 |
+
else
|
859 |
+
{
|
860 |
+
$this->addExportStatus("success", 'delivery', 'There are no shipping methods to send', 1);
|
861 |
+
}
|
862 |
+
}
|
863 |
+
|
864 |
+
function run_export_currencies() {
|
865 |
+
|
866 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0){
|
867 |
+
return;
|
868 |
+
}
|
869 |
+
|
870 |
+
if (Mage::getStoreConfig('qixol/syhchronized/synchcurrency') == 0){
|
871 |
+
return;
|
872 |
+
}
|
873 |
+
|
874 |
+
if ($this->isRunning('currency'))
|
875 |
+
{
|
876 |
+
return;
|
877 |
+
}
|
878 |
+
|
879 |
+
$this->addExportStatus("process", 'currency' ,'',0);
|
880 |
+
$currency_to_send='';
|
881 |
+
$only_active_currency=Mage::getStoreConfig('currency/options/allow');
|
882 |
+
$currencies_array = explode(',',$only_active_currency);
|
883 |
+
foreach($currencies_array as $code_curr)
|
884 |
+
{
|
885 |
+
$currency_to_send .= '<item display="';
|
886 |
+
$currency_to_send .= Mage::app()->getLocale()->currency( $code_curr )->getName();
|
887 |
+
$currency_to_send .= '">';
|
888 |
+
$currency_to_send .= $code_curr;
|
889 |
+
$currency_to_send .= '</item>';
|
890 |
+
}
|
891 |
+
|
892 |
+
if ($currency_to_send != '')
|
893 |
+
{
|
894 |
+
$data = '<import companykey="';
|
895 |
+
$data .= Mage::getStoreConfig('qixol/integraion/companykey');
|
896 |
+
$data .= '" attributetoken="currencycode"><items>';
|
897 |
+
$data .= $currency_to_send;
|
898 |
+
$data .= '</items></import>';
|
899 |
+
|
900 |
+
$result = $this->promoService->CurrenciesExport($data);
|
901 |
+
if ($result->success)
|
902 |
+
{
|
903 |
+
$this->addExportStatus("success", 'currency', addslashes($result->message), 1);
|
904 |
+
}
|
905 |
+
else {
|
906 |
+
$this->addExportStatus("error", 'currency', addslashes($result->message), 1);
|
907 |
+
}
|
908 |
+
} else {
|
909 |
+
$this->addExportStatus("success", 'currency', 'No currencies to send', 1);
|
910 |
+
}
|
911 |
+
}
|
912 |
+
|
913 |
+
function run_export_stores() {
|
914 |
+
|
915 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0){
|
916 |
+
return;
|
917 |
+
}
|
918 |
+
|
919 |
+
if (Mage::getStoreConfig('qixol/syhchronized/synchstores') == 0){
|
920 |
+
return;
|
921 |
+
}
|
922 |
+
|
923 |
+
if ($this->isRunning('store'))
|
924 |
+
{
|
925 |
+
return;
|
926 |
+
}
|
927 |
+
|
928 |
+
$this->addExportStatus("process", 'store' ,'',0);
|
929 |
+
|
930 |
+
$list_store_integration_codes = Mage::getModel('qixol/Storesmap')->getCollection();
|
931 |
+
|
932 |
+
foreach ($list_store_integration_codes as $list_map)
|
933 |
+
{
|
934 |
+
$list_store_integration_codes_exists[$list_map->getWebsite()][$list_map->getStoreGroup()][$list_map->getStoreName()]=$list_map->getIntegrationCode();
|
935 |
+
}
|
936 |
+
|
937 |
+
$xmlToSend = '';
|
938 |
+
|
939 |
+
foreach (Mage::app()->getWebsites() as $website)
|
940 |
+
{
|
941 |
+
$xmlChannel = '<channel display="';
|
942 |
+
$xmlChannel .= $website->getName();
|
943 |
+
$xmlChannel .= '" value="';
|
944 |
+
$xmlChannel .= $website->getName();
|
945 |
+
$xmlChannel .= '">';
|
946 |
+
|
947 |
+
$hasStoreGroups = false;
|
948 |
+
foreach ($website->getGroups() as $group) {
|
949 |
+
$xmlStoreGroup = '<storegroup display="';
|
950 |
+
$xmlStoreGroup .= $group->getName();
|
951 |
+
$xmlStoreGroup .= '" value="';
|
952 |
+
$xmlStoreGroup .= $group->getName();
|
953 |
+
$xmlStoreGroup .= '">';
|
954 |
+
|
955 |
+
$stores = $group->getStores();
|
956 |
+
|
957 |
+
$hasStores = false;
|
958 |
+
foreach ($stores as $store) {
|
959 |
+
$integrationCode = $list_store_integration_codes_exists[$website->getName()][$group->getName()][$store->getName()];
|
960 |
+
if (!empty($integrationCode))
|
961 |
+
{
|
962 |
+
$hasStores = true;
|
963 |
+
$xmlStore .= '<store display="';
|
964 |
+
$xmlStore .= $store->getName();
|
965 |
+
$xmlStore .= '" value="';
|
966 |
+
$xmlStore .= $integrationCode;
|
967 |
+
$xmlStore .= '" />';
|
968 |
+
}
|
969 |
+
}
|
970 |
+
if ($hasStores)
|
971 |
+
{
|
972 |
+
$hasStoreGroups = true;
|
973 |
+
$xmlStoreGroup .= $xmlStore;
|
974 |
+
}
|
975 |
+
|
976 |
+
$xmlStoreGroup .= '</storegroup>';
|
977 |
+
}
|
978 |
+
|
979 |
+
if ($hasStoreGroups)
|
980 |
+
{
|
981 |
+
$xmlChannel .= $xmlStoreGroup;
|
982 |
+
$xmlChannel .= '</channel>';
|
983 |
+
|
984 |
+
$xmlToSend .= $xmlChannel;
|
985 |
+
}
|
986 |
+
}
|
987 |
+
|
988 |
+
|
989 |
+
if ($xmlToSend != '')
|
990 |
+
{
|
991 |
+
$data = '<import companykey="';
|
992 |
+
$data .= Mage::getStoreConfig('qixol/integraion/companykey');
|
993 |
+
$data .= '" hierarchytoken="store">';
|
994 |
+
$data .= $xmlToSend;
|
995 |
+
$data .= '</import>';
|
996 |
+
|
997 |
+
$result =$this->promoService->StoresExport($data);
|
998 |
+
if ($result->success)
|
999 |
+
{
|
1000 |
+
$this->addExportStatus("success", 'store', addslashes($result->message), 1);
|
1001 |
+
}
|
1002 |
+
else
|
1003 |
+
{
|
1004 |
+
$this->addExportStatus("error", 'store', addslashes($result->message), 1);
|
1005 |
+
}
|
1006 |
+
}
|
1007 |
+
else
|
1008 |
+
{
|
1009 |
+
$this->addExportStatus("success", 'store', 'There are no stores to send', 1);
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
function run_export_products() {
|
1014 |
+
|
1015 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled')==0) {
|
1016 |
+
return;
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
if (Mage::getStoreConfig('qixol/syhchronized/synchproducts')==0) {
|
1020 |
+
return;
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
if ($this->isRunning('products'))
|
1024 |
+
{
|
1025 |
+
return;
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1029 |
+
$write_data->query("
|
1030 |
+
delete from ".$this->process_export_status_table." where export_what='products'
|
1031 |
+
");
|
1032 |
+
|
1033 |
+
//process products here
|
1034 |
+
$number_products_exported=0;
|
1035 |
+
$this->addExportStatus("process", 'products' ,'',0);
|
1036 |
+
|
1037 |
+
$products_list = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToFilter('visibility', array('neq'=>1))->addAttributeToSort('entity_id', 'desc');
|
1038 |
+
|
1039 |
+
$products_deleted = Mage::getModel('qixol/Deletedproduct')->getCollection();
|
1040 |
+
$remove_deleted=array();
|
1041 |
+
|
1042 |
+
if (count($products_list)||count($products_deleted)){
|
1043 |
+
$data = '<import companykey="'.Mage::getStoreConfig('qixol/integraion/companykey').'"><products>';
|
1044 |
+
|
1045 |
+
//assign deleted product first
|
1046 |
+
if (count($products_deleted))
|
1047 |
+
foreach ($products_deleted as $products_deleted_data) {
|
1048 |
+
$data .= '<product productcode="'.$products_deleted_data->getData('product_sku').'" variantcode="'.$products_deleted_data->getData('child_sku').'" barcode="" deleted="true"></product>';
|
1049 |
+
$remove_deleted[]=$products_deleted_data->getData('entity_id');
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
if (count($products_list))
|
1053 |
+
foreach ($products_list as $product) {
|
1054 |
+
$send_product=true;
|
1055 |
+
$imageUrl = $this->CDT($product->getImage() != 'no_selection' ? $product->getImageUrl() : '');
|
1056 |
+
if (!$product->isConfigurable()){
|
1057 |
+
$parentId = Mage::getResourceSingleton('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
|
1058 |
+
//sometimes could be grouped if such module installed
|
1059 |
+
/*try {
|
1060 |
+
if((!$parentId)||(!is_array($parentId)))
|
1061 |
+
$parentId = Mage::getResourceSingleton('catalog/product_type_grouped')->getParentIdsByChild($product->getId());
|
1062 |
+
}
|
1063 |
+
catch(Exception $e) {
|
1064 |
+
; //if object not supported appears exception
|
1065 |
+
}*/
|
1066 |
+
if (is_array($parentId)&&count($parentId))
|
1067 |
+
{
|
1068 |
+
foreach ($parentId as $parent_product_id){
|
1069 |
+
$prod_parent_obj = Mage::getModel('catalog/product')->load($parent_product_id);
|
1070 |
+
//do not send if this product exists as child in any active parent product
|
1071 |
+
if (strtolower($prod_parent_obj->getAttributeText('status'))=='enabled'&&$prod_parent_obj->getVisibility()>1){
|
1072 |
+
$send_product=false;
|
1073 |
+
break;
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
$parentProduct = Mage::getModel('catalog/product')->load($parentId[0]);
|
1077 |
+
if ($imageUrl == '') {
|
1078 |
+
$imageUrl = $parentProduct->getImageUrl();
|
1079 |
+
}
|
1080 |
+
}
|
1081 |
+
}
|
1082 |
+
if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
|
1083 |
+
$send_product = false;
|
1084 |
+
}
|
1085 |
+
if ($product->getPrice() == '') {
|
1086 |
+
$send_product = false;
|
1087 |
+
}
|
1088 |
+
if ($send_product){
|
1089 |
+
$productCategories = $product->getCategoryIds();
|
1090 |
+
if (!$product->isConfigurable()) {
|
1091 |
+
$productCode = $product->getSku();
|
1092 |
+
$variantCode = '';
|
1093 |
+
$price = $product->getPrice();
|
1094 |
+
$description = $this->CDT($product->getName());
|
1095 |
+
|
1096 |
+
$data .= $this->productXmlElement($product, $productCode, $variantCode, $price, $description, $imageUrl, $productCategories);
|
1097 |
+
$number_products_exported++;
|
1098 |
+
|
1099 |
+
} else {
|
1100 |
+
//$associatedAttributes = $product->getTypeInstance()->getConfigurableAttributesAsArray($product);
|
1101 |
+
$childs_products_list=$product->getTypeInstance()->getUsedProducts();
|
1102 |
+
if (empty($childs_products_list) || (count($childs_products_list) == 0)) {
|
1103 |
+
$productCode = $product->getSku();
|
1104 |
+
$variantCode = '';
|
1105 |
+
$price = $product->getPrice();
|
1106 |
+
$description = $this->CDT($product->getName());
|
1107 |
+
|
1108 |
+
$data .= $this->productXmlElement($product, $productCode, $variantCode, $price, $description, $imageUrl, $productCategories);
|
1109 |
+
$number_products_exported++;
|
1110 |
+
} else {
|
1111 |
+
foreach ($childs_products_list as $childProduct_tmp) {
|
1112 |
+
$childProduct = Mage::getModel('catalog/product')->load($childProduct_tmp->getId());
|
1113 |
+
$productCode = $product->getSku();
|
1114 |
+
$variantCode = $childProduct->getSku();
|
1115 |
+
$price = $childProduct->getPrice();
|
1116 |
+
$description = $product->getName(); // $this->CDT($childProduct->getName());
|
1117 |
+
$image = $childProduct->getImage();
|
1118 |
+
if ($image == NULL) {
|
1119 |
+
$image = 'no_selection';
|
1120 |
+
}
|
1121 |
+
$imageUrl = ($image != 'no_selection' ? $childProduct->getImageUrl() : '');
|
1122 |
+
|
1123 |
+
$data .= $this->productXmlElement($product, $productCode, $variantCode, $price, $description, $imageUrl, $productCategories);
|
1124 |
+
|
1125 |
+
$number_products_exported++;
|
1126 |
+
}
|
1127 |
+
}
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
$data .= '</products></import>';
|
1133 |
+
if ($data!=''){
|
1134 |
+
$result = $this->promoService->ProductsExport($data);
|
1135 |
+
|
1136 |
+
if ($result->success)
|
1137 |
+
{
|
1138 |
+
$this->addExportStatus("success", 'products', addslashes($result->message), 1);
|
1139 |
+
if (is_array($remove_deleted)&&count($remove_deleted)>0)
|
1140 |
+
{
|
1141 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1142 |
+
$write_data->query("delete from qixol_product_to_delete where entity_id in (".join(",",$remove_deleted).")");
|
1143 |
+
}
|
1144 |
+
}
|
1145 |
+
else {
|
1146 |
+
$this->addExportStatus("error", 'products', addslashes($result->message), 1);
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
else
|
1150 |
+
{
|
1151 |
+
$this->addExportStatus("success", 'products', 'no products to send', 1);
|
1152 |
+
}
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
function attributeXmlElement($product, $productCategories) {
|
1157 |
+
$attributes=Mage::getStoreConfig('qixol/productattrib/attributes');
|
1158 |
+
$attributeXmlElement = '';
|
1159 |
+
$attributes_arr=explode(",",$attributes);
|
1160 |
+
if (count($attributes_arr)){
|
1161 |
+
foreach ($attributes_arr as $attribute_id){
|
1162 |
+
$attribute = $product->getResource()->getAttribute($attribute_id);
|
1163 |
+
if ($attribute != NULL) {
|
1164 |
+
$is_attribute_text_value = $attribute->getFrontend()->getValue($product);
|
1165 |
+
$attributeXmlElement .= '<attribute>';
|
1166 |
+
$attributeXmlElement .= '<name>'.$attribute_id.'</name>';
|
1167 |
+
$attributeXmlElement .= '<value>'.$this->CDT($is_attribute_text_value!=''?$is_attribute_text_value:$product->getData($attribute_id)).'</value>';
|
1168 |
+
$attributeXmlElement .= '</attribute>';
|
1169 |
+
}
|
1170 |
+
}
|
1171 |
+
}
|
1172 |
+
if (Mage::getStoreConfig('qixol/syhchronized/synchcatproducts')>0){
|
1173 |
+
foreach ($productCategories as $product_category_id){
|
1174 |
+
if ($product_category_id==0) continue;
|
1175 |
+
$current_ctaegory_id=$product_category_id;
|
1176 |
+
$category_name_push='';
|
1177 |
+
while($current_ctaegory_id != 0){
|
1178 |
+
$category = Mage::getModel('catalog/category')->load($current_ctaegory_id);
|
1179 |
+
$current_ctaegory_id=$category->getParentId();
|
1180 |
+
if (strtolower($category->getName())!='root catalog') {
|
1181 |
+
$category_name_push=$category->getName().($category_name_push!=''?" / ".$category_name_push:"");
|
1182 |
+
}
|
1183 |
+
}
|
1184 |
+
$attributeXmlElement .= '<attribute>';
|
1185 |
+
$attributeXmlElement .= '<name>categorycode</name>';
|
1186 |
+
$attributeXmlElement .= '<value>'.$this->CDT($category_name_push).'</value>';
|
1187 |
+
$attributeXmlElement .= '</attribute>';
|
1188 |
+
}
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
if (!empty($attributeXmlElement)) {
|
1192 |
+
$attributeXmlElement = '<attributes>'.$attributeXmlElement.'</attributes>';
|
1193 |
+
}
|
1194 |
+
return $attributeXmlElement;
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
function productXmlElement($product, $productCode, $variantCode, $price, $description, $imageUrl, $productCategories) {
|
1198 |
+
$productXmlElement = '<product productcode="'.$productCode.'" variantcode="'.$variantCode.'"';
|
1199 |
+
$productXmlElement .= ' barcode="" price="'.$price.'"><description>'.$description.'</description>';
|
1200 |
+
$productXmlElement .= '<imageurl>'.$imageUrl.'</imageurl>';
|
1201 |
+
$productXmlElement .= $this->attributeXmlElement($product, $productCategories);
|
1202 |
+
$productXmlElement .= '</product>';
|
1203 |
+
|
1204 |
+
return $productXmlElement;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
function run_export_qixolData(){
|
1208 |
+
|
1209 |
+
if (Mage::getStoreConfig('holbi/qixol/enabled') == 0){
|
1210 |
+
return;
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
$this->run_export_customerGroups();
|
1214 |
+
$this->run_export_shippingMethods();
|
1215 |
+
$this->run_export_currencies();
|
1216 |
+
$this->run_export_stores();
|
1217 |
+
$this->run_export_products();
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
function CDT($in_str)
|
1221 |
+
{
|
1222 |
+
return "<![CDATA[".$in_str."]]>";
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
public function getExportStatus($for='products'){
|
1226 |
+
//should get ststus here
|
1227 |
+
//id ->database log, message=>last message in log, error - on error =1; finished->on script finished =1
|
1228 |
+
$query="SELECT
|
1229 |
+
*
|
1230 |
+
FROM ".$this->process_export_status_table."
|
1231 |
+
where
|
1232 |
+
export_what ='".$for."'
|
1233 |
+
ORDER BY id DESC LIMIT 1";
|
1234 |
+
// where export_what='".$for."' //for future should be spleted by each export type
|
1235 |
+
$read_data = Mage::getSingleton('core/resource')->getConnection('core_read');
|
1236 |
+
|
1237 |
+
if ($readresult=$read_data->query($query)){
|
1238 |
+
$_status = $readresult->fetch();
|
1239 |
+
}else {
|
1240 |
+
$_status=array();
|
1241 |
+
}
|
1242 |
+
if($_status['id']>0){
|
1243 |
+
//if finished<0 - error appeared
|
1244 |
+
$messages=array('id'=>$_status['id'],'message'=>$_status['last_message'],'extended_message'=>$_status['extended_message'], 'error'=>((int)$_status['is_finished']<0?1:0), 'finished'=>((int)$_status['is_finished']>0?1:0),'last_updated'=>$_status['exports_last_updated']);
|
1245 |
+
} else {
|
1246 |
+
$messages=array('id'=>'0','message'=>'inactive', 'error'=>0, 'finished'=>0);
|
1247 |
+
}
|
1248 |
+
|
1249 |
+
return $messages;
|
1250 |
+
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
public function addExportStatus($message, $for ,$extended_message='',$finished=0){
|
1254 |
+
if (!isset($this->process_export_status_id[$for])||$this->process_export_status_id[$for]==0){
|
1255 |
+
$query="INSERT INTO ".$this->process_export_status_table."
|
1256 |
+
(last_message, export_what,exports_start,exports_last_updated,is_finished,extended_message)
|
1257 |
+
VALUES('".$message."','".$for."',now(),now(), '".(int)$finished."','".$extended_message."')";
|
1258 |
+
|
1259 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1260 |
+
$write_data->query($query);
|
1261 |
+
$this->process_export_status_id[$for]=$write_data->lastInsertId();
|
1262 |
+
} else {
|
1263 |
+
$query="update ".$this->process_export_status_table."
|
1264 |
+
set last_message='".$message."', exports_last_updated=now(), is_finished='".(int)$finished."', extended_message='".$extended_message."'
|
1265 |
+
where id=".(int)$this->process_export_status_id[$for]."";
|
1266 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1267 |
+
$write_data->query($query);
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
//extended latst transactions stat table disabled as now it dublicate main status table function
|
1271 |
+
/* if ($this->export_poducts_statistic_id==0){
|
1272 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1273 |
+
$write_data->query("
|
1274 |
+
insert into ".$this->export_poducts_statistic_table."
|
1275 |
+
(start_export,number_of_items,status_export,export_by,status_export_message)
|
1276 |
+
values(now(),0,'process','".$this->export_by."','export start')
|
1277 |
+
");
|
1278 |
+
$this->export_poducts_statistic_id=$write_data->lastInsertId();
|
1279 |
+
}
|
1280 |
+
if($finished==0){
|
1281 |
+
$query = "UPDATE ".$this->export_poducts_statistic_table."
|
1282 |
+
SET status_export='".$message."' ,
|
1283 |
+
status_export_message='".addslashes($extended_message)."'
|
1284 |
+
WHERE export_id=".$this->export_poducts_statistic_id;
|
1285 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1286 |
+
$write_data->query($query);
|
1287 |
+
} else {
|
1288 |
+
$query = "UPDATE ".$this->export_poducts_statistic_table."
|
1289 |
+
SET
|
1290 |
+
status_export='success',
|
1291 |
+
status_export_message='".addslashes($extended_message)."'
|
1292 |
+
finish_export=now()
|
1293 |
+
WHERE
|
1294 |
+
export_id=".$this->export_poducts_statistic_id;
|
1295 |
+
$write_data = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1296 |
+
$write_data->query($query);
|
1297 |
+
}*/
|
1298 |
+
return ;
|
1299 |
+
}
|
1300 |
+
|
1301 |
+
function isRunning($exportType)
|
1302 |
+
{
|
1303 |
+
$current_state=$this->getExportStatus($exportType);
|
1304 |
+
|
1305 |
+
if ($current_state['id']==0) return false;
|
1306 |
+
if ($current_state['finished'] == 1) return false;
|
1307 |
+
if (strtotime($current_state['last_updated'])<strtotime("-1 hour")) return false;
|
1308 |
+
|
1309 |
+
return true;
|
1310 |
+
}
|
1311 |
+
}
|
app/code/community/Holbi/Qixol/Model/Status.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
class Holbi_Qixol_Model_Status extends Varien_Object {
|
|
|
3 |
const STATUS_ENABLED = 1;
|
4 |
-
const STATUS_DISABLED = 2;
|
5 |
|
6 |
static public function getOptionArray() {
|
7 |
return array(
|
8 |
-
self::
|
9 |
-
self::
|
10 |
);
|
11 |
}
|
12 |
|
1 |
<?php
|
2 |
class Holbi_Qixol_Model_Status extends Varien_Object {
|
3 |
+
const STATUS_DISABLED = 0;
|
4 |
const STATUS_ENABLED = 1;
|
|
|
5 |
|
6 |
static public function getOptionArray() {
|
7 |
return array(
|
8 |
+
self::STATUS_DISABLED => Mage::helper('qixol')->__('Disabled'),
|
9 |
+
self::STATUS_ENABLED => Mage::helper('qixol')->__('Enabled')
|
10 |
);
|
11 |
}
|
12 |
|
app/code/community/Holbi/Qixol/Model/Sticker.php
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Sticker extends Mage_Core_Model_Abstract {
|
3 |
-
private $default_stickers=array('BOGOF'=>'BOGOF.png',
|
4 |
-
'BOGOR'=>'BOGOR.png',
|
5 |
-
'BUNDLE'=>'BUNDLE.png',
|
6 |
-
'DEAL'=>'DEAL.png',
|
7 |
-
'DELIVERYREDUCTION'=>'DELIVERYREDUCTION.png',
|
8 |
-
'FREEPRODUCT'=>'FREEPRODUCT.png',
|
9 |
-
'ISSUECOUPON'=>'ISSUECOUPON.png',
|
10 |
-
'ISSUEPOINTS'=>'ISSUEPOINTS.png',
|
11 |
-
'BASKETREDUCTION'=>'BASKETREDUCTION.png',
|
12 |
-
'PRODUCTSREDUCTION'=>'PRODUCTSREDUCTION.png',
|
13 |
-
);
|
14 |
-
protected static $defaultstickerDir = null;
|
15 |
-
protected static $defaultstickerURL = null;
|
16 |
-
|
17 |
-
private $default_sticker_folder='frontend/base/default/images/qixol';
|
18 |
-
|
19 |
-
public function _construct() {
|
20 |
-
self::$defaultstickerDir = Mage::getBaseDir('skin') . DS;
|
21 |
-
self::$defaultstickerURL = Mage::getBaseUrl('skin');
|
22 |
-
parent::_construct();
|
23 |
-
$this->_init('qixol/sticker');
|
24 |
-
}
|
25 |
-
|
26 |
-
public function getAllAvailStickerIds(){
|
27 |
-
$collection = Mage::getResourceModel('qixol/sticker_collection')
|
28 |
-
->getAllIds();
|
29 |
-
return $collection;
|
30 |
-
}
|
31 |
-
|
32 |
-
public function getAllStickers() {
|
33 |
-
$collection = Mage::getResourceModel('qixol/sticker_collection');
|
34 |
-
$collection->getSelect()->where('status = ?', 1);
|
35 |
-
$data = array();
|
36 |
-
foreach ($collection as $record) {
|
37 |
-
$data[$record->getId()] = array('value' => $record->getId(), 'label' => $record->getfilename());
|
38 |
-
}
|
39 |
-
return $data;
|
40 |
-
}
|
41 |
-
|
42 |
-
public function getDataByStickerIds($bannerIds) {
|
43 |
-
$data = array();
|
44 |
-
if ($bannerIds != '') {
|
45 |
-
$collection = Mage::getResourceModel('qixol/sticker_collection');
|
46 |
-
$collection->getSelect()->where('sticker_id IN (' . $bannerIds . ')')->order('sort_order');
|
47 |
-
foreach ($collection as $record) {
|
48 |
-
$status = $record->getStatus();
|
49 |
-
if ($status == 1) {
|
50 |
-
$data[] = $record;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
}
|
54 |
-
return $data;
|
55 |
-
}
|
56 |
-
|
57 |
-
public function getDefaultSticker($stickername) {
|
58 |
-
$data='';
|
59 |
-
if ($stickername!=''&&$this->default_stickers[$stickername]!=''){
|
60 |
-
if (file_exists(self::$defaultstickerDir."/".$this->default_sticker_folder."/".$this->default_stickers[$stickername])){
|
61 |
-
$data=self::$defaultstickerURL."/".$this->default_sticker_folder."/".$this->default_stickers[$stickername];
|
62 |
-
}
|
63 |
-
}
|
64 |
-
return $data;
|
65 |
-
}
|
66 |
-
|
67 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Sticker extends Mage_Core_Model_Abstract {
|
3 |
+
private $default_stickers=array('BOGOF'=>'BOGOF.png',
|
4 |
+
'BOGOR'=>'BOGOR.png',
|
5 |
+
'BUNDLE'=>'BUNDLE.png',
|
6 |
+
'DEAL'=>'DEAL.png',
|
7 |
+
'DELIVERYREDUCTION'=>'DELIVERYREDUCTION.png',
|
8 |
+
'FREEPRODUCT'=>'FREEPRODUCT.png',
|
9 |
+
'ISSUECOUPON'=>'ISSUECOUPON.png',
|
10 |
+
'ISSUEPOINTS'=>'ISSUEPOINTS.png',
|
11 |
+
'BASKETREDUCTION'=>'BASKETREDUCTION.png',
|
12 |
+
'PRODUCTSREDUCTION'=>'PRODUCTSREDUCTION.png',
|
13 |
+
);
|
14 |
+
protected static $defaultstickerDir = null;
|
15 |
+
protected static $defaultstickerURL = null;
|
16 |
+
|
17 |
+
private $default_sticker_folder='frontend/base/default/images/qixol';
|
18 |
+
|
19 |
+
public function _construct() {
|
20 |
+
self::$defaultstickerDir = Mage::getBaseDir('skin') . DS;
|
21 |
+
self::$defaultstickerURL = Mage::getBaseUrl('skin');
|
22 |
+
parent::_construct();
|
23 |
+
$this->_init('qixol/sticker');
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getAllAvailStickerIds(){
|
27 |
+
$collection = Mage::getResourceModel('qixol/sticker_collection')
|
28 |
+
->getAllIds();
|
29 |
+
return $collection;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getAllStickers() {
|
33 |
+
$collection = Mage::getResourceModel('qixol/sticker_collection');
|
34 |
+
$collection->getSelect()->where('status = ?', 1);
|
35 |
+
$data = array();
|
36 |
+
foreach ($collection as $record) {
|
37 |
+
$data[$record->getId()] = array('value' => $record->getId(), 'label' => $record->getfilename());
|
38 |
+
}
|
39 |
+
return $data;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getDataByStickerIds($bannerIds) {
|
43 |
+
$data = array();
|
44 |
+
if ($bannerIds != '') {
|
45 |
+
$collection = Mage::getResourceModel('qixol/sticker_collection');
|
46 |
+
$collection->getSelect()->where('sticker_id IN (' . $bannerIds . ')')->order('sort_order');
|
47 |
+
foreach ($collection as $record) {
|
48 |
+
$status = $record->getStatus();
|
49 |
+
if ($status == 1) {
|
50 |
+
$data[] = $record;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
return $data;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function getDefaultSticker($stickername) {
|
58 |
+
$data='';
|
59 |
+
if ($stickername!=''&&$this->default_stickers[$stickername]!=''){
|
60 |
+
if (file_exists(self::$defaultstickerDir."/".$this->default_sticker_folder."/".$this->default_stickers[$stickername])){
|
61 |
+
$data=self::$defaultstickerURL."/".$this->default_sticker_folder."/".$this->default_stickers[$stickername];
|
62 |
+
}
|
63 |
+
}
|
64 |
+
return $data;
|
65 |
+
}
|
66 |
+
|
67 |
}
|
app/code/community/Holbi/Qixol/Model/Storesmap.php
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Model_Storesmap extends Mage_Core_Model_Abstract {
|
3 |
-
|
4 |
-
public function _construct() {
|
5 |
-
parent::_construct();
|
6 |
-
$this->_init('qixol/storesmap', "store_name");
|
7 |
-
}
|
8 |
-
|
9 |
-
public function getOptionArray(){
|
10 |
-
$hlp = Mage::helper('qixol');
|
11 |
-
$collections=$this->getCollection();
|
12 |
-
$list_return=array();
|
13 |
-
foreach ($collections as $item){
|
14 |
-
$list_return[]=array(
|
15 |
-
'value' => (string)$item->getStoreName(),
|
16 |
-
'label' => $hlp->__((string)$item->getStoreName())
|
17 |
-
);
|
18 |
-
}
|
19 |
-
return $list_return;
|
20 |
-
}
|
21 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_Storesmap extends Mage_Core_Model_Abstract {
|
3 |
+
|
4 |
+
public function _construct() {
|
5 |
+
parent::_construct();
|
6 |
+
$this->_init('qixol/storesmap', "store_name");
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getOptionArray(){
|
10 |
+
$hlp = Mage::helper('qixol');
|
11 |
+
$collections=$this->getCollection();
|
12 |
+
$list_return=array();
|
13 |
+
foreach ($collections as $item){
|
14 |
+
$list_return[]=array(
|
15 |
+
'value' => (string)$item->getStoreName(),
|
16 |
+
'label' => $hlp->__((string)$item->getStoreName())
|
17 |
+
);
|
18 |
+
}
|
19 |
+
return $list_return;
|
20 |
+
}
|
21 |
}
|
app/code/community/Holbi/Qixol/Model/System/Config/Source/IServiceProtocols/Values.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Model_System_Config_Source_IServiceProtocols_Values
|
3 |
+
{
|
4 |
+
|
5 |
+
public function getAllOptions()
|
6 |
+
{
|
7 |
+
$hlp = Mage::helper('qixol');
|
8 |
+
return array(
|
9 |
+
array('label'=>$hlp->__('REST services [RECOMMENDED]'), 'value'=>'REST'),
|
10 |
+
array('label'=>$hlp->__('SOAP services'), 'value'=>'SOAP')
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
public function toOptionArray(){
|
15 |
+
$hlp = Mage::helper('qixol');
|
16 |
+
|
17 |
+
return array(
|
18 |
+
array(
|
19 |
+
'value' => 'REST',
|
20 |
+
'label' => $hlp->__('REST services [RECOMMENDED]')
|
21 |
+
),
|
22 |
+
array(
|
23 |
+
'value' => 'SOAP',
|
24 |
+
'label' => $hlp->__('SOAP services')
|
25 |
+
)
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Holbi/Qixol/Model/System/Config/Source/Iservices/Values.php
CHANGED
@@ -8,7 +8,7 @@ class Holbi_Qixol_Model_System_Config_Source_Iservices_Values
|
|
8 |
return array(
|
9 |
array('label'=>$hlp->__('evaluation services'), 'value'=>'evaluation'),
|
10 |
array('label'=>$hlp->__('live services'), 'value'=>'live'),
|
11 |
-
|
12 |
);
|
13 |
}
|
14 |
|
@@ -24,6 +24,10 @@ class Holbi_Qixol_Model_System_Config_Source_Iservices_Values
|
|
24 |
'value' => 'live',
|
25 |
'label' => $hlp->__('live services'),
|
26 |
),
|
|
|
|
|
|
|
|
|
27 |
);
|
28 |
}
|
29 |
}
|
8 |
return array(
|
9 |
array('label'=>$hlp->__('evaluation services'), 'value'=>'evaluation'),
|
10 |
array('label'=>$hlp->__('live services'), 'value'=>'live'),
|
11 |
+
array('label'=>$hlp->__('custom services'), 'value'=>'custom')
|
12 |
);
|
13 |
}
|
14 |
|
24 |
'value' => 'live',
|
25 |
'label' => $hlp->__('live services'),
|
26 |
),
|
27 |
+
array(
|
28 |
+
'value' => 'custom',
|
29 |
+
'label' => $hlp->__('custom services')
|
30 |
+
)
|
31 |
);
|
32 |
}
|
33 |
}
|
app/code/community/Holbi/Qixol/Model/System/Config/Source/Shippings/List.php
CHANGED
@@ -4,12 +4,8 @@ class Holbi_Qixol_Model_System_Config_Source_Shippings_List
|
|
4 |
|
5 |
public function toOptionArray(){
|
6 |
$hlp = Mage::helper('qixol');
|
7 |
-
|
8 |
-
|
9 |
-
if ($only_active>0)
|
10 |
-
$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
11 |
-
else
|
12 |
-
$methods = Mage::getSingleton('shipping/config')->getAllCarriers();
|
13 |
|
14 |
$options = array();
|
15 |
|
4 |
|
5 |
public function toOptionArray(){
|
6 |
$hlp = Mage::helper('qixol');
|
7 |
+
//$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
8 |
+
$methods = Mage::getSingleton('shipping/config')->getAllCarriers();
|
|
|
|
|
|
|
|
|
9 |
|
10 |
$options = array();
|
11 |
|
app/code/community/Holbi/Qixol/Model/iPromoService.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this license header, choose License Headers in Project Properties.
|
5 |
+
* To change this template file, choose Tools | Templates
|
6 |
+
* and open the template in the editor.
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
*
|
11 |
+
* @author ken
|
12 |
+
*/
|
13 |
+
interface iPromoService
|
14 |
+
{
|
15 |
+
function CustomerGroupExport($data);
|
16 |
+
function ShippingMethodsExport($data);
|
17 |
+
function CurrenciesExport($data);
|
18 |
+
function StoresExport($data);
|
19 |
+
function ProductsExport($data);
|
20 |
+
|
21 |
+
function PromotionsForProducts($data);
|
22 |
+
function PromotionsForBaskets($data);
|
23 |
+
function CouponCodesImport();
|
24 |
+
|
25 |
+
function BasketValidate($data);
|
26 |
+
function CouponCodeValidate($couponCode);
|
27 |
+
function RetrieveValidatedBasket($basketRef);
|
28 |
+
function BasketCheck();
|
29 |
+
}
|
app/code/community/Holbi/Qixol/controllers/Adminhtml/BannerController.php
CHANGED
@@ -1,248 +1,258 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Adminhtml_BannerController extends Mage_Adminhtml_Controller_action {
|
3 |
-
|
4 |
-
protected function _initAction() {
|
5 |
-
$this->loadLayout()
|
6 |
-
->_setActiveMenu('qixol/items')
|
7 |
-
->_addBreadcrumb(Mage::helper('qixol')->__('Banner Manager'), Mage::helper('qixol')->__('Banner Manager'));
|
8 |
-
|
9 |
-
return $this;
|
10 |
-
}
|
11 |
-
|
12 |
-
public function indexAction() {
|
13 |
-
$this->_initAction()
|
14 |
-
->renderLayout();
|
15 |
-
}
|
16 |
-
|
17 |
-
public function editAction() {
|
18 |
-
$id = $this->getRequest()->getParam('id');
|
19 |
-
$model = Mage::getModel('qixol/banner')->load($id);
|
20 |
-
|
21 |
-
//$BannerImages = Mage::getModel('qixol/banner')->getBannerImages($id);
|
22 |
-
|
23 |
-
|
24 |
-
if ($model->getId() || $id == 0) {
|
25 |
-
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
26 |
-
if (!empty($data)) {
|
27 |
-
$model->setData($data);
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
Mage::register('banner_data', $model);
|
32 |
-
|
33 |
-
$this->loadLayout();
|
34 |
-
$this->_setActiveMenu('qixol/items');
|
35 |
-
|
36 |
-
$this->_addBreadcrumb(Mage::helper('qixol')->__('Banner Manager'), Mage::helper('qixol')->__('Banner Manager'));
|
37 |
-
$this->_addBreadcrumb(Mage::helper('qixol')->__('Item Banner'), Mage::helper('qixol')->__('Item Banner'));
|
38 |
-
|
39 |
-
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
40 |
-
|
41 |
-
$this->_addContent($this->getLayout()->createBlock('qixol/adminhtml_banner_edit'))
|
42 |
-
->_addLeft($this->getLayout()->createBlock('qixol/adminhtml_banner_edit_tabs'));
|
43 |
-
$version = substr(Mage::getVersion(), 0, 3);
|
44 |
-
if (($version=='1.4' || $version=='1.5') && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
45 |
-
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
46 |
-
}
|
47 |
-
$this->renderLayout();
|
48 |
-
} else {
|
49 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Item does not exist'));
|
50 |
-
$this->_redirect('*/*/');
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
public function newAction() {
|
55 |
-
$this->_forward('edit');
|
56 |
-
}
|
57 |
-
|
58 |
-
public function saveAction() {
|
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 |
-
|
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 |
-
$this
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
$
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
$
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
$response->
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Adminhtml_BannerController extends Mage_Adminhtml_Controller_action {
|
3 |
+
|
4 |
+
protected function _initAction() {
|
5 |
+
$this->loadLayout()
|
6 |
+
->_setActiveMenu('qixol/items')
|
7 |
+
->_addBreadcrumb(Mage::helper('qixol')->__('Banner Manager'), Mage::helper('qixol')->__('Banner Manager'));
|
8 |
+
|
9 |
+
return $this;
|
10 |
+
}
|
11 |
+
|
12 |
+
public function indexAction() {
|
13 |
+
$this->_initAction()
|
14 |
+
->renderLayout();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function editAction() {
|
18 |
+
$id = $this->getRequest()->getParam('id');
|
19 |
+
$model = Mage::getModel('qixol/banner')->load($id);
|
20 |
+
|
21 |
+
//$BannerImages = Mage::getModel('qixol/banner')->getBannerImages($id);
|
22 |
+
|
23 |
+
|
24 |
+
if ($model->getId() || $id == 0) {
|
25 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
26 |
+
if (!empty($data)) {
|
27 |
+
$model->setData($data);
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
Mage::register('banner_data', $model);
|
32 |
+
|
33 |
+
$this->loadLayout();
|
34 |
+
$this->_setActiveMenu('qixol/items');
|
35 |
+
|
36 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Banner Manager'), Mage::helper('qixol')->__('Banner Manager'));
|
37 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Item Banner'), Mage::helper('qixol')->__('Item Banner'));
|
38 |
+
|
39 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
40 |
+
|
41 |
+
$this->_addContent($this->getLayout()->createBlock('qixol/adminhtml_banner_edit'))
|
42 |
+
->_addLeft($this->getLayout()->createBlock('qixol/adminhtml_banner_edit_tabs'));
|
43 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
44 |
+
if (($version=='1.4' || $version=='1.5') && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
45 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
46 |
+
}
|
47 |
+
$this->renderLayout();
|
48 |
+
} else {
|
49 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Item does not exist'));
|
50 |
+
$this->_redirect('*/*/');
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
public function newAction() {
|
55 |
+
$this->_forward('edit');
|
56 |
+
}
|
57 |
+
|
58 |
+
public function saveAction() {
|
59 |
+
if ($data = $this->getRequest()->getPost()) {
|
60 |
+
if (is_array($data['display_zone'])){
|
61 |
+
$data['display_zone']=join(",",$data['display_zone']);
|
62 |
+
}
|
63 |
+
|
64 |
+
$model = Mage::getModel('qixol/banner');
|
65 |
+
$model->setData($data)
|
66 |
+
->setId($this->getRequest()->getParam('id'));
|
67 |
+
|
68 |
+
try {
|
69 |
+
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
70 |
+
$model->setCreatedTime(now())
|
71 |
+
->setUpdateTime(now());
|
72 |
+
} else {
|
73 |
+
$model->setUpdateTime(now());
|
74 |
+
}
|
75 |
+
|
76 |
+
$model->save();
|
77 |
+
|
78 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('qixol')->__('Item was successfully saved'));
|
79 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
80 |
+
|
81 |
+
if ($this->getRequest()->getParam('back')||$image_saved) {
|
82 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
$this->_redirect('*/*/');
|
86 |
+
return;
|
87 |
+
} catch (Exception $e) {
|
88 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
89 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
90 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Unable to find item to save'));
|
95 |
+
$this->_redirect('*/*/');
|
96 |
+
}
|
97 |
+
|
98 |
+
public function deleteAction() {
|
99 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
100 |
+
try {
|
101 |
+
$model = Mage::getModel('qixol/banner')->load($this->getRequest()->getParam('id'));
|
102 |
+
$_helper = Mage::helper('qixol');
|
103 |
+
//$filePath = Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($model->getFilename());
|
104 |
+
$model->delete();
|
105 |
+
//$this->removeFile($filePath);
|
106 |
+
|
107 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('qixol')->__('Item was successfully deleted'));
|
108 |
+
$this->_redirect('*/*/');
|
109 |
+
} catch (Exception $e) {
|
110 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
111 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
112 |
+
}
|
113 |
+
}
|
114 |
+
$this->_redirect('*/*/');
|
115 |
+
}
|
116 |
+
|
117 |
+
public function massDeleteAction() {
|
118 |
+
$bannerIds = $this->getRequest()->getParam('banner');
|
119 |
+
if (!is_array($bannerIds)) {
|
120 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Please select item(s)'));
|
121 |
+
} else {
|
122 |
+
try {
|
123 |
+
foreach ($bannerIds as $bannerId) {
|
124 |
+
$model = Mage::getModel('qixol/banner')->load($bannerId);
|
125 |
+
$_helper = Mage::helper('qixol');
|
126 |
+
//$filePath = Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($model->getFilename());
|
127 |
+
$model->delete();
|
128 |
+
//$this->removeFile($filePath);
|
129 |
+
}
|
130 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
131 |
+
Mage::helper('qixol')->__(
|
132 |
+
'Total of %d record(s) were successfully deleted', count($bannerIds)
|
133 |
+
)
|
134 |
+
);
|
135 |
+
} catch (Exception $e) {
|
136 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
137 |
+
}
|
138 |
+
}
|
139 |
+
$this->_redirect('*/*/index');
|
140 |
+
}
|
141 |
+
|
142 |
+
public function massStatusAction() {
|
143 |
+
$bannerIds = $this->getRequest()->getParam('banner');
|
144 |
+
if (!is_array($bannerIds)) {
|
145 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
146 |
+
} else {
|
147 |
+
try {
|
148 |
+
foreach ($bannerIds as $bannerId) {
|
149 |
+
$banner = Mage::getSingleton('qixol/banner')
|
150 |
+
->load($bannerId)
|
151 |
+
->setStatus($this->getRequest()->getParam('status'))
|
152 |
+
->setIsMassupdate(true)
|
153 |
+
->save();
|
154 |
+
}
|
155 |
+
$this->_getSession()->addSuccess(
|
156 |
+
$this->__('Total of %d record(s) were successfully updated', count($bannerIds))
|
157 |
+
);
|
158 |
+
} catch (Exception $e) {
|
159 |
+
$this->_getSession()->addError($e->getMessage());
|
160 |
+
}
|
161 |
+
}
|
162 |
+
$this->_redirect('*/*/index');
|
163 |
+
}
|
164 |
+
|
165 |
+
public function exportCsvAction() {
|
166 |
+
$fileName = 'banner.csv';
|
167 |
+
$content = $this->getLayout()->createBlock('qixol/adminhtml_banner_grid')
|
168 |
+
->getCsv();
|
169 |
+
|
170 |
+
$this->_sendUploadResponse($fileName, $content);
|
171 |
+
}
|
172 |
+
|
173 |
+
public function exportXmlAction() {
|
174 |
+
$fileName = 'banner.xml';
|
175 |
+
$content = $this->getLayout()->createBlock('qixol/adminhtml_banner_grid')
|
176 |
+
->getXml();
|
177 |
+
|
178 |
+
$this->_sendUploadResponse($fileName, $content);
|
179 |
+
}
|
180 |
+
|
181 |
+
public function uploadAction()
|
182 |
+
{
|
183 |
+
try {
|
184 |
+
$uploader = new Mage_Core_Model_File_Uploader('image');
|
185 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
186 |
+
$uploader->addValidateCallback('catalog_product_image',
|
187 |
+
Mage::helper('catalog/image'), 'validateUploadFile');
|
188 |
+
$uploader->setAllowRenameFiles(true);
|
189 |
+
$uploader->setFilesDispersion(true);
|
190 |
+
|
191 |
+
// TODO: 'custom' and 'banners' to be read from config
|
192 |
+
// TODO: better folder / file naming convention
|
193 |
+
// $ext = substr($_FILES['filename']['name'], strrpos($_FILES['filename']['name'], '.') + 1);
|
194 |
+
// $fname = 'File-' . time() . '.' . $ext;
|
195 |
+
// $path = Mage::getBaseDir('media') . DS . 'custom' . DS . 'banners';
|
196 |
+
$result = $uploader->save(
|
197 |
+
Mage::getSingleton('catalog/product_media_config')->getBaseTmpMediaPath()
|
198 |
+
);
|
199 |
+
|
200 |
+
// Mage::dispatchEvent('catalog_product_gallery_upload_image_after', array(
|
201 |
+
// 'result' => $result,
|
202 |
+
// 'action' => $this
|
203 |
+
// ));
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Workaround for prototype 1.7 methods "isJSON", "evalJSON" on Windows OS
|
207 |
+
*/
|
208 |
+
$result['tmp_name'] = str_replace(DS, "/", $result['tmp_name']);
|
209 |
+
$result['path'] = str_replace(DS, "/", $result['path']);
|
210 |
+
|
211 |
+
$result['url'] = Mage::getSingleton('catalog/product_media_config')->getTmpMediaUrl($result['file']);
|
212 |
+
$result['file'] = $result['file'] . '.tmp';
|
213 |
+
$result['cookie'] = array(
|
214 |
+
'name' => session_name(),
|
215 |
+
'value' => $this->_getSession()->getSessionId(),
|
216 |
+
'lifetime' => $this->_getSession()->getCookieLifetime(),
|
217 |
+
'path' => $this->_getSession()->getCookiePath(),
|
218 |
+
'domain' => $this->_getSession()->getCookieDomain()
|
219 |
+
);
|
220 |
+
|
221 |
+
} catch (Exception $e) {
|
222 |
+
$result = array(
|
223 |
+
'error' => $e->getMessage(),
|
224 |
+
'errorcode' => $e->getCode());
|
225 |
+
}
|
226 |
+
|
227 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
228 |
+
}
|
229 |
+
|
230 |
+
// public function addBannerImageAction() {
|
231 |
+
// $this->_forward('edit/bannerimage_edit');
|
232 |
+
// }
|
233 |
+
//
|
234 |
+
// protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {
|
235 |
+
// $response = $this->getResponse();
|
236 |
+
// $response->setHeader('HTTP/1.1 200 OK', '');
|
237 |
+
// $response->setHeader('Pragma', 'public', true);
|
238 |
+
// $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
239 |
+
// $response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
|
240 |
+
// $response->setHeader('Last-Modified', date('r'));
|
241 |
+
// $response->setHeader('Accept-Ranges', 'bytes');
|
242 |
+
// $response->setHeader('Content-Length', strlen($content));
|
243 |
+
// $response->setHeader('Content-type', $contentType);
|
244 |
+
// $response->setBody($content);
|
245 |
+
// $response->sendResponse();
|
246 |
+
// die;
|
247 |
+
// }
|
248 |
+
|
249 |
+
protected function removeFile($file) {
|
250 |
+
try {
|
251 |
+
$io = new Varien_Io_File();
|
252 |
+
$result = $io->rmdir($file, true);
|
253 |
+
} catch (Exception $e) {
|
254 |
+
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
}
|
app/code/community/Holbi/Qixol/controllers/Adminhtml/BannerimageController.php
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Adminhtml_BannerimageController extends Mage_Adminhtml_Controller_action {
|
3 |
+
|
4 |
+
protected function _initAction() {
|
5 |
+
$this->loadLayout()
|
6 |
+
->_setActiveMenu('qixol/items')
|
7 |
+
->_addBreadcrumb(Mage::helper('qixol')->__('Banner Image Manager'), Mage::helper('qixol')->__('Banner Image Manager'));
|
8 |
+
|
9 |
+
return $this;
|
10 |
+
}
|
11 |
+
|
12 |
+
public function indexAction() {
|
13 |
+
$this->_initAction()
|
14 |
+
->renderLayout();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function editAction() {
|
18 |
+
$id = $this->getRequest()->getParam('id');
|
19 |
+
$model = Mage::getModel('qixol/bannerimage')->load($id);
|
20 |
+
|
21 |
+
if ($model->getId() || $id == 0) {
|
22 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
23 |
+
if (!empty($data)) {
|
24 |
+
$model->setData($data);
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
Mage::register('bannerimage_data', $model);
|
29 |
+
|
30 |
+
$this->loadLayout();
|
31 |
+
$this->_setActiveMenu('qixol/items');
|
32 |
+
|
33 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Banner Image Manager'), Mage::helper('qixol')->__('Banner Image Manager'));
|
34 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Item Banner'), Mage::helper('qixol')->__('Item Banner'));
|
35 |
+
|
36 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
37 |
+
|
38 |
+
$this->_addContent($this->getLayout()->createBlock('qixol/adminhtml_bannerimage_edit'))
|
39 |
+
->_addLeft($this->getLayout()->createBlock('qixol/adminhtml_bannerimage_edit_tabs'));
|
40 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
41 |
+
if (($version=='1.4' || $version=='1.5') && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
42 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
43 |
+
}
|
44 |
+
$this->renderLayout();
|
45 |
+
} else {
|
46 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Item does not exist'));
|
47 |
+
$this->_redirect('*/*/');
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
public function newAction() {
|
52 |
+
$this->_forward('edit');
|
53 |
+
}
|
54 |
+
|
55 |
+
public function saveAction() {
|
56 |
+
$imagedata = array();
|
57 |
+
if (!empty($_FILES['filename']['name'])) {
|
58 |
+
try {
|
59 |
+
$ext = substr($_FILES['filename']['name'], strrpos($_FILES['filename']['name'], '.') + 1);
|
60 |
+
$fname = 'File-' . time() . '.' . $ext;
|
61 |
+
$uploader = new Varien_File_Uploader('filename');
|
62 |
+
$uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png')); // or pdf or anything
|
63 |
+
|
64 |
+
$uploader->setAllowRenameFiles(true);
|
65 |
+
$uploader->setFilesDispersion(false);
|
66 |
+
|
67 |
+
$path = Mage::getBaseDir('media').DS.'custom'.DS.'banners';
|
68 |
+
|
69 |
+
$uploader->save($path, $fname);
|
70 |
+
|
71 |
+
$imagedata['filename'] = 'custom/banners/'.$fname;
|
72 |
+
} catch (Exception $e) {
|
73 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
74 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
if ($data = $this->getRequest()->getPost()) {
|
79 |
+
if (!empty($imagedata['filename'])) {
|
80 |
+
$data['filename'] = $imagedata['filename'];
|
81 |
+
} else {
|
82 |
+
if (isset($data['filename']['delete']) && $data['filename']['delete'] == 1) {
|
83 |
+
if ($data['filename']['value'] != '') {
|
84 |
+
$_helper = Mage::helper('qixol');
|
85 |
+
$this->removeFile(Mage::getBaseDir('media').DS.'custom'.DS.'banners'.DS.$_helper->updateDirSepereator($data['filename']['value']));
|
86 |
+
}
|
87 |
+
$data['filename'] = '';
|
88 |
+
} else {
|
89 |
+
unset($data['filename']);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
$model = Mage::getModel('qixol/bannerimage');
|
93 |
+
$model->setData($data)
|
94 |
+
->setId($this->getRequest()->getParam('id'));
|
95 |
+
|
96 |
+
try {
|
97 |
+
$model->save();
|
98 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('qixol')->__('Item was successfully saved'));
|
99 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
100 |
+
|
101 |
+
$this->_redirect('*/adminhtml_banner/edit', array('id' => $this->getRequest()->getParam('banner_id')));
|
102 |
+
return;
|
103 |
+
} catch (Exception $e) {
|
104 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
105 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
106 |
+
$this->_redirect('*/adminhtml_banner/edit', array('id' => $this->getRequest()->getParam('banner_id')));
|
107 |
+
return;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Unable to find item to save'));
|
111 |
+
$this->_redirect('*/adminhtml_banner/');
|
112 |
+
}
|
113 |
+
|
114 |
+
public function deleteAction() {
|
115 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
116 |
+
try {
|
117 |
+
$model = Mage::getModel('qixol/banner')->load($this->getRequest()->getParam('id'));
|
118 |
+
$_helper = Mage::helper('qixol');
|
119 |
+
//$filePath = Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($model->getFilename());
|
120 |
+
$model->delete();
|
121 |
+
//$this->removeFile($filePath);
|
122 |
+
|
123 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('qixol')->__('Item was successfully deleted'));
|
124 |
+
$this->_redirect('*/*/');
|
125 |
+
} catch (Exception $e) {
|
126 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
127 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
128 |
+
}
|
129 |
+
}
|
130 |
+
$this->_redirect('*/*/');
|
131 |
+
}
|
132 |
+
|
133 |
+
public function massDeleteAction() {
|
134 |
+
$bannerIds = $this->getRequest()->getParam('banner');
|
135 |
+
if (!is_array($bannerIds)) {
|
136 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Please select item(s)'));
|
137 |
+
} else {
|
138 |
+
try {
|
139 |
+
foreach ($bannerIds as $bannerId) {
|
140 |
+
$model = Mage::getModel('qixol/banner')->load($bannerId);
|
141 |
+
$_helper = Mage::helper('qixol');
|
142 |
+
//$filePath = Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($model->getFilename());
|
143 |
+
$model->delete();
|
144 |
+
//$this->removeFile($filePath);
|
145 |
+
}
|
146 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
147 |
+
Mage::helper('qixol')->__(
|
148 |
+
'Total of %d record(s) were successfully deleted', count($bannerIds)
|
149 |
+
)
|
150 |
+
);
|
151 |
+
} catch (Exception $e) {
|
152 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
153 |
+
}
|
154 |
+
}
|
155 |
+
$this->_redirect('*/*/index');
|
156 |
+
}
|
157 |
+
|
158 |
+
public function massStatusAction() {
|
159 |
+
$bannerIds = $this->getRequest()->getParam('banner');
|
160 |
+
if (!is_array($bannerIds)) {
|
161 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
162 |
+
} else {
|
163 |
+
try {
|
164 |
+
foreach ($bannerIds as $bannerId) {
|
165 |
+
$banner = Mage::getSingleton('qixol/banner')
|
166 |
+
->load($bannerId)
|
167 |
+
->setStatus($this->getRequest()->getParam('status'))
|
168 |
+
->setIsMassupdate(true)
|
169 |
+
->save();
|
170 |
+
}
|
171 |
+
$this->_getSession()->addSuccess(
|
172 |
+
$this->__('Total of %d record(s) were successfully updated', count($bannerIds))
|
173 |
+
);
|
174 |
+
} catch (Exception $e) {
|
175 |
+
$this->_getSession()->addError($e->getMessage());
|
176 |
+
}
|
177 |
+
}
|
178 |
+
$this->_redirect('*/*/index');
|
179 |
+
}
|
180 |
+
|
181 |
+
public function uploadAction()
|
182 |
+
{
|
183 |
+
try {
|
184 |
+
$uploader = new Mage_Core_Model_File_Uploader('image');
|
185 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
186 |
+
$uploader->addValidateCallback('catalog_product_image',
|
187 |
+
Mage::helper('catalog/image'), 'validateUploadFile');
|
188 |
+
$uploader->setAllowRenameFiles(true);
|
189 |
+
$uploader->setFilesDispersion(true);
|
190 |
+
|
191 |
+
// TODO: 'custom' and 'banners' to be read from config
|
192 |
+
// TODO: better folder / file naming convention
|
193 |
+
// $ext = substr($_FILES['filename']['name'], strrpos($_FILES['filename']['name'], '.') + 1);
|
194 |
+
// $fname = 'File-' . time() . '.' . $ext;
|
195 |
+
// $path = Mage::getBaseDir('media') . DS . 'custom' . DS . 'banners';
|
196 |
+
$result = $uploader->save(
|
197 |
+
Mage::getSingleton('catalog/product_media_config')->getBaseTmpMediaPath()
|
198 |
+
);
|
199 |
+
|
200 |
+
// Mage::dispatchEvent('catalog_product_gallery_upload_image_after', array(
|
201 |
+
// 'result' => $result,
|
202 |
+
// 'action' => $this
|
203 |
+
// ));
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Workaround for prototype 1.7 methods "isJSON", "evalJSON" on Windows OS
|
207 |
+
*/
|
208 |
+
$result['tmp_name'] = str_replace(DS, "/", $result['tmp_name']);
|
209 |
+
$result['path'] = str_replace(DS, "/", $result['path']);
|
210 |
+
|
211 |
+
$result['url'] = Mage::getSingleton('catalog/product_media_config')->getTmpMediaUrl($result['file']);
|
212 |
+
$result['file'] = $result['file'] . '.tmp';
|
213 |
+
$result['cookie'] = array(
|
214 |
+
'name' => session_name(),
|
215 |
+
'value' => $this->_getSession()->getSessionId(),
|
216 |
+
'lifetime' => $this->_getSession()->getCookieLifetime(),
|
217 |
+
'path' => $this->_getSession()->getCookiePath(),
|
218 |
+
'domain' => $this->_getSession()->getCookieDomain()
|
219 |
+
);
|
220 |
+
|
221 |
+
} catch (Exception $e) {
|
222 |
+
$result = array(
|
223 |
+
'error' => $e->getMessage(),
|
224 |
+
'errorcode' => $e->getCode());
|
225 |
+
}
|
226 |
+
|
227 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
228 |
+
}
|
229 |
+
|
230 |
+
public function addBannerImageAction() {
|
231 |
+
$this->_forward('edit');
|
232 |
+
}
|
233 |
+
|
234 |
+
// protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {
|
235 |
+
// $response = $this->getResponse();
|
236 |
+
// $response->setHeader('HTTP/1.1 200 OK', '');
|
237 |
+
// $response->setHeader('Pragma', 'public', true);
|
238 |
+
// $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
239 |
+
// $response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
|
240 |
+
// $response->setHeader('Last-Modified', date('r'));
|
241 |
+
// $response->setHeader('Accept-Ranges', 'bytes');
|
242 |
+
// $response->setHeader('Content-Length', strlen($content));
|
243 |
+
// $response->setHeader('Content-type', $contentType);
|
244 |
+
// $response->setBody($content);
|
245 |
+
// $response->sendResponse();
|
246 |
+
// die;
|
247 |
+
// }
|
248 |
+
|
249 |
+
protected function removeFile($file) {
|
250 |
+
try {
|
251 |
+
$io = new Varien_Io_File();
|
252 |
+
$result = $io->rmdir($file, true);
|
253 |
+
} catch (Exception $e) {
|
254 |
+
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
}
|
app/code/community/Holbi/Qixol/controllers/Adminhtml/CustomergrouspmapController.php
CHANGED
@@ -4,7 +4,7 @@ class Holbi_Qixol_Adminhtml_CustomergrouspmapController extends Mage_Adminhtml_C
|
|
4 |
protected function _initAction() {
|
5 |
$this->loadLayout()
|
6 |
->_setActiveMenu('qixol/customergrouspmap')
|
7 |
-
->_addBreadcrumb(Mage::helper('qixol')->__('Customer
|
8 |
|
9 |
return $this;
|
10 |
}
|
@@ -30,7 +30,7 @@ class Holbi_Qixol_Adminhtml_CustomergrouspmapController extends Mage_Adminhtml_C
|
|
30 |
$this->loadLayout();
|
31 |
$this->_setActiveMenu('qixol/customergrouspmap');
|
32 |
|
33 |
-
$this->_addBreadcrumb(Mage::helper('qixol')->__('Customer Group
|
34 |
|
35 |
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
36 |
|
4 |
protected function _initAction() {
|
5 |
$this->loadLayout()
|
6 |
->_setActiveMenu('qixol/customergrouspmap')
|
7 |
+
->_addBreadcrumb(Mage::helper('qixol')->__('Customer Group Integration Codes'), Mage::helper('qixol')->__('Customer Group Integration Codes'));
|
8 |
|
9 |
return $this;
|
10 |
}
|
30 |
$this->loadLayout();
|
31 |
$this->_setActiveMenu('qixol/customergrouspmap');
|
32 |
|
33 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Customer Group Integration Codes'), Mage::helper('qixol')->__('Customer Group Integration Codes'));
|
34 |
|
35 |
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
36 |
|
app/code/community/Holbi/Qixol/controllers/Adminhtml/ShippingmapController.php
CHANGED
@@ -4,7 +4,7 @@ class Holbi_Qixol_Adminhtml_ShippingmapController extends Mage_Adminhtml_Control
|
|
4 |
protected function _initAction() {
|
5 |
$this->loadLayout()
|
6 |
->_setActiveMenu('qixol/shippingmap')
|
7 |
-
->_addBreadcrumb(Mage::helper('qixol')->__('
|
8 |
|
9 |
return $this;
|
10 |
}
|
4 |
protected function _initAction() {
|
5 |
$this->loadLayout()
|
6 |
->_setActiveMenu('qixol/shippingmap')
|
7 |
+
->_addBreadcrumb(Mage::helper('qixol')->__('Shipping Method Integration Codes'), Mage::helper('qixol')->__('Shipping Method Integration Codes'));
|
8 |
|
9 |
return $this;
|
10 |
}
|
app/code/community/Holbi/Qixol/controllers/Adminhtml/StickerController.php
CHANGED
@@ -1,224 +1,208 @@
|
|
1 |
-
<?php
|
2 |
-
class Holbi_Qixol_Adminhtml_StickerController extends Mage_Adminhtml_Controller_action {
|
3 |
-
|
4 |
-
protected function _initAction() {
|
5 |
-
$this->loadLayout()
|
6 |
-
->_setActiveMenu('qixol/items')
|
7 |
-
->_addBreadcrumb(Mage::helper('qixol')->__('Sticker Manager'), Mage::helper('qixol')->__('Sticker Manager'));
|
8 |
-
|
9 |
-
return $this;
|
10 |
-
}
|
11 |
-
|
12 |
-
public function indexAction() {
|
13 |
-
$this->_initAction()
|
14 |
-
->renderLayout();
|
15 |
-
}
|
16 |
-
|
17 |
-
public function editAction() {
|
18 |
-
$id = $this->getRequest()->getParam('id');
|
19 |
-
$model = Mage::getModel('qixol/sticker')->load($id);
|
20 |
-
|
21 |
-
if ($model->getId() || $id == 0) {
|
22 |
-
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
23 |
-
if (!empty($data)) {
|
24 |
-
$model->setData($data);
|
25 |
-
}
|
26 |
-
|
27 |
-
Mage::register('sticker_data', $model);
|
28 |
-
|
29 |
-
$this->loadLayout();
|
30 |
-
$this->_setActiveMenu('qixol/items');
|
31 |
-
|
32 |
-
$this->_addBreadcrumb(Mage::helper('qixol')->__('Sticker Manager'), Mage::helper('qixol')->__('Sticker Manager'));
|
33 |
-
$this->_addBreadcrumb(Mage::helper('qixol')->__('Item Sticker'), Mage::helper('qixol')->__('Item Sticker'));
|
34 |
-
|
35 |
-
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
36 |
-
|
37 |
-
$this->_addContent($this->getLayout()->createBlock('qixol/adminhtml_sticker_edit'))
|
38 |
-
->_addLeft($this->getLayout()->createBlock('qixol/adminhtml_sticker_edit_tabs'));
|
39 |
-
$version = substr(Mage::getVersion(), 0, 3);
|
40 |
-
if (($version=='1.4' || $version=='1.5') && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
41 |
-
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
42 |
-
}
|
43 |
-
$this->renderLayout();
|
44 |
-
} else {
|
45 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Sticker does not exist'));
|
46 |
-
$this->_redirect('*/*/');
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
public function newAction() {
|
51 |
-
$this->_forward('edit');
|
52 |
-
}
|
53 |
-
|
54 |
-
public function saveAction() {
|
55 |
-
$imagedata = array();
|
56 |
-
if (!empty($_FILES['filename']['name'])) {
|
57 |
-
try {
|
58 |
-
$ext = substr($_FILES['filename']['name'], strrpos($_FILES['filename']['name'], '.') + 1);
|
59 |
-
$fname = 'File-' . time() . '.' . $ext;
|
60 |
-
$uploader = new Varien_File_Uploader('filename');
|
61 |
-
$uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png')); // or pdf or anything
|
62 |
-
|
63 |
-
$uploader->setAllowRenameFiles(true);
|
64 |
-
$uploader->setFilesDispersion(false);
|
65 |
-
|
66 |
-
$path = Mage::getBaseDir('media').DS.'custom'.DS.'stickers';
|
67 |
-
|
68 |
-
$uploader->save($path, $fname);
|
69 |
-
|
70 |
-
$imagedata['filename'] = 'custom/stickers/'.$fname;
|
71 |
-
} catch (Exception $e) {
|
72 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
73 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
74 |
-
return;
|
75 |
-
}
|
76 |
-
}
|
77 |
-
if ($data = $this->getRequest()->getPost()) {
|
78 |
-
if ($
|
79 |
-
|
80 |
-
}else {
|
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 |
-
$this->
|
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 |
-
$response->setHeader('Content-Length', strlen($content));
|
209 |
-
$response->setHeader('Content-type', $contentType);
|
210 |
-
$response->setBody($content);
|
211 |
-
$response->sendResponse();
|
212 |
-
die;
|
213 |
-
}
|
214 |
-
|
215 |
-
protected function removeFile($file) {
|
216 |
-
try {
|
217 |
-
$io = new Varien_Io_File();
|
218 |
-
$result = $io->rmdir($file, true);
|
219 |
-
} catch (Exception $e) {
|
220 |
-
|
221 |
-
}
|
222 |
-
}
|
223 |
-
|
224 |
}
|
1 |
+
<?php
|
2 |
+
class Holbi_Qixol_Adminhtml_StickerController extends Mage_Adminhtml_Controller_action {
|
3 |
+
|
4 |
+
protected function _initAction() {
|
5 |
+
$this->loadLayout()
|
6 |
+
->_setActiveMenu('qixol/items')
|
7 |
+
->_addBreadcrumb(Mage::helper('qixol')->__('Sticker Manager'), Mage::helper('qixol')->__('Sticker Manager'));
|
8 |
+
|
9 |
+
return $this;
|
10 |
+
}
|
11 |
+
|
12 |
+
public function indexAction() {
|
13 |
+
$this->_initAction()
|
14 |
+
->renderLayout();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function editAction() {
|
18 |
+
$id = $this->getRequest()->getParam('id');
|
19 |
+
$model = Mage::getModel('qixol/sticker')->load($id);
|
20 |
+
|
21 |
+
if ($model->getId() || $id == 0) {
|
22 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
23 |
+
if (!empty($data)) {
|
24 |
+
$model->setData($data);
|
25 |
+
}
|
26 |
+
|
27 |
+
Mage::register('sticker_data', $model);
|
28 |
+
|
29 |
+
$this->loadLayout();
|
30 |
+
$this->_setActiveMenu('qixol/items');
|
31 |
+
|
32 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Sticker Manager'), Mage::helper('qixol')->__('Sticker Manager'));
|
33 |
+
$this->_addBreadcrumb(Mage::helper('qixol')->__('Item Sticker'), Mage::helper('qixol')->__('Item Sticker'));
|
34 |
+
|
35 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
36 |
+
|
37 |
+
$this->_addContent($this->getLayout()->createBlock('qixol/adminhtml_sticker_edit'))
|
38 |
+
->_addLeft($this->getLayout()->createBlock('qixol/adminhtml_sticker_edit_tabs'));
|
39 |
+
$version = substr(Mage::getVersion(), 0, 3);
|
40 |
+
if (($version=='1.4' || $version=='1.5') && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
41 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
42 |
+
}
|
43 |
+
$this->renderLayout();
|
44 |
+
} else {
|
45 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Sticker does not exist'));
|
46 |
+
$this->_redirect('*/*/');
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
public function newAction() {
|
51 |
+
$this->_forward('edit');
|
52 |
+
}
|
53 |
+
|
54 |
+
public function saveAction() {
|
55 |
+
$imagedata = array();
|
56 |
+
if (!empty($_FILES['filename']['name'])) {
|
57 |
+
try {
|
58 |
+
$ext = substr($_FILES['filename']['name'], strrpos($_FILES['filename']['name'], '.') + 1);
|
59 |
+
$fname = 'File-' . time() . '.' . $ext;
|
60 |
+
$uploader = new Varien_File_Uploader('filename');
|
61 |
+
$uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png')); // or pdf or anything
|
62 |
+
|
63 |
+
$uploader->setAllowRenameFiles(true);
|
64 |
+
$uploader->setFilesDispersion(false);
|
65 |
+
|
66 |
+
$path = Mage::getBaseDir('media').DS.'custom'.DS.'stickers';
|
67 |
+
|
68 |
+
$uploader->save($path, $fname);
|
69 |
+
|
70 |
+
$imagedata['filename'] = 'custom/stickers/'.$fname;
|
71 |
+
} catch (Exception $e) {
|
72 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
73 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
74 |
+
return;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
if ($data = $this->getRequest()->getPost()) {
|
78 |
+
if (!empty($imagedata['filename'])) {
|
79 |
+
$data['filename'] = $imagedata['filename'];
|
80 |
+
} else {
|
81 |
+
if (isset($data['filename']['delete']) && $data['filename']['delete'] == 1) {
|
82 |
+
if ($data['filename']['value'] != '') {
|
83 |
+
$_helper = Mage::helper('qixol');
|
84 |
+
$this->removeFile(Mage::getBaseDir('media').DS.'custom'.DS.'stickers'.DS.$_helper->updateDirSepereator($data['filename']['value']));
|
85 |
+
}
|
86 |
+
$data['filename'] = '';
|
87 |
+
} else {
|
88 |
+
unset($data['filename']);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
$model = Mage::getModel('qixol/sticker');
|
92 |
+
$model->setData($data)
|
93 |
+
->setId($this->getRequest()->getParam('id'));
|
94 |
+
|
95 |
+
try {
|
96 |
+
$model->save();
|
97 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('qixol')->__('Item was successfully saved'));
|
98 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
99 |
+
|
100 |
+
if ($this->getRequest()->getParam('back')) {
|
101 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
$this->_redirect('*/*/');
|
105 |
+
return;
|
106 |
+
} catch (Exception $e) {
|
107 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
108 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
109 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Unable to find item to save'));
|
114 |
+
$this->_redirect('*/*/');
|
115 |
+
}
|
116 |
+
|
117 |
+
public function deleteAction() {
|
118 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
119 |
+
try {
|
120 |
+
$model = Mage::getModel('qixol/sticker')->load($this->getRequest()->getParam('id'));
|
121 |
+
$_helper = Mage::helper('qixol');
|
122 |
+
$filePath = Mage::getBaseDir('media').DS.'custom'.DS.'stickers'.DS.$_helper->updateDirSepereator($model->getFilename());
|
123 |
+
$model->delete();
|
124 |
+
$this->removeFile($filePath);
|
125 |
+
|
126 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('qixol')->__('Item was successfully deleted'));
|
127 |
+
$this->_redirect('*/*/');
|
128 |
+
} catch (Exception $e) {
|
129 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
130 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
131 |
+
}
|
132 |
+
}
|
133 |
+
$this->_redirect('*/*/');
|
134 |
+
}
|
135 |
+
|
136 |
+
public function massDeleteAction() {
|
137 |
+
$bannerIds = $this->getRequest()->getParam('sticker');
|
138 |
+
if (!is_array($bannerIds)) {
|
139 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('qixol')->__('Please select item(s)'));
|
140 |
+
} else {
|
141 |
+
try {
|
142 |
+
foreach ($bannerIds as $bannerId) {
|
143 |
+
$model = Mage::getModel('qixol/sticker')->load($bannerId);
|
144 |
+
$_helper = Mage::helper('qixol');
|
145 |
+
$filePath = Mage::getBaseDir('media').DS.'custom'.DS.'stickers'.DS.$_helper->updateDirSepereator($model->getFilename());
|
146 |
+
$model->delete();
|
147 |
+
$this->removeFile($filePath);
|
148 |
+
}
|
149 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
150 |
+
Mage::helper('qixol')->__(
|
151 |
+
'Total of %d record(s) were successfully deleted', count($bannerIds)
|
152 |
+
)
|
153 |
+
);
|
154 |
+
} catch (Exception $e) {
|
155 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
156 |
+
}
|
157 |
+
}
|
158 |
+
$this->_redirect('*/*/index');
|
159 |
+
}
|
160 |
+
|
161 |
+
public function massStatusAction() {
|
162 |
+
$bannerIds = $this->getRequest()->getParam('sticker');
|
163 |
+
if (!is_array($bannerIds)) {
|
164 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
165 |
+
} else {
|
166 |
+
try {
|
167 |
+
foreach ($bannerIds as $bannerId) {
|
168 |
+
$banner = Mage::getSingleton('qixol/sticker')
|
169 |
+
->load($bannerId)
|
170 |
+
->setStatus($this->getRequest()->getParam('status'))
|
171 |
+
->setIsMassupdate(true)
|
172 |
+
->save();
|
173 |
+
}
|
174 |
+
$this->_getSession()->addSuccess(
|
175 |
+
$this->__('Total of %d record(s) were successfully updated', count($bannerIds))
|
176 |
+
);
|
177 |
+
} catch (Exception $e) {
|
178 |
+
$this->_getSession()->addError($e->getMessage());
|
179 |
+
}
|
180 |
+
}
|
181 |
+
$this->_redirect('*/*/index');
|
182 |
+
}
|
183 |
+
|
184 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {
|
185 |
+
$response = $this->getResponse();
|
186 |
+
$response->setHeader('HTTP/1.1 200 OK', '');
|
187 |
+
$response->setHeader('Pragma', 'public', true);
|
188 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
189 |
+
$response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
|
190 |
+
$response->setHeader('Last-Modified', date('r'));
|
191 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
192 |
+
$response->setHeader('Content-Length', strlen($content));
|
193 |
+
$response->setHeader('Content-type', $contentType);
|
194 |
+
$response->setBody($content);
|
195 |
+
$response->sendResponse();
|
196 |
+
die;
|
197 |
+
}
|
198 |
+
|
199 |
+
protected function removeFile($file) {
|
200 |
+
try {
|
201 |
+
$io = new Varien_Io_File();
|
202 |
+
$result = $io->rmdir($file, true);
|
203 |
+
} catch (Exception $e) {
|
204 |
+
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
app/code/community/Holbi/Qixol/controllers/Adminhtml/StoresmapController.php
CHANGED
@@ -4,7 +4,7 @@ class Holbi_Qixol_Adminhtml_StoresmapController extends Mage_Adminhtml_Controlle
|
|
4 |
protected function _initAction() {
|
5 |
$this->loadLayout()
|
6 |
->_setActiveMenu('qixol/storesmap')
|
7 |
-
->_addBreadcrumb(Mage::helper('qixol')->__('
|
8 |
|
9 |
return $this;
|
10 |
}
|
4 |
protected function _initAction() {
|
5 |
$this->loadLayout()
|
6 |
->_setActiveMenu('qixol/storesmap')
|
7 |
+
->_addBreadcrumb(Mage::helper('qixol')->__('Store Integration Codes'), Mage::helper('qixol')->__('Store Integration Codes'));
|
8 |
|
9 |
return $this;
|
10 |
}
|
app/code/community/Holbi/Qixol/controllers/AjaxController.php
CHANGED
@@ -13,25 +13,41 @@ class Holbi_Qixol_AjaxController extends Mage_Adminhtml_Controller_Action
|
|
13 |
if ($tmp_data['id']>0){
|
14 |
$message_output.='<strong>'.$_hlp->__('Customers').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
15 |
$finished=$tmp_data['finished'];
|
16 |
-
} else
|
|
|
|
|
17 |
|
18 |
$tmp_data=$export->getExportStatus('delivery');
|
19 |
if ($tmp_data['id']>0){
|
20 |
$message_output.='<strong>'.$_hlp->__('Shippings').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
21 |
$finished=$tmp_data['finished'];
|
22 |
-
} else
|
|
|
|
|
23 |
|
24 |
$tmp_data=$export->getExportStatus('products');
|
25 |
if ($tmp_data['id']>0){
|
26 |
$message_output.='<strong>'.$_hlp->__('Products').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
27 |
$finished=$tmp_data['finished'];
|
28 |
-
} else
|
|
|
|
|
29 |
|
30 |
$tmp_data=$export->getExportStatus('currency');
|
31 |
if ($tmp_data['id']>0){
|
32 |
$message_output.='<strong>'.$_hlp->__('Currency').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
33 |
$finished=$tmp_data['finished'];
|
34 |
-
} else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
if ($message_output!='') {
|
37 |
// JSON
|
@@ -46,6 +62,7 @@ class Holbi_Qixol_AjaxController extends Mage_Adminhtml_Controller_Action
|
|
46 |
|
47 |
|
48 |
public function UpdateImportStatusAction() {
|
|
|
49 |
$_hlp=Mage::helper('qixol');
|
50 |
|
51 |
$import=Mage::getModel('qixol/sinch');
|
13 |
if ($tmp_data['id']>0){
|
14 |
$message_output.='<strong>'.$_hlp->__('Customers').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
15 |
$finished=$tmp_data['finished'];
|
16 |
+
} else {
|
17 |
+
$message_output.='<strong>'.$_hlp->__('Customers').'</strong>:Not started<br><br><hr>';
|
18 |
+
}
|
19 |
|
20 |
$tmp_data=$export->getExportStatus('delivery');
|
21 |
if ($tmp_data['id']>0){
|
22 |
$message_output.='<strong>'.$_hlp->__('Shippings').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
23 |
$finished=$tmp_data['finished'];
|
24 |
+
} else {
|
25 |
+
$message_output.='<strong>'.$_hlp->__('Shippings').'</strong>:Not started<br><br><hr>';
|
26 |
+
}
|
27 |
|
28 |
$tmp_data=$export->getExportStatus('products');
|
29 |
if ($tmp_data['id']>0){
|
30 |
$message_output.='<strong>'.$_hlp->__('Products').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
31 |
$finished=$tmp_data['finished'];
|
32 |
+
} else {
|
33 |
+
$message_output.='<strong>'.$_hlp->__('Products').'</strong>:Not started<br><br><hr>';
|
34 |
+
}
|
35 |
|
36 |
$tmp_data=$export->getExportStatus('currency');
|
37 |
if ($tmp_data['id']>0){
|
38 |
$message_output.='<strong>'.$_hlp->__('Currency').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
39 |
$finished=$tmp_data['finished'];
|
40 |
+
} else {
|
41 |
+
$message_output.='<strong>'.$_hlp->__('Currency').'</strong>:Not started<br><br><hr>';
|
42 |
+
}
|
43 |
+
|
44 |
+
$tmp_data=$export->getExportStatus('store');
|
45 |
+
if ($tmp_data['id']>0){
|
46 |
+
$message_output.='<strong>'.$_hlp->__('Stores').'</strong>:'.$_hlp->__($tmp_data['extended_message']!=''?$tmp_data['extended_message']:$tmp_data['last_message'])."<br><br><hr>";
|
47 |
+
$finished=$tmp_data['finished'];
|
48 |
+
} else {
|
49 |
+
$message_output.='<strong>'.$_hlp->__('Stores').'</strong>:Not started<br><br><hr>';
|
50 |
+
}
|
51 |
|
52 |
if ($message_output!='') {
|
53 |
// JSON
|
62 |
|
63 |
|
64 |
public function UpdateImportStatusAction() {
|
65 |
+
|
66 |
$_hlp=Mage::helper('qixol');
|
67 |
|
68 |
$import=Mage::getModel('qixol/sinch');
|
app/code/community/Holbi/Qixol/etc/adminhtml.xml
CHANGED
@@ -9,8 +9,11 @@
|
|
9 |
<config>
|
10 |
<children>
|
11 |
<qixol>
|
12 |
-
<title>
|
13 |
</qixol>
|
|
|
|
|
|
|
14 |
</children>
|
15 |
</config>
|
16 |
</children>
|
9 |
<config>
|
10 |
<children>
|
11 |
<qixol>
|
12 |
+
<title>Promo Setting</title>
|
13 |
</qixol>
|
14 |
+
<stickers>
|
15 |
+
<title>Stickers</title>
|
16 |
+
</stickers>
|
17 |
</children>
|
18 |
</config>
|
19 |
</children>
|
app/code/community/Holbi/Qixol/etc/config.xml
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
</default>
|
10 |
<modules>
|
11 |
<Holbi_Qixol>
|
12 |
-
<version>0.
|
13 |
</Holbi_Qixol>
|
14 |
</modules>
|
15 |
<global>
|
@@ -88,12 +88,10 @@
|
|
88 |
<banner>
|
89 |
<table>qixol_banners</table>
|
90 |
</banner>
|
91 |
-
<
|
92 |
-
<table>
|
93 |
-
|
94 |
-
|
95 |
-
<table>qixol_banner_has_images</table>
|
96 |
-
</bannertoimage>
|
97 |
<sticker>
|
98 |
<table>qixol_stickers</table>
|
99 |
</sticker>
|
@@ -103,12 +101,9 @@
|
|
103 |
<exprpocessstat>
|
104 |
<table>qixol_process_export_status_table</table>
|
105 |
</exprpocessstat>
|
106 |
-
<
|
107 |
-
<table>
|
108 |
-
</
|
109 |
-
<deletedproduct>
|
110 |
-
<table>qixol_product_to_delete</table>
|
111 |
-
</deletedproduct>
|
112 |
<customergrouspmap>
|
113 |
<table>qixol_customers_groups_name_map</table>
|
114 |
</customergrouspmap>
|
@@ -261,44 +256,46 @@
|
|
261 |
<adminhtml>
|
262 |
<menu>
|
263 |
<qixol module="qixol">
|
264 |
-
<title>Qixol</title>
|
265 |
<sort_order>100</sort_order>
|
266 |
<children>
|
267 |
<banner module="qixol">
|
268 |
-
<title>
|
269 |
-
<sort_order>
|
270 |
<action>qixol_admin/adminhtml_banner</action>
|
271 |
</banner>
|
272 |
<sticker module="qixol">
|
273 |
-
<title>
|
274 |
<sort_order>1</sort_order>
|
275 |
<action>qixol_admin/adminhtml_sticker</action>
|
276 |
</sticker>
|
277 |
<bannerboxes module="qixol">
|
278 |
-
<title>
|
279 |
-
<sort_order>
|
280 |
<action>qixol_admin/adminhtml_bannerboxes</action>
|
281 |
</bannerboxes>
|
282 |
-
|
|
|
283 |
<title>Qixol</title>
|
284 |
<sort_order>3</sort_order>
|
285 |
<action>qixol_admin/adminhtml_qixolbackend</action>
|
286 |
-
</qixolbackend>
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
<shippingmap module="qixol">
|
288 |
-
<title>
|
289 |
-
<sort_order>
|
290 |
<action>qixol_admin/adminhtml_shippingmap</action>
|
291 |
</shippingmap>
|
292 |
<storesmap module="qixol">
|
293 |
-
<title>
|
294 |
-
<sort_order>
|
295 |
<action>qixol_admin/adminhtml_storesmap</action>
|
296 |
</storesmap>
|
297 |
-
<customergrouspmap module="qixol">
|
298 |
-
<title>Customer Groups Map</title>
|
299 |
-
<sort_order>25</sort_order>
|
300 |
-
<action>qixol_admin/adminhtml_customergrouspmap</action>
|
301 |
-
</customergrouspmap>
|
302 |
</children>
|
303 |
</qixol>
|
304 |
|
@@ -323,11 +320,11 @@
|
|
323 |
<admin>
|
324 |
<children>
|
325 |
<qixol translate="title" module="qixol">
|
326 |
-
<title>Qixol</title>
|
327 |
<sort_order>1000</sort_order>
|
328 |
<children>
|
329 |
<qixolbackend translate="title">
|
330 |
-
<title>Qixol</title>
|
331 |
</qixolbackend>
|
332 |
</children>
|
333 |
</qixol>
|
9 |
</default>
|
10 |
<modules>
|
11 |
<Holbi_Qixol>
|
12 |
+
<version>0.2.0</version>
|
13 |
</Holbi_Qixol>
|
14 |
</modules>
|
15 |
<global>
|
88 |
<banner>
|
89 |
<table>qixol_banners</table>
|
90 |
</banner>
|
91 |
+
<bannerimage>
|
92 |
+
<table>qixol_banner_image</table>
|
93 |
+
<!--<table>admin_user</table>-->
|
94 |
+
</bannerimage>
|
|
|
|
|
95 |
<sticker>
|
96 |
<table>qixol_stickers</table>
|
97 |
</sticker>
|
101 |
<exprpocessstat>
|
102 |
<table>qixol_process_export_status_table</table>
|
103 |
</exprpocessstat>
|
104 |
+
<deletedproduct>
|
105 |
+
<table>qixol_product_to_delete</table>
|
106 |
+
</deletedproduct>
|
|
|
|
|
|
|
107 |
<customergrouspmap>
|
108 |
<table>qixol_customers_groups_name_map</table>
|
109 |
</customergrouspmap>
|
256 |
<adminhtml>
|
257 |
<menu>
|
258 |
<qixol module="qixol">
|
259 |
+
<title>Qixol Promo</title>
|
260 |
<sort_order>100</sort_order>
|
261 |
<children>
|
262 |
<banner module="qixol">
|
263 |
+
<title>Banners</title>
|
264 |
+
<sort_order>2</sort_order>
|
265 |
<action>qixol_admin/adminhtml_banner</action>
|
266 |
</banner>
|
267 |
<sticker module="qixol">
|
268 |
+
<title>Stickers</title>
|
269 |
<sort_order>1</sort_order>
|
270 |
<action>qixol_admin/adminhtml_sticker</action>
|
271 |
</sticker>
|
272 |
<bannerboxes module="qixol">
|
273 |
+
<title>Banner Position</title>
|
274 |
+
<sort_order>3</sort_order>
|
275 |
<action>qixol_admin/adminhtml_bannerboxes</action>
|
276 |
</bannerboxes>
|
277 |
+
<!--
|
278 |
+
<qixolbackend module="qixol">
|
279 |
<title>Qixol</title>
|
280 |
<sort_order>3</sort_order>
|
281 |
<action>qixol_admin/adminhtml_qixolbackend</action>
|
282 |
+
</qixolbackend>
|
283 |
+
-->
|
284 |
+
<customergrouspmap module="qixol">
|
285 |
+
<title>Customer Group Integration Codes</title>
|
286 |
+
<sort_order>4</sort_order>
|
287 |
+
<action>qixol_admin/adminhtml_customergrouspmap</action>
|
288 |
+
</customergrouspmap>
|
289 |
<shippingmap module="qixol">
|
290 |
+
<title>Shipping Method Integration Codes</title>
|
291 |
+
<sort_order>5</sort_order>
|
292 |
<action>qixol_admin/adminhtml_shippingmap</action>
|
293 |
</shippingmap>
|
294 |
<storesmap module="qixol">
|
295 |
+
<title>Store Integration Codes</title>
|
296 |
+
<sort_order>6</sort_order>
|
297 |
<action>qixol_admin/adminhtml_storesmap</action>
|
298 |
</storesmap>
|
|
|
|
|
|
|
|
|
|
|
299 |
</children>
|
300 |
</qixol>
|
301 |
|
320 |
<admin>
|
321 |
<children>
|
322 |
<qixol translate="title" module="qixol">
|
323 |
+
<title>Qixol Promo</title>
|
324 |
<sort_order>1000</sort_order>
|
325 |
<children>
|
326 |
<qixolbackend translate="title">
|
327 |
+
<title>Qixol Promo</title>
|
328 |
</qixolbackend>
|
329 |
</children>
|
330 |
</qixol>
|
app/code/community/Holbi/Qixol/etc/system.xml
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
<config>
|
3 |
<tabs>
|
4 |
<qixol translate="label" module="qixol">
|
5 |
-
<label>Qixol
|
6 |
<sort_order>333</sort_order>
|
7 |
</qixol>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<qixol translate="label">
|
11 |
-
<label>
|
12 |
<tab>qixol</tab>
|
13 |
<sort_order>100</sort_order>
|
14 |
<show_in_default>1</show_in_default>
|
@@ -16,7 +16,7 @@
|
|
16 |
<show_in_store>1</show_in_store>
|
17 |
<groups>
|
18 |
<integraion translate="label">
|
19 |
-
<label>General /
|
20 |
<sort_order>50</sort_order>
|
21 |
<show_in_default>1</show_in_default>
|
22 |
<show_in_website>0</show_in_website>
|
@@ -52,8 +52,71 @@
|
|
52 |
<show_in_website>0</show_in_website>
|
53 |
<show_in_store>0</show_in_store>
|
54 |
</services>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
</fields>
|
56 |
</integraion>
|
|
|
57 |
<frontend translate="label">
|
58 |
<label>Front-End Settings</label>
|
59 |
<sort_order>60</sort_order>
|
@@ -61,46 +124,6 @@
|
|
61 |
<show_in_website>0</show_in_website>
|
62 |
<show_in_store>0</show_in_store>
|
63 |
<fields>
|
64 |
-
<showpromocat translate="label">
|
65 |
-
<label>Show promotion sticker in cataloge</label>
|
66 |
-
<comment>Show promotion stickers on products on cataloge</comment>
|
67 |
-
<frontend_type>select</frontend_type>
|
68 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
69 |
-
<sort_order>10</sort_order>
|
70 |
-
<show_in_default>1</show_in_default>
|
71 |
-
<show_in_website>1</show_in_website>
|
72 |
-
<show_in_store>1</show_in_store>
|
73 |
-
</showpromocat>
|
74 |
-
<showpromoprod translate="label">
|
75 |
-
<label>Show promotion sticker on product</label>
|
76 |
-
<comment>Show promotion stickers on the product page</comment>
|
77 |
-
<frontend_type>select</frontend_type>
|
78 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
79 |
-
<sort_order>10</sort_order>
|
80 |
-
<show_in_default>1</show_in_default>
|
81 |
-
<show_in_website>1</show_in_website>
|
82 |
-
<show_in_store>1</show_in_store>
|
83 |
-
</showpromoprod>
|
84 |
-
<showpromoboxes translate="label">
|
85 |
-
<label>Show promotion boxes</label>
|
86 |
-
<comment>Show promotion boxes on product page</comment>
|
87 |
-
<frontend_type>select</frontend_type>
|
88 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
89 |
-
<sort_order>10</sort_order>
|
90 |
-
<show_in_default>1</show_in_default>
|
91 |
-
<show_in_website>1</show_in_website>
|
92 |
-
<show_in_store>1</show_in_store>
|
93 |
-
</showpromoboxes>
|
94 |
-
<showcartpromobox translate="label">
|
95 |
-
<label>Show promotion box in cart</label>
|
96 |
-
<comment>Show cart related only promotion box</comment>
|
97 |
-
<frontend_type>select</frontend_type>
|
98 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
99 |
-
<sort_order>15</sort_order>
|
100 |
-
<show_in_default>1</show_in_default>
|
101 |
-
<show_in_website>1</show_in_website>
|
102 |
-
<show_in_store>1</show_in_store>
|
103 |
-
</showcartpromobox>
|
104 |
<onepagejavascr translate="label">
|
105 |
<label>Use Javascript onepage update.</label>
|
106 |
<comment>One one page chackout use javascript cart update.</comment>
|
@@ -131,18 +154,9 @@
|
|
131 |
<show_in_website>1</show_in_website>
|
132 |
<show_in_store>1</show_in_store>
|
133 |
</mcartjavascr>
|
134 |
-
<showallpromoprod translate="label">
|
135 |
-
<label>Show available promotions on product page</label>
|
136 |
-
<comment>Show product related promotions on product page</comment>
|
137 |
-
<frontend_type>select</frontend_type>
|
138 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
139 |
-
<sort_order>10</sort_order>
|
140 |
-
<show_in_default>1</show_in_default>
|
141 |
-
<show_in_website>1</show_in_website>
|
142 |
-
<show_in_store>1</show_in_store>
|
143 |
-
</showallpromoprod>
|
144 |
</fields>
|
145 |
</frontend>
|
|
|
146 |
<advanced translate="label">
|
147 |
<label>Advanced</label>
|
148 |
<sort_order>60</sort_order>
|
@@ -151,7 +165,7 @@
|
|
151 |
<show_in_store>0</show_in_store>
|
152 |
<fields>
|
153 |
<basketval translate="label">
|
154 |
-
<label>Basket Validation</label>
|
155 |
<comment>When submitting baskets used selected currency</comment>
|
156 |
<frontend_type>select</frontend_type>
|
157 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -174,7 +188,7 @@
|
|
174 |
</advanced>
|
175 |
|
176 |
<syhchronized translate="label">
|
177 |
-
<label>
|
178 |
<sort_order>61</sort_order>
|
179 |
<show_in_default>1</show_in_default>
|
180 |
<show_in_website>0</show_in_website>
|
@@ -191,7 +205,10 @@
|
|
191 |
<show_in_store>0</show_in_store>
|
192 |
</synchproducts>
|
193 |
<synchcatproducts translate="label">
|
194 |
-
<label>
|
|
|
|
|
|
|
195 |
<comment>Send product categories in attribute categorycode</comment>
|
196 |
<frontend_type>select</frontend_type>
|
197 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -229,7 +246,7 @@
|
|
229 |
<show_in_store>0</show_in_store>
|
230 |
</synchship>
|
231 |
<synchcurrency translate="label">
|
232 |
-
<label>Synchronise
|
233 |
<frontend_type>select</frontend_type>
|
234 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
235 |
<sort_order>5</sort_order>
|
@@ -246,6 +263,7 @@
|
|
246 |
<show_in_website>0</show_in_website>
|
247 |
<show_in_store>0</show_in_store>
|
248 |
</synchstores>
|
|
|
249 |
<channel translate="label">
|
250 |
<label>Channel</label>
|
251 |
<frontend_type>text</frontend_type>
|
@@ -263,6 +281,7 @@
|
|
263 |
<show_in_website>0</show_in_website>
|
264 |
<show_in_store>0</show_in_store>
|
265 |
</storegroup>
|
|
|
266 |
<synchonsaving translate="label">
|
267 |
<label>Synchronise on Saving</label>
|
268 |
<frontend_type>select</frontend_type>
|
@@ -274,7 +293,7 @@
|
|
274 |
</synchonsaving>
|
275 |
</fields>
|
276 |
</syhchronized>
|
277 |
-
|
278 |
<customers translate="label">
|
279 |
<label>Customers</label>
|
280 |
<sort_order>77</sort_order>
|
@@ -284,7 +303,7 @@
|
|
284 |
<comment><![CDATA[Synchronization Config]]></comment>
|
285 |
<fields>
|
286 |
<list translate="label">
|
287 |
-
<label>
|
288 |
<frontend_type>Multiselect</frontend_type>
|
289 |
<source_model>qixol/system_config_source_customers_list</source_model>
|
290 |
<sort_order>14</sort_order>
|
@@ -294,9 +313,9 @@
|
|
294 |
</list>
|
295 |
</fields>
|
296 |
</customers>
|
297 |
-
|
298 |
<shippings translate="label">
|
299 |
-
<label>
|
300 |
<sort_order>77</sort_order>
|
301 |
<show_in_default>1</show_in_default>
|
302 |
<show_in_website>0</show_in_website>
|
@@ -313,7 +332,7 @@
|
|
313 |
<show_in_store>0</show_in_store>
|
314 |
</onlyactive>
|
315 |
<list translate="label">
|
316 |
-
<label>
|
317 |
<frontend_type>Multiselect</frontend_type>
|
318 |
<source_model>qixol/system_config_source_shippings_list</source_model>
|
319 |
<sort_order>14</sort_order>
|
@@ -323,9 +342,10 @@
|
|
323 |
</list>
|
324 |
</fields>
|
325 |
</shippings>
|
|
|
326 |
|
327 |
<productattrib translate="label">
|
328 |
-
<label>
|
329 |
<sort_order>72</sort_order>
|
330 |
<show_in_default>1</show_in_default>
|
331 |
<show_in_website>0</show_in_website>
|
@@ -333,7 +353,7 @@
|
|
333 |
<comment><![CDATA[Synchronization Config]]></comment>
|
334 |
<fields>
|
335 |
<attributes translate="label">
|
336 |
-
<label>Include
|
337 |
<frontend_type>checkboxes</frontend_type>
|
338 |
<source_model>qixol/system_config_source_attributes</source_model>
|
339 |
<frontend_model>qixol/adminhtml_system_config_attributes</frontend_model>
|
@@ -344,6 +364,8 @@
|
|
344 |
</attributes>
|
345 |
</fields>
|
346 |
</productattrib>
|
|
|
|
|
347 |
<issuedpoints translate="label">
|
348 |
<label>Issued Points</label>
|
349 |
<sort_order>72</sort_order>
|
@@ -362,11 +384,12 @@
|
|
362 |
<show_in_store>0</show_in_store>
|
363 |
</convertrate>
|
364 |
</fields>
|
365 |
-
</issuedpoints>
|
|
|
366 |
<sinch_explort_products translate="label">
|
367 |
-
<label>
|
368 |
<frontend_type>text</frontend_type>
|
369 |
-
<comment>Export
|
370 |
<sort_order>150</sort_order>
|
371 |
<show_in_default>1</show_in_default>
|
372 |
<show_in_website>1</show_in_website>
|
@@ -404,4 +427,56 @@
|
|
404 |
</groups>
|
405 |
</qixol>
|
406 |
</sections>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
</config>
|
2 |
<config>
|
3 |
<tabs>
|
4 |
<qixol translate="label" module="qixol">
|
5 |
+
<label>Qixol Promo</label>
|
6 |
<sort_order>333</sort_order>
|
7 |
</qixol>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<qixol translate="label">
|
11 |
+
<label>Promo Setting</label>
|
12 |
<tab>qixol</tab>
|
13 |
<sort_order>100</sort_order>
|
14 |
<show_in_default>1</show_in_default>
|
16 |
<show_in_store>1</show_in_store>
|
17 |
<groups>
|
18 |
<integraion translate="label">
|
19 |
+
<label>General / Integration</label>
|
20 |
<sort_order>50</sort_order>
|
21 |
<show_in_default>1</show_in_default>
|
22 |
<show_in_website>0</show_in_website>
|
52 |
<show_in_website>0</show_in_website>
|
53 |
<show_in_store>0</show_in_store>
|
54 |
</services>
|
55 |
+
<serviceProtocol translate="label comment">
|
56 |
+
<label>Service Protocol</label>
|
57 |
+
<comment>Service Protocol</comment>
|
58 |
+
<frontend_type>select</frontend_type>
|
59 |
+
<source_model>qixol/System_Config_Source_IServiceProtocols_Values</source_model>
|
60 |
+
<sort_order>31</sort_order>
|
61 |
+
<show_in_default>1</show_in_default>
|
62 |
+
<show_in_website>0</show_in_website>
|
63 |
+
<show_in_store>0</show_in_store>
|
64 |
+
</serviceProtocol>
|
65 |
+
<restServiceAddress translate="label comment">
|
66 |
+
<label>REST Service Address</label>
|
67 |
+
<comment>REST Service Address</comment>
|
68 |
+
<depends>
|
69 |
+
<services>custom</services>
|
70 |
+
<serviceProtocol>REST</serviceProtocol>
|
71 |
+
</depends>
|
72 |
+
<frontend_type>text</frontend_type>
|
73 |
+
<sort_order>301</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>0</show_in_website>
|
76 |
+
<show_in_store>0</show_in_store>
|
77 |
+
</restServiceAddress>
|
78 |
+
<importManagerServiceAddress translate="label comment">
|
79 |
+
<label>Import Manager Service Address</label>
|
80 |
+
<comment>Import Manager Service Address</comment>
|
81 |
+
<depends>
|
82 |
+
<services>custom</services>
|
83 |
+
<serviceProtocol>SOAP</serviceProtocol>
|
84 |
+
</depends>
|
85 |
+
<frontend_type>text</frontend_type>
|
86 |
+
<sort_order>302</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>0</show_in_website>
|
89 |
+
<show_in_store>0</show_in_store>
|
90 |
+
</importManagerServiceAddress>
|
91 |
+
<exportManagerServiceAddress translate="label comment">
|
92 |
+
<label>Export Manager Service Address</label>
|
93 |
+
<comment>Export Manager Service Address</comment>
|
94 |
+
<depends>
|
95 |
+
<services>custom</services>
|
96 |
+
<serviceProtocol>SOAP</serviceProtocol>
|
97 |
+
</depends>
|
98 |
+
<frontend_type>text</frontend_type>
|
99 |
+
<sort_order>303</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>0</show_in_website>
|
102 |
+
<show_in_store>0</show_in_store>
|
103 |
+
</exportManagerServiceAddress>
|
104 |
+
<basketManagerServiceAddress translate="label comment">
|
105 |
+
<label>Basket Manager Service Address</label>
|
106 |
+
<comment>Basket Manager Service Address</comment>
|
107 |
+
<depends>
|
108 |
+
<services>custom</services>
|
109 |
+
<serviceProtocol>SOAP</serviceProtocol>
|
110 |
+
</depends>
|
111 |
+
<frontend_type>text</frontend_type>
|
112 |
+
<sort_order>304</sort_order>
|
113 |
+
<show_in_default>1</show_in_default>
|
114 |
+
<show_in_website>0</show_in_website>
|
115 |
+
<show_in_store>0</show_in_store>
|
116 |
+
</basketManagerServiceAddress>
|
117 |
</fields>
|
118 |
</integraion>
|
119 |
+
<!--
|
120 |
<frontend translate="label">
|
121 |
<label>Front-End Settings</label>
|
122 |
<sort_order>60</sort_order>
|
124 |
<show_in_website>0</show_in_website>
|
125 |
<show_in_store>0</show_in_store>
|
126 |
<fields>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
<onepagejavascr translate="label">
|
128 |
<label>Use Javascript onepage update.</label>
|
129 |
<comment>One one page chackout use javascript cart update.</comment>
|
154 |
<show_in_website>1</show_in_website>
|
155 |
<show_in_store>1</show_in_store>
|
156 |
</mcartjavascr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
</fields>
|
158 |
</frontend>
|
159 |
+
-->
|
160 |
<advanced translate="label">
|
161 |
<label>Advanced</label>
|
162 |
<sort_order>60</sort_order>
|
165 |
<show_in_store>0</show_in_store>
|
166 |
<fields>
|
167 |
<basketval translate="label">
|
168 |
+
<label>Multi-currency Basket Validation</label>
|
169 |
<comment>When submitting baskets used selected currency</comment>
|
170 |
<frontend_type>select</frontend_type>
|
171 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
188 |
</advanced>
|
189 |
|
190 |
<syhchronized translate="label">
|
191 |
+
<label>Synchronised Items</label>
|
192 |
<sort_order>61</sort_order>
|
193 |
<show_in_default>1</show_in_default>
|
194 |
<show_in_website>0</show_in_website>
|
205 |
<show_in_store>0</show_in_store>
|
206 |
</synchproducts>
|
207 |
<synchcatproducts translate="label">
|
208 |
+
<label>Synchronise category with product</label>
|
209 |
+
<depends>
|
210 |
+
<synchproducts>1</synchproducts>
|
211 |
+
</depends>
|
212 |
<comment>Send product categories in attribute categorycode</comment>
|
213 |
<frontend_type>select</frontend_type>
|
214 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
246 |
<show_in_store>0</show_in_store>
|
247 |
</synchship>
|
248 |
<synchcurrency translate="label">
|
249 |
+
<label>Synchronise Currency List</label>
|
250 |
<frontend_type>select</frontend_type>
|
251 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
252 |
<sort_order>5</sort_order>
|
263 |
<show_in_website>0</show_in_website>
|
264 |
<show_in_store>0</show_in_store>
|
265 |
</synchstores>
|
266 |
+
<!--
|
267 |
<channel translate="label">
|
268 |
<label>Channel</label>
|
269 |
<frontend_type>text</frontend_type>
|
281 |
<show_in_website>0</show_in_website>
|
282 |
<show_in_store>0</show_in_store>
|
283 |
</storegroup>
|
284 |
+
-->
|
285 |
<synchonsaving translate="label">
|
286 |
<label>Synchronise on Saving</label>
|
287 |
<frontend_type>select</frontend_type>
|
293 |
</synchonsaving>
|
294 |
</fields>
|
295 |
</syhchronized>
|
296 |
+
<!--
|
297 |
<customers translate="label">
|
298 |
<label>Customers</label>
|
299 |
<sort_order>77</sort_order>
|
303 |
<comment><![CDATA[Synchronization Config]]></comment>
|
304 |
<fields>
|
305 |
<list translate="label">
|
306 |
+
<label>Only synchronise these types</label>
|
307 |
<frontend_type>Multiselect</frontend_type>
|
308 |
<source_model>qixol/system_config_source_customers_list</source_model>
|
309 |
<sort_order>14</sort_order>
|
313 |
</list>
|
314 |
</fields>
|
315 |
</customers>
|
316 |
+
|
317 |
<shippings translate="label">
|
318 |
+
<label>Shipping Methods</label>
|
319 |
<sort_order>77</sort_order>
|
320 |
<show_in_default>1</show_in_default>
|
321 |
<show_in_website>0</show_in_website>
|
332 |
<show_in_store>0</show_in_store>
|
333 |
</onlyactive>
|
334 |
<list translate="label">
|
335 |
+
<label>Only synchronise these methods</label>
|
336 |
<frontend_type>Multiselect</frontend_type>
|
337 |
<source_model>qixol/system_config_source_shippings_list</source_model>
|
338 |
<sort_order>14</sort_order>
|
342 |
</list>
|
343 |
</fields>
|
344 |
</shippings>
|
345 |
+
-->
|
346 |
|
347 |
<productattrib translate="label">
|
348 |
+
<label>Product Attributes</label>
|
349 |
<sort_order>72</sort_order>
|
350 |
<show_in_default>1</show_in_default>
|
351 |
<show_in_website>0</show_in_website>
|
353 |
<comment><![CDATA[Synchronization Config]]></comment>
|
354 |
<fields>
|
355 |
<attributes translate="label">
|
356 |
+
<label>Include with synchronised products:</label>
|
357 |
<frontend_type>checkboxes</frontend_type>
|
358 |
<source_model>qixol/system_config_source_attributes</source_model>
|
359 |
<frontend_model>qixol/adminhtml_system_config_attributes</frontend_model>
|
364 |
</attributes>
|
365 |
</fields>
|
366 |
</productattrib>
|
367 |
+
|
368 |
+
<!--
|
369 |
<issuedpoints translate="label">
|
370 |
<label>Issued Points</label>
|
371 |
<sort_order>72</sort_order>
|
384 |
<show_in_store>0</show_in_store>
|
385 |
</convertrate>
|
386 |
</fields>
|
387 |
+
</issuedpoints>
|
388 |
+
-->
|
389 |
<sinch_explort_products translate="label">
|
390 |
+
<label>Synchronise items to Promo</label>
|
391 |
<frontend_type>text</frontend_type>
|
392 |
+
<comment>Export items to Promo</comment>
|
393 |
<sort_order>150</sort_order>
|
394 |
<show_in_default>1</show_in_default>
|
395 |
<show_in_website>1</show_in_website>
|
427 |
</groups>
|
428 |
</qixol>
|
429 |
</sections>
|
430 |
+
<sections>
|
431 |
+
<stickers translate="label">
|
432 |
+
<label>Stickers</label>
|
433 |
+
<tab>qixol</tab>
|
434 |
+
<sort_order>110</sort_order>
|
435 |
+
<show_in_default>1</show_in_default>
|
436 |
+
<show_in_website>1</show_in_website>
|
437 |
+
<show_in_store>1</show_in_store>
|
438 |
+
<groups>
|
439 |
+
<general translate="label">
|
440 |
+
<label>General</label>
|
441 |
+
<sort_order>50</sort_order>
|
442 |
+
<show_in_default>1</show_in_default>
|
443 |
+
<show_in_website>0</show_in_website>
|
444 |
+
<show_in_store>0</show_in_store>
|
445 |
+
<comment><![CDATA[Stickers configuration]]></comment>
|
446 |
+
<fields>
|
447 |
+
<showStickersOnCataloguePage translate="label">
|
448 |
+
<label>Show promotion stickers on catalogue page</label>
|
449 |
+
<frontend_type>select</frontend_type>
|
450 |
+
<config_path>qixol/stickers/showStickersOnCataloguePage</config_path>
|
451 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
452 |
+
<sort_order>1</sort_order>
|
453 |
+
<show_in_default>1</show_in_default>
|
454 |
+
<show_in_website>0</show_in_website>
|
455 |
+
<show_in_store>0</show_in_store>
|
456 |
+
</showStickersOnCataloguePage>
|
457 |
+
<showStickersOnProductPage translate="label">
|
458 |
+
<label>Show promotion stickers on product page</label>
|
459 |
+
<frontend_type>select</frontend_type>
|
460 |
+
<config_path>qixol/stickers/showStickersOnProductPage</config_path>
|
461 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
462 |
+
<sort_order>2</sort_order>
|
463 |
+
<show_in_default>1</show_in_default>
|
464 |
+
<show_in_website>0</show_in_website>
|
465 |
+
<show_in_store>0</show_in_store>
|
466 |
+
</showStickersOnProductPage>
|
467 |
+
<showPromoBoxOnProductPage translate="label">
|
468 |
+
<label>Show available promotions on product page</label>
|
469 |
+
<frontend_type>select</frontend_type>
|
470 |
+
<config_path>qixol/stickers/showPromoBoxOnProductPage</config_path>
|
471 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
472 |
+
<sort_order>3</sort_order>
|
473 |
+
<show_in_default>1</show_in_default>
|
474 |
+
<show_in_website>0</show_in_website>
|
475 |
+
<show_in_store>0</show_in_store>
|
476 |
+
</showPromoBoxOnProductPage>
|
477 |
+
</fields>
|
478 |
+
</general>
|
479 |
+
</groups>
|
480 |
+
</stickers>
|
481 |
+
</sections>
|
482 |
</config>
|
app/code/community/Holbi/Qixol/sql/qixol_setup/mysql4-install-0.1.0.php
CHANGED
@@ -1,278 +1,279 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
|
4 |
-
$installer->startSetup();
|
5 |
-
|
6 |
-
$sql=<<<SQLTEXT
|
7 |
-
create table {$installer->getTable('qixol_product_to_delete')}(
|
8 |
-
entity_id int unsigned not null default 0,
|
9 |
-
product_sku varchar(128),
|
10 |
-
child_sku varchar(128),
|
11 |
-
deleted_time datetime,
|
12 |
-
primary key (entity_id)
|
13 |
-
);
|
14 |
-
|
15 |
-
SQLTEXT;
|
16 |
-
|
17 |
-
$installer->run($sql);
|
18 |
-
|
19 |
-
|
20 |
-
$sql=<<<SQLTEXT
|
21 |
-
create table {$installer->getTable('qixol_product_export_stat')}(
|
22 |
-
export_id int(11) NOT NULL auto_increment,
|
23 |
-
start_export timestamp NOT NULL default '0000-00-00 00:00:00',
|
24 |
-
finish_export timestamp NOT NULL default '0000-00-00 00:00:00',
|
25 |
-
number_of_products int(11) default '0',
|
26 |
-
status_export varchar(255) default '',
|
27 |
-
export_by ENUM ('MANUAL', 'CRON') DEFAULt NULL ,
|
28 |
-
status_export_message text,
|
29 |
-
primary key (export_id)
|
30 |
-
);
|
31 |
-
SQLTEXT;
|
32 |
-
|
33 |
-
$installer->run($sql);
|
34 |
-
|
35 |
-
$sql=<<<SQLTEXT
|
36 |
-
create table {$installer->getTable('qixol_process_export_status_table')}(
|
37 |
-
id int(11) NOT NULL auto_increment,
|
38 |
-
last_message varchar(255),
|
39 |
-
export_what varchar(32),
|
40 |
-
exports_start datetime,
|
41 |
-
exports_last_updated datetime,
|
42 |
-
is_finished int(1) default 0,
|
43 |
-
extended_message text,
|
44 |
-
PRIMARY KEY (id)
|
45 |
-
);
|
46 |
-
SQLTEXT;
|
47 |
-
|
48 |
-
$installer->run($sql);
|
49 |
-
|
50 |
-
$sql=<<<SQLTEXT
|
51 |
-
CREATE TABLE {$installer->getTable('qixol_banners')}(
|
52 |
-
`banner_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
53 |
-
`title` varchar(255) NOT NULL DEFAULT '',
|
54 |
-
`banner_link_name` varchar(255) NOT NULL DEFAULT '',
|
55 |
-
`status` smallint(6) NOT NULL DEFAULT '0',
|
56 |
-
`is_default` tinyint(6) NOT NULL DEFAULT '0',
|
57 |
-
`sort_order` int(11) NOT NULL DEFAULT '0',
|
58 |
-
`banner_group` varchar(32) NOT NULL DEFAULT '',
|
59 |
-
`banner_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>Image, 1=>HTML',
|
60 |
-
`url` varchar(255) NOT NULL DEFAULT '',
|
61 |
-
`created_time` datetime DEFAULT NULL,
|
62 |
-
`update_time` datetime DEFAULT NULL,
|
63 |
-
PRIMARY KEY (`banner_id`)
|
64 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
65 |
-
SQLTEXT;
|
66 |
-
|
67 |
-
$installer->run($sql);
|
68 |
-
|
69 |
-
$sql=<<<SQLTEXT
|
70 |
-
CREATE TABLE {$installer->getTable('qixol_banner_images')}(
|
71 |
-
`banner_image_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
72 |
-
`filename` varchar(255) NOT NULL DEFAULT '',
|
73 |
-
PRIMARY KEY (`banner_image_id`)
|
74 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
75 |
-
SQLTEXT;
|
76 |
-
|
77 |
-
$installer->run($sql);
|
78 |
-
|
79 |
-
$sql=<<<SQLTEXT
|
80 |
-
CREATE TABLE {$installer->getTable('qixol_banner_has_images')}(
|
81 |
-
`banner_image_id` int(11) unsigned NOT NULL default 0,
|
82 |
-
`banner_id` int(11) unsigned NOT NULL default 0,
|
83 |
-
PRIMARY KEY (`banner_image_id`,`banner_id`),
|
84 |
-
CONSTRAINT `FK_qixol_banner_has_images_banner_image_id` FOREIGN KEY (`banner_image_id`) REFERENCES `qixol_banner_images` (`banner_image_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
85 |
-
CONSTRAINT `FK_qixol_banner_has_images_banner_id` FOREIGN KEY (`banner_id`) REFERENCES `qixol_banners` (`banner_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
86 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
87 |
-
SQLTEXT;
|
88 |
-
|
89 |
-
$installer->run($sql);
|
90 |
-
|
91 |
-
|
92 |
-
$sql=<<<SQLTEXT
|
93 |
-
CREATE TABLE {$installer->getTable('qixol_promotions_type')}(
|
94 |
-
`promotion_id` int(11) unsigned NOT NULL default 0,
|
95 |
-
`promotion_type` varchar(255) NOT NULL DEFAULT '',
|
96 |
-
`promotion_name` varchar(255) NOT NULL DEFAULT '',
|
97 |
-
`promotion_text` text,
|
98 |
-
`yourref` varchar(255) NOT NULL DEFAULT '',
|
99 |
-
`bundleprice` decimal(12,2) NOT NULL DEFAULT '0.00',
|
100 |
-
`discountpercent` decimal(8,2) NOT NULL DEFAULT '0.00',
|
101 |
-
`discountamount` decimal(10,2) NOT NULL DEFAULT '0.00',
|
102 |
-
`hascouponrestrictions` tinyint not null default 0,
|
103 |
-
`is_everyday` tinyint not null default 0,
|
104 |
-
`till_date` datetime not null default '0000-00-00 00:00:00',
|
105 |
-
`from_date` datetime not null default '0000-00-00 00:00:00',
|
106 |
-
`created_time` datetime DEFAULT NULL,
|
107 |
-
`update_time` datetime DEFAULT NULL,
|
108 |
-
`is_for_product` tinyint not null default 0,
|
109 |
-
PRIMARY KEY (`promotion_id`)
|
110 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
111 |
-
SQLTEXT;
|
112 |
-
|
113 |
-
|
114 |
-
$installer->run($sql);
|
115 |
-
|
116 |
-
$sql=<<<SQLTEXT
|
117 |
-
CREATE TABLE {$installer->getTable('qixol_promotion_has_product')}(
|
118 |
-
`product_id` int(11) unsigned NOT NULL default 0,
|
119 |
-
`parent_product_id` int(11) unsigned NOT NULL default 0,
|
120 |
-
`promotion_id` int(11) unsigned NOT NULL default 0,
|
121 |
-
`parentsku` varchar(255) NOT NULL DEFAULT '',
|
122 |
-
`sku` varchar(255) NOT NULL DEFAULT '',
|
123 |
-
`requiredqty` tinyint not null default 0,
|
124 |
-
`multipleproductrestrictions` tinyint not null default 0,
|
125 |
-
`created_time` datetime DEFAULT NULL,
|
126 |
-
`update_time` datetime DEFAULT NULL,
|
127 |
-
PRIMARY KEY (`product_id`,`parent_product_id`,`promotion_id`),
|
128 |
-
INDEX `idx_qixol_promotion_sku`(`sku`)
|
129 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
130 |
-
SQLTEXT;
|
131 |
-
|
132 |
-
|
133 |
-
$installer->run($sql);
|
134 |
-
|
135 |
-
$sql=<<<SQLTEXT
|
136 |
-
CREATE TABLE {$installer->getTable('qixol_banner_box')}(
|
137 |
-
banner_box_type varchar(64) not null default '',
|
138 |
-
banner_box_is_active tinyint not null default 0,
|
139 |
-
banner_box_translation_type varchar(32) not null default '',
|
140 |
-
`created_time` datetime DEFAULT NULL,
|
141 |
-
`update_time` datetime DEFAULT NULL,
|
142 |
-
PRIMARY KEY (`banner_box_type`)
|
143 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
144 |
-
SQLTEXT;
|
145 |
-
|
146 |
-
|
147 |
-
$installer->run($sql);
|
148 |
-
|
149 |
-
$sql=<<<SQLTEXT
|
150 |
-
CREATE TABLE {$installer->getTable('qixol_shipping_name_map')}(
|
151 |
-
shipping_name varchar(255) not null default '',
|
152 |
-
shipping_name_map varchar(255) not null default '',
|
153 |
-
`created_time` datetime DEFAULT NULL,
|
154 |
-
`update_time` datetime DEFAULT NULL,
|
155 |
-
PRIMARY KEY (`shipping_name`),
|
156 |
-
UNIQUE KEY `shipping_name_to_shipping_name_map` (`shipping_name`,`shipping_name_map`)
|
157 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
158 |
-
SQLTEXT;
|
159 |
-
|
160 |
-
|
161 |
-
$installer->run($sql);
|
162 |
-
|
163 |
-
$sql=<<<SQLTEXT
|
164 |
-
CREATE TABLE {$installer->getTable('qixol_coupon_issued')}(
|
165 |
-
entity_id int unsigned not null auto_increment,
|
166 |
-
customer_id int unsigned not null default 0,
|
167 |
-
coupon_code_value varchar(255) not null default '',
|
168 |
-
coupon_valid_till datetime,
|
169 |
-
is_used tinyint unsigned not null default 0,
|
170 |
-
coupon_description varchar(255) not null default '',
|
171 |
-
`created_time` datetime DEFAULT NULL,
|
172 |
-
PRIMARY KEY (`entity_id`),
|
173 |
-
KEY `IDX_qixol_coupon_issued_customer_id` (`entity_id`),
|
174 |
-
CONSTRAINT `FK_qixol_coupon_issued_customer_id_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
175 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
176 |
-
SQLTEXT;
|
177 |
-
|
178 |
-
/*$sql=<<<SQLTEXT
|
179 |
-
CREATE TABLE {$installer->getTable('qixol_flat_order_promotions')}(
|
180 |
-
`order_id` int(10) unsigned DEFAULT NULL COMMENT 'Order ID',
|
181 |
-
promotion_data_applied text,
|
182 |
-
UNIQUE (`order_id`),
|
183 |
-
CONSTRAINT `FK_qixol_flat_order_promotions_sales_flat_order_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
184 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
185 |
-
SQLTEXT;*/
|
186 |
-
|
187 |
-
$sql=<<<SQLTEXT
|
188 |
-
alter table {$installer->getTable('sales_flat_order')} add column promotion_data_applied text;
|
189 |
-
SQLTEXT;
|
190 |
-
|
191 |
-
$installer->run($sql);
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
$sql=<<<SQLTEXT
|
196 |
-
CREATE TABLE {$installer->getTable('qixol_customers_groups_name_map')}(
|
197 |
-
customer_group_name varchar(255) not null default '',
|
198 |
-
customer_group_name_map varchar(255) not null default '',
|
199 |
-
`created_time` datetime DEFAULT NULL,
|
200 |
-
`update_time` datetime DEFAULT NULL,
|
201 |
-
PRIMARY KEY (`customer_group_name`),
|
202 |
-
UNIQUE KEY `customer_group_name_to_customer_group_name_map` (`customer_group_name`,`customer_group_name_map`)
|
203 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
204 |
-
SQLTEXT;
|
205 |
-
|
206 |
-
|
207 |
-
$installer->run($sql);
|
208 |
-
|
209 |
-
|
210 |
-
$sql=<<<SQLTEXT
|
211 |
-
CREATE TABLE {$installer->getTable('qixol_stores_name_map')}(
|
212 |
-
store_name varchar(255) not null default '',
|
213 |
-
store_name_map varchar(255) not null default '',
|
214 |
-
`created_time` datetime DEFAULT NULL,
|
215 |
-
`update_time` datetime DEFAULT NULL,
|
216 |
-
PRIMARY KEY (`store_name`),
|
217 |
-
UNIQUE KEY `store_name_to_store_name_map` (`store_name`,`store_name_map`)
|
218 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
219 |
-
SQLTEXT;
|
220 |
-
|
221 |
-
|
222 |
-
$installer->run($sql);
|
223 |
-
|
224 |
-
|
225 |
-
$sql=<<<SQLTEXT
|
226 |
-
CREATE TABLE {$installer->getTable('qixol_stickers')}(
|
227 |
-
`sticker_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
228 |
-
`use_default_sticker` varchar(32) not null default '',
|
229 |
-
`filename` varchar(255) NOT NULL DEFAULT '',
|
230 |
-
`use_default_banner_group` tinyint(6) NOT NULL DEFAULT '0',
|
231 |
-
`default_banner_group` varchar(32) not null default '',
|
232 |
-
`unique_banner_group` varchar(32) not null default '',
|
233 |
-
`banner_link_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'promotion reference',
|
234 |
-
`status` smallint(6) NOT NULL DEFAULT '0',
|
235 |
-
`sort_order` int(11) NOT NULL DEFAULT '0',
|
236 |
-
`created_time` datetime DEFAULT NULL,
|
237 |
-
`update_time` datetime DEFAULT NULL,
|
238 |
-
PRIMARY KEY (`sticker_id`)
|
239 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
240 |
-
SQLTEXT;
|
241 |
-
|
242 |
-
$installer->run($sql);
|
243 |
-
|
244 |
-
|
245 |
-
$sql=<<<SQLTEXT
|
246 |
-
CREATE TABLE {$installer->getTable('qixol_cutomer_points')}(
|
247 |
-
points_account_id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
248 |
-
customer_id int unsigned not null default 0,
|
249 |
-
store_id smallint(5) unsigned NOT NULL DEFAULT '0',
|
250 |
-
current_points int(5) unsigned NOT NULL DEFAULT '0',
|
251 |
-
earned_points int unsigned not null default 0,
|
252 |
-
spent_points int unsigned not null default 0,
|
253 |
-
PRIMARY KEY (`points_account_id`),
|
254 |
-
KEY `FK_catalog_category_ENTITY_STORE` (`store_id`),
|
255 |
-
CONSTRAINT `FK_qixol_cutomer_points_customer_id_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
256 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
257 |
-
SQLTEXT;
|
258 |
-
|
259 |
-
$installer->run($sql);
|
260 |
-
|
261 |
-
|
262 |
-
$sql=<<<SQLTEXT
|
263 |
-
ALTER TABLE {$installer->getTable('sales/quote_address')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
264 |
-
ALTER TABLE {$installer->getTable('sales/quote_address')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
265 |
-
|
266 |
-
ALTER TABLE {$installer->getTable('sales/order')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
267 |
-
ALTER TABLE {$installer->getTable('sales/order')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
268 |
-
|
269 |
-
ALTER TABLE {$installer->getTable('sales/invoice')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
270 |
-
ALTER TABLE {$installer->getTable('sales/invoice')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
271 |
-
SQLTEXT;
|
272 |
-
$installer->run($sql);
|
273 |
-
|
274 |
-
//demo
|
275 |
-
//Mage::getModel('core/url_rewrite')->setId(null);
|
276 |
-
//demo
|
277 |
-
$installer->endSetup();
|
278 |
-
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$sql=<<<SQLTEXT
|
7 |
+
create table {$installer->getTable('qixol_product_to_delete')}(
|
8 |
+
entity_id int unsigned not null default 0,
|
9 |
+
product_sku varchar(128),
|
10 |
+
child_sku varchar(128),
|
11 |
+
deleted_time datetime,
|
12 |
+
primary key (entity_id)
|
13 |
+
);
|
14 |
+
|
15 |
+
SQLTEXT;
|
16 |
+
|
17 |
+
$installer->run($sql);
|
18 |
+
|
19 |
+
|
20 |
+
$sql=<<<SQLTEXT
|
21 |
+
create table {$installer->getTable('qixol_product_export_stat')}(
|
22 |
+
export_id int(11) NOT NULL auto_increment,
|
23 |
+
start_export timestamp NOT NULL default '0000-00-00 00:00:00',
|
24 |
+
finish_export timestamp NOT NULL default '0000-00-00 00:00:00',
|
25 |
+
number_of_products int(11) default '0',
|
26 |
+
status_export varchar(255) default '',
|
27 |
+
export_by ENUM ('MANUAL', 'CRON') DEFAULt NULL ,
|
28 |
+
status_export_message text,
|
29 |
+
primary key (export_id)
|
30 |
+
);
|
31 |
+
SQLTEXT;
|
32 |
+
|
33 |
+
$installer->run($sql);
|
34 |
+
|
35 |
+
$sql=<<<SQLTEXT
|
36 |
+
create table {$installer->getTable('qixol_process_export_status_table')}(
|
37 |
+
id int(11) NOT NULL auto_increment,
|
38 |
+
last_message varchar(255),
|
39 |
+
export_what varchar(32),
|
40 |
+
exports_start datetime,
|
41 |
+
exports_last_updated datetime,
|
42 |
+
is_finished int(1) default 0,
|
43 |
+
extended_message text,
|
44 |
+
PRIMARY KEY (id)
|
45 |
+
);
|
46 |
+
SQLTEXT;
|
47 |
+
|
48 |
+
$installer->run($sql);
|
49 |
+
|
50 |
+
$sql=<<<SQLTEXT
|
51 |
+
CREATE TABLE {$installer->getTable('qixol_banners')}(
|
52 |
+
`banner_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
53 |
+
`title` varchar(255) NOT NULL DEFAULT '',
|
54 |
+
`banner_link_name` varchar(255) NOT NULL DEFAULT '',
|
55 |
+
`status` smallint(6) NOT NULL DEFAULT '0',
|
56 |
+
`is_default` tinyint(6) NOT NULL DEFAULT '0',
|
57 |
+
`sort_order` int(11) NOT NULL DEFAULT '0',
|
58 |
+
`banner_group` varchar(32) NOT NULL DEFAULT '',
|
59 |
+
`banner_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>Image, 1=>HTML',
|
60 |
+
`url` varchar(255) NOT NULL DEFAULT '',
|
61 |
+
`created_time` datetime DEFAULT NULL,
|
62 |
+
`update_time` datetime DEFAULT NULL,
|
63 |
+
PRIMARY KEY (`banner_id`)
|
64 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
65 |
+
SQLTEXT;
|
66 |
+
|
67 |
+
$installer->run($sql);
|
68 |
+
|
69 |
+
$sql=<<<SQLTEXT
|
70 |
+
CREATE TABLE {$installer->getTable('qixol_banner_images')}(
|
71 |
+
`banner_image_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
72 |
+
`filename` varchar(255) NOT NULL DEFAULT '',
|
73 |
+
PRIMARY KEY (`banner_image_id`)
|
74 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
75 |
+
SQLTEXT;
|
76 |
+
|
77 |
+
$installer->run($sql);
|
78 |
+
|
79 |
+
$sql=<<<SQLTEXT
|
80 |
+
CREATE TABLE {$installer->getTable('qixol_banner_has_images')}(
|
81 |
+
`banner_image_id` int(11) unsigned NOT NULL default 0,
|
82 |
+
`banner_id` int(11) unsigned NOT NULL default 0,
|
83 |
+
PRIMARY KEY (`banner_image_id`,`banner_id`),
|
84 |
+
CONSTRAINT `FK_qixol_banner_has_images_banner_image_id` FOREIGN KEY (`banner_image_id`) REFERENCES `qixol_banner_images` (`banner_image_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
85 |
+
CONSTRAINT `FK_qixol_banner_has_images_banner_id` FOREIGN KEY (`banner_id`) REFERENCES `qixol_banners` (`banner_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
86 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
87 |
+
SQLTEXT;
|
88 |
+
|
89 |
+
$installer->run($sql);
|
90 |
+
|
91 |
+
|
92 |
+
$sql=<<<SQLTEXT
|
93 |
+
CREATE TABLE {$installer->getTable('qixol_promotions_type')}(
|
94 |
+
`promotion_id` int(11) unsigned NOT NULL default 0,
|
95 |
+
`promotion_type` varchar(255) NOT NULL DEFAULT '',
|
96 |
+
`promotion_name` varchar(255) NOT NULL DEFAULT '',
|
97 |
+
`promotion_text` text,
|
98 |
+
`yourref` varchar(255) NOT NULL DEFAULT '',
|
99 |
+
`bundleprice` decimal(12,2) NOT NULL DEFAULT '0.00',
|
100 |
+
`discountpercent` decimal(8,2) NOT NULL DEFAULT '0.00',
|
101 |
+
`discountamount` decimal(10,2) NOT NULL DEFAULT '0.00',
|
102 |
+
`hascouponrestrictions` tinyint not null default 0,
|
103 |
+
`is_everyday` tinyint not null default 0,
|
104 |
+
`till_date` datetime not null default '0000-00-00 00:00:00',
|
105 |
+
`from_date` datetime not null default '0000-00-00 00:00:00',
|
106 |
+
`created_time` datetime DEFAULT NULL,
|
107 |
+
`update_time` datetime DEFAULT NULL,
|
108 |
+
`is_for_product` tinyint not null default 0,
|
109 |
+
PRIMARY KEY (`promotion_id`)
|
110 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
111 |
+
SQLTEXT;
|
112 |
+
|
113 |
+
|
114 |
+
$installer->run($sql);
|
115 |
+
|
116 |
+
$sql=<<<SQLTEXT
|
117 |
+
CREATE TABLE {$installer->getTable('qixol_promotion_has_product')}(
|
118 |
+
`product_id` int(11) unsigned NOT NULL default 0,
|
119 |
+
`parent_product_id` int(11) unsigned NOT NULL default 0,
|
120 |
+
`promotion_id` int(11) unsigned NOT NULL default 0,
|
121 |
+
`parentsku` varchar(255) NOT NULL DEFAULT '',
|
122 |
+
`sku` varchar(255) NOT NULL DEFAULT '',
|
123 |
+
`requiredqty` tinyint not null default 0,
|
124 |
+
`multipleproductrestrictions` tinyint not null default 0,
|
125 |
+
`created_time` datetime DEFAULT NULL,
|
126 |
+
`update_time` datetime DEFAULT NULL,
|
127 |
+
PRIMARY KEY (`product_id`,`parent_product_id`,`promotion_id`),
|
128 |
+
INDEX `idx_qixol_promotion_sku`(`sku`)
|
129 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
130 |
+
SQLTEXT;
|
131 |
+
|
132 |
+
|
133 |
+
$installer->run($sql);
|
134 |
+
|
135 |
+
$sql=<<<SQLTEXT
|
136 |
+
CREATE TABLE {$installer->getTable('qixol_banner_box')}(
|
137 |
+
banner_box_type varchar(64) not null default '',
|
138 |
+
banner_box_is_active tinyint not null default 0,
|
139 |
+
banner_box_translation_type varchar(32) not null default '',
|
140 |
+
`created_time` datetime DEFAULT NULL,
|
141 |
+
`update_time` datetime DEFAULT NULL,
|
142 |
+
PRIMARY KEY (`banner_box_type`)
|
143 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
144 |
+
SQLTEXT;
|
145 |
+
|
146 |
+
|
147 |
+
$installer->run($sql);
|
148 |
+
|
149 |
+
$sql=<<<SQLTEXT
|
150 |
+
CREATE TABLE {$installer->getTable('qixol_shipping_name_map')}(
|
151 |
+
shipping_name varchar(255) not null default '',
|
152 |
+
shipping_name_map varchar(255) not null default '',
|
153 |
+
`created_time` datetime DEFAULT NULL,
|
154 |
+
`update_time` datetime DEFAULT NULL,
|
155 |
+
PRIMARY KEY (`shipping_name`),
|
156 |
+
UNIQUE KEY `shipping_name_to_shipping_name_map` (`shipping_name`,`shipping_name_map`)
|
157 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
158 |
+
SQLTEXT;
|
159 |
+
|
160 |
+
|
161 |
+
$installer->run($sql);
|
162 |
+
|
163 |
+
$sql=<<<SQLTEXT
|
164 |
+
CREATE TABLE {$installer->getTable('qixol_coupon_issued')}(
|
165 |
+
entity_id int unsigned not null auto_increment,
|
166 |
+
customer_id int unsigned not null default 0,
|
167 |
+
coupon_code_value varchar(255) not null default '',
|
168 |
+
coupon_valid_till datetime,
|
169 |
+
is_used tinyint unsigned not null default 0,
|
170 |
+
coupon_description varchar(255) not null default '',
|
171 |
+
`created_time` datetime DEFAULT NULL,
|
172 |
+
PRIMARY KEY (`entity_id`),
|
173 |
+
KEY `IDX_qixol_coupon_issued_customer_id` (`entity_id`),
|
174 |
+
CONSTRAINT `FK_qixol_coupon_issued_customer_id_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
175 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
176 |
+
SQLTEXT;
|
177 |
+
|
178 |
+
/*$sql=<<<SQLTEXT
|
179 |
+
CREATE TABLE {$installer->getTable('qixol_flat_order_promotions')}(
|
180 |
+
`order_id` int(10) unsigned DEFAULT NULL COMMENT 'Order ID',
|
181 |
+
promotion_data_applied text,
|
182 |
+
UNIQUE (`order_id`),
|
183 |
+
CONSTRAINT `FK_qixol_flat_order_promotions_sales_flat_order_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
184 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
185 |
+
SQLTEXT;*/
|
186 |
+
|
187 |
+
$sql=<<<SQLTEXT
|
188 |
+
alter table {$installer->getTable('sales_flat_order')} add column promotion_data_applied text;
|
189 |
+
SQLTEXT;
|
190 |
+
|
191 |
+
$installer->run($sql);
|
192 |
+
|
193 |
+
|
194 |
+
|
195 |
+
$sql=<<<SQLTEXT
|
196 |
+
CREATE TABLE {$installer->getTable('qixol_customers_groups_name_map')}(
|
197 |
+
customer_group_name varchar(255) not null default '',
|
198 |
+
customer_group_name_map varchar(255) not null default '',
|
199 |
+
`created_time` datetime DEFAULT NULL,
|
200 |
+
`update_time` datetime DEFAULT NULL,
|
201 |
+
PRIMARY KEY (`customer_group_name`),
|
202 |
+
UNIQUE KEY `customer_group_name_to_customer_group_name_map` (`customer_group_name`,`customer_group_name_map`)
|
203 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
204 |
+
SQLTEXT;
|
205 |
+
|
206 |
+
|
207 |
+
$installer->run($sql);
|
208 |
+
|
209 |
+
|
210 |
+
$sql=<<<SQLTEXT
|
211 |
+
CREATE TABLE {$installer->getTable('qixol_stores_name_map')}(
|
212 |
+
store_name varchar(255) not null default '',
|
213 |
+
store_name_map varchar(255) not null default '',
|
214 |
+
`created_time` datetime DEFAULT NULL,
|
215 |
+
`update_time` datetime DEFAULT NULL,
|
216 |
+
PRIMARY KEY (`store_name`),
|
217 |
+
UNIQUE KEY `store_name_to_store_name_map` (`store_name`,`store_name_map`)
|
218 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
219 |
+
SQLTEXT;
|
220 |
+
|
221 |
+
|
222 |
+
$installer->run($sql);
|
223 |
+
|
224 |
+
|
225 |
+
$sql=<<<SQLTEXT
|
226 |
+
CREATE TABLE {$installer->getTable('qixol_stickers')}(
|
227 |
+
`sticker_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
228 |
+
`use_default_sticker` varchar(32) not null default '',
|
229 |
+
`filename` varchar(255) NOT NULL DEFAULT '',
|
230 |
+
`use_default_banner_group` tinyint(6) NOT NULL DEFAULT '0',
|
231 |
+
`default_banner_group` varchar(32) not null default '',
|
232 |
+
`unique_banner_group` varchar(32) not null default '',
|
233 |
+
`banner_link_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'promotion reference',
|
234 |
+
`status` smallint(6) NOT NULL DEFAULT '0',
|
235 |
+
`sort_order` int(11) NOT NULL DEFAULT '0',
|
236 |
+
`created_time` datetime DEFAULT NULL,
|
237 |
+
`update_time` datetime DEFAULT NULL,
|
238 |
+
PRIMARY KEY (`sticker_id`)
|
239 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
240 |
+
SQLTEXT;
|
241 |
+
|
242 |
+
$installer->run($sql);
|
243 |
+
|
244 |
+
|
245 |
+
$sql=<<<SQLTEXT
|
246 |
+
CREATE TABLE {$installer->getTable('qixol_cutomer_points')}(
|
247 |
+
points_account_id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
248 |
+
customer_id int unsigned not null default 0,
|
249 |
+
store_id smallint(5) unsigned NOT NULL DEFAULT '0',
|
250 |
+
current_points int(5) unsigned NOT NULL DEFAULT '0',
|
251 |
+
earned_points int unsigned not null default 0,
|
252 |
+
spent_points int unsigned not null default 0,
|
253 |
+
PRIMARY KEY (`points_account_id`),
|
254 |
+
KEY `FK_catalog_category_ENTITY_STORE` (`store_id`),
|
255 |
+
CONSTRAINT `FK_qixol_cutomer_points_customer_id_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
256 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
257 |
+
SQLTEXT;
|
258 |
+
|
259 |
+
$installer->run($sql);
|
260 |
+
|
261 |
+
|
262 |
+
$sql=<<<SQLTEXT
|
263 |
+
ALTER TABLE {$installer->getTable('sales/quote_address')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
264 |
+
ALTER TABLE {$installer->getTable('sales/quote_address')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
265 |
+
|
266 |
+
ALTER TABLE {$installer->getTable('sales/order')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
267 |
+
ALTER TABLE {$installer->getTable('sales/order')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
268 |
+
|
269 |
+
ALTER TABLE {$installer->getTable('sales/invoice')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
270 |
+
ALTER TABLE {$installer->getTable('sales/invoice')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
271 |
+
SQLTEXT;
|
272 |
+
$installer->run($sql);
|
273 |
+
|
274 |
+
//demo
|
275 |
+
//Mage::getModel('core/url_rewrite')->setId(null);
|
276 |
+
//demo
|
277 |
+
$installer->endSetup();
|
278 |
+
|
279 |
+
?>
|
app/code/community/Holbi/Qixol/sql/qixol_setup/mysql4-install-0.2.0.php
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$sql=<<<SQLTEXT
|
7 |
+
create table {$installer->getTable('qixol_product_to_delete')}(
|
8 |
+
entity_id int unsigned not null default 0,
|
9 |
+
product_sku varchar(128),
|
10 |
+
child_sku varchar(128),
|
11 |
+
deleted_time datetime,
|
12 |
+
primary key (entity_id)
|
13 |
+
);
|
14 |
+
|
15 |
+
SQLTEXT;
|
16 |
+
|
17 |
+
$installer->run($sql);
|
18 |
+
|
19 |
+
$sql=<<<SQLTEXT
|
20 |
+
create table {$installer->getTable('qixol_process_export_status_table')}(
|
21 |
+
id int(11) NOT NULL auto_increment,
|
22 |
+
last_message varchar(255),
|
23 |
+
export_what varchar(32),
|
24 |
+
exports_start datetime,
|
25 |
+
exports_last_updated datetime,
|
26 |
+
is_finished int(1) default 0,
|
27 |
+
extended_message text,
|
28 |
+
PRIMARY KEY (id)
|
29 |
+
);
|
30 |
+
SQLTEXT;
|
31 |
+
|
32 |
+
$installer->run($sql);
|
33 |
+
|
34 |
+
$sql=<<<SQLTEXT
|
35 |
+
CREATE TABLE {$installer->getTable('qixol_banners')}(
|
36 |
+
`banner_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
37 |
+
`title` varchar(255) NOT NULL DEFAULT '',
|
38 |
+
`display_zone` varchar(255) NOT NULL DEFAULT '',
|
39 |
+
`status` smallint(6) NOT NULL DEFAULT '0',
|
40 |
+
`created_time` datetime DEFAULT NULL,
|
41 |
+
`update_time` datetime DEFAULT NULL,
|
42 |
+
PRIMARY KEY (`banner_id`)
|
43 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
44 |
+
SQLTEXT;
|
45 |
+
|
46 |
+
$installer->run($sql);
|
47 |
+
|
48 |
+
$sql=<<<SQLTEXT
|
49 |
+
CREATE TABLE {$installer->getTable('qixol_banner_image')}(
|
50 |
+
`banner_image_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
51 |
+
`filename` varchar(255) NOT NULL DEFAULT '',
|
52 |
+
`banner_id` int(11) unsigned NOT NULL,
|
53 |
+
`sort_order` int(11) NOT NULL DEFAULT '0',
|
54 |
+
`promotion_reference` varchar(255) not null default '',
|
55 |
+
`comment` varchar(255),
|
56 |
+
`url` varchar(255),
|
57 |
+
PRIMARY KEY (`banner_image_id`),
|
58 |
+
CONSTRAINT `FK_qixol_banner_image_banner_id` FOREIGN KEY (`banner_id`) REFERENCES `qixol_banners` (`banner_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
59 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
60 |
+
SQLTEXT;
|
61 |
+
|
62 |
+
$installer->run($sql);
|
63 |
+
|
64 |
+
$sql=<<<SQLTEXT
|
65 |
+
CREATE TABLE {$installer->getTable('qixol_promotions_type')}(
|
66 |
+
`promotion_id` int(11) unsigned NOT NULL default 0,
|
67 |
+
`promotion_type` varchar(255) NOT NULL DEFAULT '',
|
68 |
+
`promotion_name` varchar(255) NOT NULL DEFAULT '',
|
69 |
+
`promotion_text` text,
|
70 |
+
`yourref` varchar(255) NOT NULL DEFAULT '',
|
71 |
+
`bundleprice` decimal(12,2) NOT NULL DEFAULT '0.00',
|
72 |
+
`discountpercent` decimal(8,2) NOT NULL DEFAULT '0.00',
|
73 |
+
`discountamount` decimal(10,2) NOT NULL DEFAULT '0.00',
|
74 |
+
`hascouponrestrictions` tinyint not null default 0,
|
75 |
+
`is_everyday` tinyint not null default 0,
|
76 |
+
`till_date` datetime not null default '0000-00-00 00:00:00',
|
77 |
+
`from_date` datetime not null default '0000-00-00 00:00:00',
|
78 |
+
`created_time` datetime DEFAULT NULL,
|
79 |
+
`update_time` datetime DEFAULT NULL,
|
80 |
+
`is_for_product` tinyint not null default 0,
|
81 |
+
PRIMARY KEY (`promotion_id`)
|
82 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
83 |
+
SQLTEXT;
|
84 |
+
|
85 |
+
|
86 |
+
$installer->run($sql);
|
87 |
+
|
88 |
+
$sql=<<<SQLTEXT
|
89 |
+
CREATE TABLE {$installer->getTable('qixol_promotion_has_product')}(
|
90 |
+
`product_id` int(11) unsigned NOT NULL default 0,
|
91 |
+
`parent_product_id` int(11) unsigned NOT NULL default 0,
|
92 |
+
`promotion_id` int(11) unsigned NOT NULL default 0,
|
93 |
+
`parentsku` varchar(255) NOT NULL DEFAULT '',
|
94 |
+
`sku` varchar(255) NOT NULL DEFAULT '',
|
95 |
+
`requiredqty` tinyint not null default 0,
|
96 |
+
`multipleproductrestrictions` tinyint not null default 0,
|
97 |
+
`created_time` datetime DEFAULT NULL,
|
98 |
+
`update_time` datetime DEFAULT NULL,
|
99 |
+
PRIMARY KEY (`product_id`,`parent_product_id`,`promotion_id`),
|
100 |
+
INDEX `idx_qixol_promotion_sku`(`sku`)
|
101 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
102 |
+
SQLTEXT;
|
103 |
+
|
104 |
+
|
105 |
+
$installer->run($sql);
|
106 |
+
|
107 |
+
$sql=<<<SQLTEXT
|
108 |
+
CREATE TABLE {$installer->getTable('qixol_banner_box')}(
|
109 |
+
banner_box_type varchar(64) not null default '',
|
110 |
+
banner_box_is_active tinyint not null default 0,
|
111 |
+
banner_box_translation_type varchar(32) not null default '',
|
112 |
+
`created_time` datetime DEFAULT NULL,
|
113 |
+
`update_time` datetime DEFAULT NULL,
|
114 |
+
PRIMARY KEY (`banner_box_type`)
|
115 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
116 |
+
SQLTEXT;
|
117 |
+
|
118 |
+
|
119 |
+
$installer->run($sql);
|
120 |
+
|
121 |
+
$sql=<<<SQLTEXT
|
122 |
+
CREATE TABLE {$installer->getTable('qixol_shipping_name_map')}(
|
123 |
+
shipping_name varchar(255) not null default '',
|
124 |
+
carrier_title varchar(255) not null default '',
|
125 |
+
carrier_method varchar(255) not null default '',
|
126 |
+
integration_code varchar(255) not null default '',
|
127 |
+
`created_time` datetime DEFAULT NULL,
|
128 |
+
`update_time` datetime DEFAULT NULL,
|
129 |
+
PRIMARY KEY (`shipping_name`),
|
130 |
+
UNIQUE KEY `shipping_name_to_shipping_name_map` (`shipping_name`,`integration_code`)
|
131 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
132 |
+
SQLTEXT;
|
133 |
+
|
134 |
+
|
135 |
+
$installer->run($sql);
|
136 |
+
|
137 |
+
$sql=<<<SQLTEXT
|
138 |
+
CREATE TABLE {$installer->getTable('qixol_coupon_issued')}(
|
139 |
+
entity_id int unsigned not null auto_increment,
|
140 |
+
customer_id int unsigned not null default 0,
|
141 |
+
coupon_code_value varchar(255) not null default '',
|
142 |
+
coupon_valid_till datetime,
|
143 |
+
is_used tinyint unsigned not null default 0,
|
144 |
+
coupon_description varchar(255) not null default '',
|
145 |
+
`created_time` datetime DEFAULT NULL,
|
146 |
+
PRIMARY KEY (`entity_id`),
|
147 |
+
KEY `IDX_qixol_coupon_issued_customer_id` (`entity_id`),
|
148 |
+
CONSTRAINT `FK_qixol_coupon_issued_customer_id_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
149 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
150 |
+
SQLTEXT;
|
151 |
+
|
152 |
+
$sql=<<<SQLTEXT
|
153 |
+
CREATE TABLE {$installer->getTable('qixol_customers_groups_name_map')}(
|
154 |
+
customer_group_name varchar(255) not null default '',
|
155 |
+
integration_code varchar(255) not null default '',
|
156 |
+
`created_time` datetime DEFAULT NULL,
|
157 |
+
`update_time` datetime DEFAULT NULL,
|
158 |
+
PRIMARY KEY (`customer_group_name`),
|
159 |
+
UNIQUE KEY `customer_group_name_to_integration_code` (`customer_group_name`,`integration_code`)
|
160 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
161 |
+
SQLTEXT;
|
162 |
+
|
163 |
+
|
164 |
+
$installer->run($sql);
|
165 |
+
|
166 |
+
|
167 |
+
$sql=<<<SQLTEXT
|
168 |
+
CREATE TABLE {$installer->getTable('qixol_stores_name_map')}(
|
169 |
+
`website` VARCHAR( 255 ) NOT NULL DEFAULT '',
|
170 |
+
`store_group` VARCHAR( 255 ) NOT NULL DEFAULT '',
|
171 |
+
store_name varchar(255) not null default '',
|
172 |
+
integration_code varchar(255) not null default '',
|
173 |
+
`created_time` datetime DEFAULT NULL,
|
174 |
+
`update_time` datetime DEFAULT NULL,
|
175 |
+
PRIMARY KEY (`store_name`),
|
176 |
+
UNIQUE KEY `store_name_to_integration_code` (`store_name`,`integration_code`)
|
177 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
178 |
+
SQLTEXT;
|
179 |
+
|
180 |
+
|
181 |
+
$installer->run($sql);
|
182 |
+
|
183 |
+
|
184 |
+
$sql=<<<SQLTEXT
|
185 |
+
CREATE TABLE {$installer->getTable('qixol_stickers')}(
|
186 |
+
`sticker_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
187 |
+
`filename` varchar(255) NOT NULL DEFAULT '',
|
188 |
+
`promo_reference` varchar(255) NOT NULL DEFAULT '',
|
189 |
+
`promo_type_name` varchar(255) NOT NULL DEFAULT '',
|
190 |
+
`is_default_for_type` tinyint not null default '0',
|
191 |
+
`is_system_default_for_type` tinyint not null default '0',
|
192 |
+
PRIMARY KEY (`sticker_id`)
|
193 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
194 |
+
SQLTEXT;
|
195 |
+
|
196 |
+
$installer->run($sql);
|
197 |
+
|
198 |
+
|
199 |
+
$sql=<<<SQLTEXT
|
200 |
+
CREATE TABLE {$installer->getTable('qixol_cutomer_points')}(
|
201 |
+
points_account_id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
202 |
+
customer_id int unsigned not null default 0,
|
203 |
+
store_id smallint(5) unsigned NOT NULL DEFAULT '0',
|
204 |
+
current_points int(5) unsigned NOT NULL DEFAULT '0',
|
205 |
+
earned_points int unsigned not null default 0,
|
206 |
+
spent_points int unsigned not null default 0,
|
207 |
+
PRIMARY KEY (`points_account_id`),
|
208 |
+
KEY `FK_catalog_category_ENTITY_STORE` (`store_id`),
|
209 |
+
CONSTRAINT `FK_qixol_cutomer_points_customer_id_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
210 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
211 |
+
SQLTEXT;
|
212 |
+
|
213 |
+
$installer->run($sql);
|
214 |
+
|
215 |
+
|
216 |
+
$sql=<<<SQLTEXT
|
217 |
+
ALTER TABLE {$installer->getTable('sales/quote_address')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
218 |
+
ALTER TABLE {$installer->getTable('sales/quote_address')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
219 |
+
|
220 |
+
alter table {$installer->getTable('sales/order')} add column promotion_data_applied text;
|
221 |
+
ALTER TABLE {$installer->getTable('sales/order')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
222 |
+
ALTER TABLE {$installer->getTable('sales/order')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
223 |
+
|
224 |
+
ALTER TABLE {$installer->getTable('sales/invoice')} ADD `points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
225 |
+
ALTER TABLE {$installer->getTable('sales/invoice')} ADD `base_points_amount` DECIMAL( 10, 2 ) NOT NULL;
|
226 |
+
SQLTEXT;
|
227 |
+
$installer->run($sql);
|
228 |
+
|
229 |
+
$sql=<<<SQLTEXT
|
230 |
+
insert into qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/bogof.png', 'BOGOF',1,1);
|
231 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/bogor.png','BOGOR',1,1);
|
232 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/bundle.png','BUNDLE',1,1);
|
233 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/deal.png','DEAL',1,1);
|
234 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/freeproduct.png','FREEPRODUCT',1,1);
|
235 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/issuecoupon.png','ISSUECOUPON',1,1);
|
236 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/issuepoints.png','ISSUEPOINTS',1,1);
|
237 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/offers.png','MULTIPLE',1,1);
|
238 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/productsreduction.png','PRODUCTSREDUCTION',1,1);
|
239 |
+
SQLTEXT;
|
240 |
+
$installer->run($sql);
|
241 |
+
|
242 |
+
//demo
|
243 |
+
//Mage::getModel('core/url_rewrite')->setId(null);
|
244 |
+
//demo
|
245 |
+
$installer->endSetup();
|
246 |
+
|
247 |
+
?>
|
app/code/community/Holbi/Qixol/sql/qixol_setup/mysql4-upgrade-0.1.0-0.2.0.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$sql=<<<SQLTEXT
|
7 |
+
DELETE FROM qixol_banners;
|
8 |
+
SQLTEXT;
|
9 |
+
|
10 |
+
$installer->run($sql);
|
11 |
+
|
12 |
+
$sql=<<<SQLTEXT
|
13 |
+
ALTER TABLE `qixol_banners`
|
14 |
+
CHANGE `banner_link_name` `display_zone` varchar(255) not null default '',
|
15 |
+
DROP `is_default`,
|
16 |
+
DROP `sort_order`,
|
17 |
+
DROP `banner_group`,
|
18 |
+
DROP `banner_type`,
|
19 |
+
DROP `url`
|
20 |
+
SQLTEXT;
|
21 |
+
|
22 |
+
$installer->run($sql);
|
23 |
+
|
24 |
+
$sql=<<<SQLTEXT
|
25 |
+
drop table qixol_banner_has_images;
|
26 |
+
SQLTEXT;
|
27 |
+
|
28 |
+
$installer->run($sql);
|
29 |
+
|
30 |
+
$sql=<<<SQLTEXT
|
31 |
+
RENAME TABLE `magento`.`qixol_banner_images` TO `magento`.`qixol_banner_image` ;
|
32 |
+
SQLTEXT;
|
33 |
+
|
34 |
+
$installer->run($sql);
|
35 |
+
|
36 |
+
$sql=<<<SQLTEXT
|
37 |
+
ALTER TABLE qixol_banner_image
|
38 |
+
ADD `banner_id` INT(11) unsigned not null,
|
39 |
+
ADD `sort_order` INT,
|
40 |
+
ADD `url` varchar(255),
|
41 |
+
ADD `promotion_reference` varchar(255),
|
42 |
+
ADD `comment` varchar(255),
|
43 |
+
ADD CONSTRAINT `FK_qixol_banner_image_banner_id` FOREIGN KEY (`banner_id`) REFERENCES `qixol_banners` (`banner_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
44 |
+
SQLTEXT;
|
45 |
+
|
46 |
+
$installer->run($sql);
|
47 |
+
|
48 |
+
$sql=<<<SQLTEXT
|
49 |
+
drop table qixol_product_export_stat;
|
50 |
+
SQLTEXT;
|
51 |
+
|
52 |
+
$installer->run($sql);
|
53 |
+
|
54 |
+
$sql=<<<SQLTEXT
|
55 |
+
ALTER TABLE qixol_shipping_name_map
|
56 |
+
ADD `carrier_title` varchar(255) FIRST,
|
57 |
+
ADD `carrier_method` varchar(255) AFTER `carrier_title`,
|
58 |
+
CHANGE `shipping_name_map` `integration_code` varchar(255) not null default ''
|
59 |
+
SQLTEXT;
|
60 |
+
|
61 |
+
$installer->run($sql);
|
62 |
+
|
63 |
+
$sql=<<<SQLTEXT
|
64 |
+
ALTER TABLE `qixol_customers_groups_name_map`
|
65 |
+
CHANGE `customer_group_name_map` `integration_code` VARCHAR( 255 ) NOT NULL DEFAULT '';
|
66 |
+
SQLTEXT;
|
67 |
+
|
68 |
+
$installer->run($sql);
|
69 |
+
|
70 |
+
$sql=<<<SQLTEXT
|
71 |
+
DELETE FROM qixol_stickers;
|
72 |
+
SQLTEXT;
|
73 |
+
|
74 |
+
$installer->run($sql);
|
75 |
+
|
76 |
+
$sql=<<<SQLTEXT
|
77 |
+
ALTER TABLE qixol_stickers
|
78 |
+
DROP `use_default_sticker`,
|
79 |
+
DROP `use_default_banner_group`,
|
80 |
+
DROP `default_banner_group`,
|
81 |
+
DROP `unique_banner_group`,
|
82 |
+
DROP `banner_link_name`,
|
83 |
+
DROP `status`,
|
84 |
+
DROP `sort_order`,
|
85 |
+
DROP `created_time`,
|
86 |
+
DROP `update_time`,
|
87 |
+
ADD `promo_reference` VARCHAR( 255 ) NOT NULL DEFAULT '',
|
88 |
+
ADD `promo_type_name` VARCHAR( 255 ) NOT NULL DEFAULT '',
|
89 |
+
ADD `is_default_for_type` TINYINT NOT NULL DEFAULT '0',
|
90 |
+
ADD `is_system_default_for_type` TINYINT NOT NULL DEFAULT '0';
|
91 |
+
SQLTEXT;
|
92 |
+
|
93 |
+
$installer->run($sql);
|
94 |
+
|
95 |
+
$sql=<<<SQLTEXT
|
96 |
+
insert into qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/bogof.png', 'BOGOF',1,1);
|
97 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/bogor.png','BOGOR',1,1);
|
98 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/bundle.png','BUNDLE',1,1);
|
99 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/deal.png','DEAL',1,1);
|
100 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/freeproduct.png','FREEPRODUCT',1,1);
|
101 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/issuecoupon.png','ISSUECOUPON',1,1);
|
102 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/issuepoints.png','ISSUEPOINTS',1,1);
|
103 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/offers.png','MULTIPLE',1,1);
|
104 |
+
INSERT INTO qixol_stickers (`filename`, `promo_type_name`, `is_default_for_type`, `is_system_default_for_type`) VALUES ('custom/stickers/productsreduction.png','PRODUCTSREDUCTION',1,1);
|
105 |
+
SQLTEXT;
|
106 |
+
$installer->run($sql);
|
107 |
+
|
108 |
+
$sql=<<<SQLTEXT
|
109 |
+
ALTER TABLE `qixol_stores_name_map`
|
110 |
+
ADD `website` VARCHAR( 255 ) NOT NULL DEFAULT '' FIRST,
|
111 |
+
ADD `store_group` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `website`,
|
112 |
+
CHANGE `store_name_map` `integration_code` VARCHAR( 255 ) NOT NULL DEFAULT '';
|
113 |
+
SQLTEXT;
|
114 |
+
|
115 |
+
$installer->run($sql);
|
116 |
+
|
117 |
+
|
118 |
+
//demo
|
119 |
+
//Mage::getModel('core/url_rewrite')->setId(null);
|
120 |
+
//demo
|
121 |
+
$installer->endSetup();
|
122 |
+
|
123 |
+
?>
|
app/design/adminhtml/default/default/layout/qixol.xml
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<qixol_admin_adminhtml_qixolbackend_index>
|
4 |
-
<reference name="content">
|
5 |
-
<block type="qixol/adminhtml_qixolbackend" name="qixolbackend" template="qixol/qixolbackend.phtml"/>
|
6 |
-
</reference>
|
7 |
-
</qixol_admin_adminhtml_qixolbackend_index>
|
8 |
-
<qixol_admin_adminhtml_banner_edit>
|
9 |
-
<update handle="editor"/>
|
10 |
-
</qixol_admin_adminhtml_banner_edit>
|
11 |
-
<qixol_admin_adminhtml_banner_index>
|
12 |
-
<reference name="content">
|
13 |
-
<block type="qixol/adminhtml_banner" name="banner" />
|
14 |
-
</reference>
|
15 |
-
</qixol_admin_adminhtml_banner_index>
|
16 |
-
|
17 |
-
<qixol_admin_adminhtml_sticker_edit>
|
18 |
-
<!--reference name="head">
|
19 |
-
<action method="addJs"><script>lib/jquery/jquery-1.10.2.min.js</script></action>
|
20 |
-
</reference-->
|
21 |
-
<update handle="editor"/>
|
22 |
-
</qixol_admin_adminhtml_sticker_edit>
|
23 |
-
<qixol_admin_adminhtml_sticker_index>
|
24 |
-
<reference name="content">
|
25 |
-
<block type="qixol/adminhtml_sticker" name="sticker" />
|
26 |
-
</reference>
|
27 |
-
</qixol_admin_adminhtml_sticker_index>
|
28 |
-
|
29 |
-
<qixol_admin_adminhtml_bannerboxes_edit>
|
30 |
-
<update handle="editor"/>
|
31 |
-
</qixol_admin_adminhtml_bannerboxes_edit>
|
32 |
-
<qixol_admin_adminhtml_bannerboxes_index>
|
33 |
-
<reference name="content">
|
34 |
-
<block type="qixol/adminhtml_bannerboxes" name="bannerboxes" />
|
35 |
-
</reference>
|
36 |
-
</qixol_admin_adminhtml_bannerboxes_index>
|
37 |
-
|
38 |
-
<qixol_admin_adminhtml_shippingmap_edit>
|
39 |
-
<update handle="editor"/>
|
40 |
-
</qixol_admin_adminhtml_shippingmap_edit>
|
41 |
-
|
42 |
-
<qixol_admin_adminhtml_shippingmap_index>
|
43 |
-
<reference name="content">
|
44 |
-
<block type="qixol/adminhtml_shippingmap" name="shippingmap" />
|
45 |
-
</reference>
|
46 |
-
</qixol_admin_adminhtml_shippingmap_index>
|
47 |
-
|
48 |
-
|
49 |
-
<qixol_admin_adminhtml_customergrouspmap_edit>
|
50 |
-
<update handle="editor"/>
|
51 |
-
</qixol_admin_adminhtml_customergrouspmap_edit>
|
52 |
-
|
53 |
-
<qixol_admin_adminhtml_customergrouspmap_index>
|
54 |
-
<reference name="content">
|
55 |
-
<block type="qixol/adminhtml_customergrouspmap" name="customergrouspmap" />
|
56 |
-
</reference>
|
57 |
-
</qixol_admin_adminhtml_customergrouspmap_index>
|
58 |
-
|
59 |
-
<qixol_admin_adminhtml_storesmap_edit>
|
60 |
-
<update handle="editor"/>
|
61 |
-
</qixol_admin_adminhtml_storesmap_edit>
|
62 |
-
|
63 |
-
<qixol_admin_adminhtml_storesmap_index>
|
64 |
-
<reference name="content">
|
65 |
-
<block type="qixol/adminhtml_storesmap" name="storesmap" />
|
66 |
-
</reference>
|
67 |
-
</qixol_admin_adminhtml_storesmap_index>
|
68 |
-
|
69 |
-
<adminhtml_sales_order_view>
|
70 |
-
<reference name="left">
|
71 |
-
<block type="adminhtml/sales_order_view_items" name="qixolorderitemswrap" as="qixolorderitemswrap" template="qixol/order/advert.phtml"/>
|
72 |
-
</reference>
|
73 |
-
<reference name="order_totals">
|
74 |
-
<block type="qixol/adminhtml_sales_order_total" name="qixol.sales.order.total" />
|
75 |
-
</reference>
|
76 |
-
</adminhtml_sales_order_view>
|
77 |
-
|
78 |
-
<!--adminhtml_sales_order_invoice_new>
|
79 |
-
<reference name="invoice_totals">
|
80 |
-
<block type="qixol/adminhtml_sales_order_total" name="qixol.sales.order.total" />
|
81 |
-
</reference>
|
82 |
-
</adminhtml_sales_order_invoice_new>
|
83 |
-
|
84 |
-
<adminhtml_sales_order_invoice_updateqty>
|
85 |
-
<reference name="invoice_totals">
|
86 |
-
<block type="qixol/adminhtml_sales_order_total" name="qixol.sales.order.total" />
|
87 |
-
</reference>
|
88 |
-
</adminhtml_sales_order_invoice_updateqty-->
|
89 |
-
|
90 |
-
<adminhtml_sales_order_invoice_view>
|
91 |
-
<reference name="invoice_totals">
|
92 |
-
<block type="qixol/adminhtml_sales_order_total" name="qixol.sales.order.total" />
|
93 |
-
</reference>
|
94 |
-
</adminhtml_sales_order_invoice_view>
|
95 |
-
|
96 |
-
<adminhtml_sales_order_creditmemo_view>
|
97 |
-
<reference name="creditmemo_totals">
|
98 |
-
<block type="qixol/adminhtml_sales_order_total" name="qixol.sales.order.total" />
|
99 |
-
</reference>
|
100 |
-
</adminhtml_sales_order_creditmemo_view>
|
101 |
-
|
102 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/qixol/bannerboxes.phtml
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php echo $this->getTabsHtml() ?>
|
|
app/design/adminhtml/default/default/template/qixol/banners.phtml
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php echo $this->getTabsHtml() ?>
|
2 |
-
<script type="text/javascript">
|
3 |
-
//<![CDATA[
|
4 |
-
function load_banner_funcs(){
|
5 |
-
<?php if (($block = $this->getLayout()->getBlock('bannergroup.grid.banner')) && ($_gridJsObject = $block->getJsObjectName())): ?>
|
6 |
-
if(!$('in_bannergroup_banners')){
|
7 |
-
setTimeout('load_banner_funcs()',500);
|
8 |
-
return false;
|
9 |
-
}
|
10 |
-
var selectedBanners=$H(<?php echo $this->getBannersJson(); ?>);
|
11 |
-
$('in_bannergroup_banners').value = selectedBanners.toQueryString();
|
12 |
-
|
13 |
-
function registerSelectedBanner(grid, element, checked){
|
14 |
-
if(checked){
|
15 |
-
selectedBanners.set(element.value, element.value);
|
16 |
-
}
|
17 |
-
else{
|
18 |
-
selectedBanners.unset(element.value);
|
19 |
-
}
|
20 |
-
$('in_bannergroup_banners').value = selectedBanners.toQueryString();
|
21 |
-
grid.reloadParams = {'selected_banners[]':selectedBanners.keys()};
|
22 |
-
}
|
23 |
-
function selectedBannerRowClick(grid, event){
|
24 |
-
var trElement = Event.findElement(event, 'tr');
|
25 |
-
var isInput = Event.element(event).tagName == 'INPUT';
|
26 |
-
if(trElement){
|
27 |
-
var checkbox = Element.getElementsBySelector(trElement, 'input');
|
28 |
-
if(checkbox[0]){
|
29 |
-
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
30 |
-
<?php echo $_gridJsObject ?>.setCheckboxChecked(checkbox[0], checked);
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
var tabIndex = 1000;
|
36 |
-
function selectedBannerRowInit(grid, row){
|
37 |
-
var checkbox = $(row).getElementsByClassName('checkbox')[0];
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
<?php echo $_gridJsObject ?>.rowClickCallback = selectedBannerRowClick;
|
42 |
-
<?php echo $_gridJsObject ?>.initRowCallback = selectedBannerRowInit;
|
43 |
-
<?php echo $_gridJsObject ?>.checkboxCheckCallback = registerSelectedBanner;
|
44 |
-
<?php echo $_gridJsObject ?>.rows.each(function(row){selectedBannerRowInit(<?php echo $_gridJsObject ?>, row)});
|
45 |
-
|
46 |
-
<?php endif; ?>
|
47 |
-
}
|
48 |
-
load_banner_funcs();
|
49 |
-
//]]>
|
50 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/qixol/customergrouspmap.phtml
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php echo $this->getTabsHtml() ?>
|
|
app/design/adminhtml/default/default/template/qixol/order/advert.phtml
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$order = $this->getOrder();
|
3 |
-
$promotions_raw=$order->getPromotionDataApplied();
|
4 |
-
$inline_item_advert='';
|
5 |
-
if(strlen($promotions_raw)>3){
|
6 |
-
$promotions_data_array=unserialize($promotions_raw);
|
7 |
-
if (is_array($promotions_data_array['items'])&&count($promotions_data_array['items'])>0){
|
8 |
-
|
9 |
-
foreach ($order->getAllItems() as $item) {
|
10 |
-
if (isset($promotions_data_array['items'][$item->getQuoteItemId()]['promotions'])){
|
11 |
-
foreach ($promotions_data_array['items'][$item->getQuoteItemId()]['promotions'] as $promotion_data){
|
12 |
-
if ($promotion_data['description']!=''){
|
13 |
-
$inline_item_advert.="$('<div class=\"order_inline_item_advert\" style=\"font-weight:bold;color:#6666FF\">".$promotion_data['description']."</div>').appendTo($('#order_item_".$item->getId()."'));";
|
14 |
-
}
|
15 |
-
}
|
16 |
-
}
|
17 |
-
;
|
18 |
-
}
|
19 |
-
|
20 |
-
if (isset($promotions_data_array['promotion_summary'])){
|
21 |
-
foreach ($promotions_data_array['promotion_summary'] as $inline_cart_promotion)
|
22 |
-
if($inline_cart_promotion['data']['basketlevel']>0){
|
23 |
-
switch ($inline_cart_promotion['data']['type']){
|
24 |
-
case 'ISSUEPOINTS';
|
25 |
-
$inline_item_advert.="$('<div class=\"order_total_advert\" style=\"font-weight:bold;color:#6666FF\">".$inline_cart_promotion['data']['issuedpoints']." pt."."</div>').appendTo($('#order-totals'));";
|
26 |
-
break;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
|
32 |
-
?><script type="text/javascript" src="http://qixol.holbidev.co.uk/js/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
33 |
-
echo $inline_item_advert;
|
34 |
-
?>});</script><?php
|
35 |
-
|
36 |
-
}
|
37 |
-
}
|
38 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/qixol/qixolbackend.phtml
DELETED
@@ -1,196 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$run_pic=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/_run.gif";
|
4 |
-
$post_url=$this->getUrl('qixol_admin/ajax');
|
5 |
-
$post_url_upd=$this->getUrl('qixol_admin/ajax/UpdateStatus');
|
6 |
-
|
7 |
-
?><div id="qixolexport_status_template" name="qixolexpor_status_template" style="display:none">
|
8 |
-
<ul>
|
9 |
-
<li>
|
10 |
-
Start export
|
11 |
-
 
|
12 |
-
<span id='qixolexport_process'>
|
13 |
-
<img src='<?php echo $run_pic?>'
|
14 |
-
alt='product export run' />
|
15 |
-
</span>
|
16 |
-
</li>
|
17 |
-
<!--li>
|
18 |
-
Export finished
|
19 |
-
 
|
20 |
-
<span id='qixolexport_export_done'>
|
21 |
-
<img src='<?php echo $run_pic?>'
|
22 |
-
alt='Export finished' />
|
23 |
-
</span>
|
24 |
-
</li-->
|
25 |
-
</ul>
|
26 |
-
</div>
|
27 |
-
<?php
|
28 |
-
$start_import_button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
29 |
-
->setType('button')
|
30 |
-
->setClass('scalable')
|
31 |
-
->setLabel('Export now')
|
32 |
-
->setOnClick("start_product_export()")
|
33 |
-
->toHtml();
|
34 |
-
$safe_mode_set = ini_get('safe_mode');
|
35 |
-
if($safe_mode_set){
|
36 |
-
$html .="<p class='sinch-error'><b>You can't start export (safe_mode is 'On'. set safe_mode = Off in php.ini )<b></p>";
|
37 |
-
} else {
|
38 |
-
$html .= $start_import_button;
|
39 |
-
}
|
40 |
-
|
41 |
-
$export=Mage::getModel('qixol/sinch');
|
42 |
-
$last_export=$export->getDataOfLatestExportProduct();
|
43 |
-
$last_exp_status=$last_import['status_export'];
|
44 |
-
if($last_exp_status=='error'){
|
45 |
-
$html.='<div id="export_current_status_message" name="export_current_status_message" style="display:true"><br><br><hr/><p class="sinch-error">The export has failed.<br> Error reporting : "'.$last_import['status_export_message'].'"</p></div>';
|
46 |
-
}elseif($last_imp_status=='success'){
|
47 |
-
$html.='<div id="export_current_status_message" name="export_current_status_message" style="display:true"><br><br><hr/><p class="sinch-success">'.$last_import['number_of_products'].' products imported succesfully!</p></div>';
|
48 |
-
}elseif($last_imp_status=='process'){
|
49 |
-
$html.='<div id="export_current_status_message" name="export_current_status_message" style="display:true"><br><br><hr/><p>Export is running now</p></div>';
|
50 |
-
}else{
|
51 |
-
$html.='<div id="export_current_status_message" name="export_current_status_message" style="display:true"></div>';
|
52 |
-
}
|
53 |
-
|
54 |
-
echo $html;
|
55 |
-
|
56 |
-
?>
|
57 |
-
<script>
|
58 |
-
function start_product_export(){
|
59 |
-
set_run_icon();
|
60 |
-
status_data=document.getElementById('qixolexport_status_template');
|
61 |
-
curr_status_data=document.getElementById('export_current_status_message');
|
62 |
-
curr_status_data.style.display='none';
|
63 |
-
status_data.style.display='';
|
64 |
-
// status_data.innerHTML='';
|
65 |
-
sinch = new Sinch('<?php echo $post_url?>','<?php echo $post_url_upd?>');
|
66 |
-
sinch.startProductExport();
|
67 |
-
|
68 |
-
//
|
69 |
-
}
|
70 |
-
function set_run_icon(){
|
71 |
-
run_pic='<img src=\"<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/_run.gif"; ?>"/>';
|
72 |
-
document.getElementById('qixolexport_process').innerHTML=run_pic;
|
73 |
-
//document.getElementById('qixolexport_export_done').innerHTML=run_pic;
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
var Sinch = Class.create();
|
80 |
-
Sinch.prototype = {
|
81 |
-
|
82 |
-
initialize: function(postUrl, postUrlUpd) {
|
83 |
-
this.postUrl = postUrl;
|
84 |
-
this.postUrlUpd = postUrlUpd;
|
85 |
-
this.failureUrl = document.URL;
|
86 |
-
// unique user session ID
|
87 |
-
this.SID = null;
|
88 |
-
// object with event message data
|
89 |
-
this.objectMsg = null;
|
90 |
-
this.prevMsg = '';
|
91 |
-
// interval object
|
92 |
-
this.updateTimer = null;
|
93 |
-
// default shipping code. Display on errors
|
94 |
-
|
95 |
-
elem = 'checkoutSteps';
|
96 |
-
clickableEntity = '.head';
|
97 |
-
|
98 |
-
// overwrite Accordion class method
|
99 |
-
var headers = $$('#' + elem + ' .section ' + clickableEntity);
|
100 |
-
headers.each(function(header) {
|
101 |
-
Event.observe(header,'click',this.sectionClicked.bindAsEventListener(this));
|
102 |
-
}.bind(this));
|
103 |
-
},
|
104 |
-
startProductExport: function () {
|
105 |
-
_this = this;
|
106 |
-
new Ajax.Request(this.postUrl,
|
107 |
-
{
|
108 |
-
method:'post',
|
109 |
-
parameters: '',
|
110 |
-
requestTimeout: 10,
|
111 |
-
/*
|
112 |
-
onLoading:function(){
|
113 |
-
alert('onLoading');
|
114 |
-
},
|
115 |
-
onLoaded:function(){
|
116 |
-
alert('onLoaded');
|
117 |
-
},
|
118 |
-
*/
|
119 |
-
onSuccess: function(transport) {
|
120 |
-
var response = transport.responseText || null;
|
121 |
-
_this.SID = response;
|
122 |
-
if (_this.SID) {
|
123 |
-
_this.updateTimer = setInterval(function(){_this.updateEvent();},7000);
|
124 |
-
$('session_id').value = _this.SID;
|
125 |
-
} else {
|
126 |
-
alert('Can not get your session ID. Please reload the page!');
|
127 |
-
}
|
128 |
-
},
|
129 |
-
onTimeout: function() { alert('Can not get your session ID. Timeout!'); },
|
130 |
-
onFailure: function() { alert('Something went wrong...') }
|
131 |
-
});
|
132 |
-
|
133 |
-
},
|
134 |
-
|
135 |
-
updateEvent: function () {
|
136 |
-
_this = this;
|
137 |
-
new Ajax.Request(this.postUrlUpd,
|
138 |
-
{
|
139 |
-
method: 'post',
|
140 |
-
parameters: {session_id: this.SID},
|
141 |
-
onSuccess: function(transport) {
|
142 |
-
_this.objectMsg = transport.responseText.evalJSON();
|
143 |
-
_this.prevMsg = _this.objectMsg.message;
|
144 |
-
if(_this.prevMsg!=''){
|
145 |
-
_this.updateStatusHtml();
|
146 |
-
}
|
147 |
-
|
148 |
-
if (_this.objectMsg.error == 1) {
|
149 |
-
// Do something on error
|
150 |
-
_this.clearUpdateInterval();
|
151 |
-
}
|
152 |
-
|
153 |
-
if (_this.objectMsg.finished == 1) {
|
154 |
-
_this.objectMsg.message='Import finished';
|
155 |
-
_this.updateStatusHtml();
|
156 |
-
_this.clearUpdateInterval();
|
157 |
-
|
158 |
-
}
|
159 |
-
|
160 |
-
},
|
161 |
-
onFailure: this.ajaxFailure.bind(),
|
162 |
-
});
|
163 |
-
},
|
164 |
-
|
165 |
-
updateStatusHtml: function(){
|
166 |
-
message=this.objectMsg.message.toLowerCase();
|
167 |
-
extendedmessage=this.objectMsg.extmessage.toLowerCase();
|
168 |
-
mess_id='qixolexport_'+message.replace(/\s+/g, '_');
|
169 |
-
if(!document.getElementById(mess_id)){
|
170 |
-
// alert(mess_id+' - not exist');
|
171 |
-
}
|
172 |
-
else{
|
173 |
-
//alert (mess_id+' - exist');
|
174 |
-
$(mess_id).innerHTML='<img src=\"".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/_yes.gif"."\"/>'
|
175 |
-
if (mess_id=='qixolexport_export_done'){//if processed quicker
|
176 |
-
$('qixolexport_process').innerHTML='<img src=\"".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/_yes.gif"."\"/>'
|
177 |
-
}
|
178 |
-
}
|
179 |
-
if (extendedmessage!='')
|
180 |
-
$('qixolexport_status_template').innerHTML=extendedmessage;
|
181 |
-
//$('qixolexport_status_template').innerHTML=htm+'<br>'+this.objectMsg.message;
|
182 |
-
},
|
183 |
-
|
184 |
-
ajaxFailure: function(){
|
185 |
-
this.clearUpdateInterval();
|
186 |
-
location.href = this.failureUrl;
|
187 |
-
},
|
188 |
-
|
189 |
-
clearUpdateInterval: function () {
|
190 |
-
clearInterval(this.updateTimer);
|
191 |
-
},
|
192 |
-
|
193 |
-
|
194 |
-
}
|
195 |
-
</script>
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/qixol/shippingmap.phtml
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php echo $this->getTabsHtml() ?>
|
|
app/design/adminhtml/default/default/template/qixol/stickers.phtml
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php echo $this->getTabsHtml() ?>
|
2 |
-
<script type="text/javascript">
|
3 |
-
//<![CDATA[
|
4 |
-
function load_banner_funcs(){
|
5 |
-
<?php if (($block = $this->getLayout()->getBlock('bannergroup.grid.banner')) && ($_gridJsObject = $block->getJsObjectName())): ?>
|
6 |
-
if(!$('in_bannergroup_banners')){
|
7 |
-
setTimeout('load_banner_funcs()',500);
|
8 |
-
return false;
|
9 |
-
}
|
10 |
-
var selectedBanners=$H(<?php echo $this->getBannersJson(); ?>);
|
11 |
-
$('in_bannergroup_banners').value = selectedBanners.toQueryString();
|
12 |
-
|
13 |
-
function registerSelectedBanner(grid, element, checked){
|
14 |
-
if(checked){
|
15 |
-
selectedBanners.set(element.value, element.value);
|
16 |
-
}
|
17 |
-
else{
|
18 |
-
selectedBanners.unset(element.value);
|
19 |
-
}
|
20 |
-
$('in_bannergroup_banners').value = selectedBanners.toQueryString();
|
21 |
-
grid.reloadParams = {'selected_banners[]':selectedBanners.keys()};
|
22 |
-
}
|
23 |
-
function selectedBannerRowClick(grid, event){
|
24 |
-
var trElement = Event.findElement(event, 'tr');
|
25 |
-
var isInput = Event.element(event).tagName == 'INPUT';
|
26 |
-
if(trElement){
|
27 |
-
var checkbox = Element.getElementsBySelector(trElement, 'input');
|
28 |
-
if(checkbox[0]){
|
29 |
-
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
30 |
-
<?php echo $_gridJsObject ?>.setCheckboxChecked(checkbox[0], checked);
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
var tabIndex = 1000;
|
36 |
-
function selectedBannerRowInit(grid, row){
|
37 |
-
var checkbox = $(row).getElementsByClassName('checkbox')[0];
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
<?php echo $_gridJsObject ?>.rowClickCallback = selectedBannerRowClick;
|
42 |
-
<?php echo $_gridJsObject ?>.initRowCallback = selectedBannerRowInit;
|
43 |
-
<?php echo $_gridJsObject ?>.checkboxCheckCallback = registerSelectedBanner;
|
44 |
-
<?php echo $_gridJsObject ?>.rows.each(function(row){selectedBannerRowInit(<?php echo $_gridJsObject ?>, row)});
|
45 |
-
|
46 |
-
<?php endif; ?>
|
47 |
-
}
|
48 |
-
load_banner_funcs();
|
49 |
-
//]]>
|
50 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/qixol/storesmap.phtml
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php echo $this->getTabsHtml() ?>
|
|
app/design/adminhtml/default/default/template/qixol/system/config/attributes.phtml
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<input type="hidden" name="<?php echo $this->getNamePrefix() ?>" value="" /><!-- this is send if nothing is checked -->
|
2 |
-
<ul class="checkboxes">
|
3 |
-
<?php foreach ($this->getValues() as $name => $label): ?>
|
4 |
-
<li>
|
5 |
-
<input type="checkbox" value="<?php echo $name?>" name="<?php echo $this->getNamePrefix() ?>[]" id="<?php echo $this->getHtmlId() . '_' . $name ?>"<?php echo ($this->getIsChecked($name) ? ' checked="checked"' : '') ?>/><label for="<?php echo $this->getHtmlId() . '_' . $name ?>">
|
6 |
-
<?php echo $label ?>
|
7 |
-
</label>
|
8 |
-
</li>
|
9 |
-
<?php endforeach;?>
|
10 |
-
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/layout/qixol.xml
DELETED
@@ -1,154 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<default>
|
4 |
-
<reference name="head">
|
5 |
-
<action method="addItem"><type>skin_css</type><name>css/qixol.css</name></action>
|
6 |
-
</reference>
|
7 |
-
<reference name="minicart_content">
|
8 |
-
<action method="setTemplate"><template>qixol/minicart/mincart.phtml</template></action>
|
9 |
-
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>qixol/minicart/default.phtml</template></action>
|
10 |
-
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>qixol/minicart/default.phtml</template></action>
|
11 |
-
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>qixol/minicart/default.phtml</template></action>
|
12 |
-
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>qixol/minicart/default.phtml</template></action>
|
13 |
-
<block type="checkout/onepage_link" name="qixolmincartwrap" as="qixolmincartwrap" template="qixol/minicart/advert.phtml"/>
|
14 |
-
</reference>
|
15 |
-
</default>
|
16 |
-
|
17 |
-
<catalog_product_view>
|
18 |
-
<reference name="content">
|
19 |
-
<block type="catalog/product_view" after='-' name="qixol-promo-wrap-data" template="qixol/product/qixol_product_info.phtml"/>
|
20 |
-
</reference>
|
21 |
-
<reference name="product.info.addtocart">
|
22 |
-
<block type="catalog/product_view" name="qixol-promo-details" template="qixol/product/qixol_info_details.phtml"/>
|
23 |
-
</reference>
|
24 |
-
</catalog_product_view>
|
25 |
-
<catalog_category_default>
|
26 |
-
<reference name="content">
|
27 |
-
<block type="catalog/product_list" name="qixol-wrap-text" after="category.products" template="qixol/product/qixol_adv.phtml"/>
|
28 |
-
</reference>
|
29 |
-
</catalog_category_default>
|
30 |
-
|
31 |
-
<checkout_cart_index>
|
32 |
-
<reference name="checkout.cart">
|
33 |
-
<action method="setTemplate"><template>qixol/cart/cart.phtml</template></action>
|
34 |
-
<action method="addItemRender">
|
35 |
-
<type>simple</type><block>checkout/cart_item_renderer</block><template>qixol/cart/item/default.phtml</template>
|
36 |
-
</action>
|
37 |
-
<action method="addItemRender">
|
38 |
-
<type>grouped</type><block>checkout/cart_item_renderer</block><template>qixol/cart/item/default.phtml</template>
|
39 |
-
</action>
|
40 |
-
<action method="addItemRender">
|
41 |
-
<type>configurable</type><block>checkout/cart_item_renderer</block><template>qixol/cart/item/default.phtml</template>
|
42 |
-
</action>
|
43 |
-
</reference>
|
44 |
-
<reference name="checkout.cart.extra">
|
45 |
-
<block type="core/template" name="bonuspointsbox" as="bonuspointsbox" template="qixol/cart/bonuspointbox.phtml" />
|
46 |
-
</reference>
|
47 |
-
<reference name="content">
|
48 |
-
<block type="checkout/onepage_link" name="qixolcartwrap" as="qixolcartwrap" template="qixol/cart/advert.phtml"/>
|
49 |
-
</reference>
|
50 |
-
</checkout_cart_index>
|
51 |
-
|
52 |
-
|
53 |
-
<checkout_onepage_review>
|
54 |
-
<reference name="root">
|
55 |
-
<action method="setTemplate"><template>qixol/onepage/review.phtml</template></action>
|
56 |
-
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>qixol/onepage/item.phtml</template></action>
|
57 |
-
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>qixol/onepage/item.phtml</template></action>
|
58 |
-
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>qixol/onepage/item.phtml</template></action>
|
59 |
-
</reference>
|
60 |
-
<reference name="checkout.onepage.review.info.items.after">
|
61 |
-
<block type="checkout/onepage_link" name="qixolreviewwrap" as="qixolreviewwrap" template="qixol/onepage/advert.phtml"/>
|
62 |
-
</reference>
|
63 |
-
</checkout_onepage_review>
|
64 |
-
|
65 |
-
<customer_account>
|
66 |
-
<!-- Qixol issued coupons -->
|
67 |
-
<reference name="customer_account_navigation">
|
68 |
-
<action method="addLink" translate="label" module="qixol"><name>issuedcoupon</name><path>qixol/issuedcoupon</path><label>Issued Coupons</label></action>
|
69 |
-
</reference>
|
70 |
-
</customer_account>
|
71 |
-
|
72 |
-
<customer_account_index>
|
73 |
-
<!-- Qixol issued points -->
|
74 |
-
<reference name="customer_account_dashboard_top">
|
75 |
-
<action method="setTemplate"><template>qixol/issuedpoints/box.phtml</template></action>
|
76 |
-
<block type="core/template" name="customer_account_points" as="points" template="qixol/issuedpoints/dashboard_points.phtml"/>
|
77 |
-
</reference>
|
78 |
-
</customer_account_index>
|
79 |
-
|
80 |
-
<qixol_issuedcoupon_index translate="label">
|
81 |
-
<label>Customer Qixol Issued Coupons</label>
|
82 |
-
<update handle="customer_account"/>
|
83 |
-
<reference name="my.account.wrapper">
|
84 |
-
<block type="qixol/issuedcoupon" name="qixol-issuedcoupon" template="qixol/issuedcoupon/list.phtml"/>
|
85 |
-
</reference>
|
86 |
-
</qixol_issuedcoupon_index>
|
87 |
-
|
88 |
-
<sales_order_view>
|
89 |
-
<reference name="order_items">
|
90 |
-
<action method="setTemplate"><template>qixol/myaccount/order/items/items.phtml</template></action>
|
91 |
-
<action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>qixol/myaccount/order/items/default.phtml</template></action>
|
92 |
-
<action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>qixol/myaccount/order/items/default.phtml</template></action>
|
93 |
-
</reference>
|
94 |
-
<reference name="order_totals">
|
95 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
96 |
-
</reference>
|
97 |
-
</sales_order_view>
|
98 |
-
|
99 |
-
<sales_order_print>
|
100 |
-
<reference name="sales.order.print">
|
101 |
-
<action method="setTemplate"><template>qixol/myaccount/order/print/print.phtml</template></action>
|
102 |
-
<action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>qixol/myaccount/order/print/default.phtml</template></action>
|
103 |
-
<action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>qixol/myaccount/order/print/default.phtml</template></action>
|
104 |
-
</reference>
|
105 |
-
<reference name="order_totals">
|
106 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
107 |
-
</reference>
|
108 |
-
</sales_order_print>
|
109 |
-
|
110 |
-
<sales_email_order_items>
|
111 |
-
<reference name="items">
|
112 |
-
<action method="setTemplate"><template>qixol/myaccount/order/email/items.phtml</template></action>
|
113 |
-
<action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>qixol/myaccount/order/email/default.phtml</template></action>
|
114 |
-
<action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>qixol/myaccount/order/email/default.phtml</template></action>
|
115 |
-
</reference>
|
116 |
-
<reference name="order_totals">
|
117 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
118 |
-
</reference>
|
119 |
-
</sales_email_order_items>
|
120 |
-
|
121 |
-
<sales_email_order_invoice_items>
|
122 |
-
<reference name="invoice_totals">
|
123 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
124 |
-
</reference>
|
125 |
-
</sales_email_order_invoice_items>
|
126 |
-
|
127 |
-
<sales_order_invoice>
|
128 |
-
<reference name="invoice_totals">
|
129 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
130 |
-
</reference>
|
131 |
-
</sales_order_invoice>
|
132 |
-
|
133 |
-
<sales_order_printinvoice>
|
134 |
-
<reference name="invoice_totals">
|
135 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
136 |
-
</reference>
|
137 |
-
</sales_order_printinvoice>
|
138 |
-
<sales_order_creditmemo>
|
139 |
-
<reference name="creditmemo_totals">
|
140 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
141 |
-
</reference>
|
142 |
-
</sales_order_creditmemo>
|
143 |
-
<sales_order_printcreditmemo>
|
144 |
-
<reference name="creditmemo_totals">
|
145 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
146 |
-
</reference>
|
147 |
-
</sales_order_printcreditmemo>
|
148 |
-
<sales_email_order_creditmemo_items>
|
149 |
-
<reference name="creditmemo_totals">
|
150 |
-
<block type="qixol/sales_order_total" name="qixol.sales.order.total" />
|
151 |
-
</reference>
|
152 |
-
</sales_email_order_creditmemo_items>
|
153 |
-
</layout>
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/cart/advert.phtml
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
3 |
-
$place_box_in_design_after_pattern='.cart';
|
4 |
-
|
5 |
-
|
6 |
-
$cart_advertisment_=Mage::getModel('qixol/advert');
|
7 |
-
$text_to_show_cart_adv='';
|
8 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/showcartpromobox')>0)
|
9 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();
|
10 |
-
|
11 |
-
$inline_cart_advert='';
|
12 |
-
$total_discount_amount=0;
|
13 |
-
$delivery_discount_amount=0;
|
14 |
-
//for cart items
|
15 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
16 |
-
foreach ($cart->getAllItems() as $item) {
|
17 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
18 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')>0 && Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay' &&
|
19 |
-
isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
20 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
21 |
-
//inline level promotion
|
22 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytext'){
|
23 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
24 |
-
} elseif((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname') {
|
25 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['name'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
26 |
-
|
27 |
-
} elseif((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytype') {
|
28 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
29 |
-
|
30 |
-
}
|
31 |
-
|
32 |
-
//basket level promotion
|
33 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
34 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
35 |
-
}
|
36 |
-
|
37 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
38 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')>0 &&$_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
39 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_cart_item_qty_".$item->getId()."'));";
|
40 |
-
|
41 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')>0 &&$_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
42 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_cart_item_price_".$item->getId()."'));";
|
43 |
-
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
48 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
49 |
-
if ($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['new']==0&&((int)Mage::getStoreConfig('qixol/advanced/separateitem')>0||$cart_item_process['data']['generated']==false)){
|
50 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
51 |
-
}/*elseif($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['new']==0&&((int)Mage::getStoreConfig('qixol/advanced/separateitem')==0&&$cart_item_process['data']['generated']==true)){
|
52 |
-
$total_discount_amount-=$cart_item_process['data']['totaldiscount'];
|
53 |
-
}*/
|
54 |
-
/*elseif($cart_item_process['data']['isdelivery']){
|
55 |
-
foreach ($cart_item_process['promotions'] as $delivery_promotion){
|
56 |
-
if ($delivery_promotion['discountamount']>0){
|
57 |
-
$delivery_discount_amount+=$delivery_promotion['discountamount'];
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}*/
|
61 |
-
}
|
62 |
-
if (isset($_SESSION['qixol_quoted_items']['cart_data']['deliverytotaldiscount'])){
|
63 |
-
$delivery_discount_amount=$_SESSION['qixol_quoted_items']['cart_data']['deliverytotaldiscount'];
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
68 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $cart_total_process){
|
69 |
-
if ($cart_total_process['data']['discountamount']>0&&$cart_total_process['data']['type']=='BASKETREDUCTION'){
|
70 |
-
$total_discount_amount+=$cart_total_process['data']['discountamount'];
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''||$total_discount_amount>0){
|
75 |
-
?><script type="text/javascript" src="<?php echo Mage::getBaseUrl('js'); ?>/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
76 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
77 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';
|
78 |
-
if ($inline_cart_advert!='')
|
79 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
80 |
-
if ($total_discount_amount>0||$delivery_discount_amount>0){
|
81 |
-
if ($delivery_discount_amount>0){
|
82 |
-
?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" ><?php echo Mage::helper('qixol')->__("Delivery Discount");?></td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($delivery_discount_amount); ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php
|
83 |
-
}
|
84 |
-
if ($total_discount_amount>0){
|
85 |
-
?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" ><?php echo Mage::helper('qixol')->__("Products Discount");?></td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount); ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php
|
86 |
-
}
|
87 |
-
?>$('#shopping-cart-totals-table tfoot .price').addClass('qixol_price_cross');$('<span class="qixol_grand_total_price"><?php echo $this->helper('checkout')->formatPrice($cart->getGrandTotal()-$total_discount_amount-$delivery_discount_amount); ?></span>').appendTo($('#shopping-cart-totals-table tfoot .price').parent());<?php
|
88 |
-
}
|
89 |
-
?>});</script><?php
|
90 |
-
}
|
91 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/cart/bonuspointbox.phtml
DELETED
@@ -1,75 +0,0 @@
|
|
1 |
-
<style>
|
2 |
-
#bonuspoints .input-text{
|
3 |
-
float:left;
|
4 |
-
border-radius: 0;
|
5 |
-
height: 30px;
|
6 |
-
margin: 4px 10px 0 0;
|
7 |
-
width: 100px;
|
8 |
-
}
|
9 |
-
|
10 |
-
#bonuspoints .button-wrapper{
|
11 |
-
float: left;
|
12 |
-
}
|
13 |
-
|
14 |
-
#bonuspoints label{
|
15 |
-
float:left;
|
16 |
-
font-family: "Raleway", "Helvetica Neue", Verdana, Arial, sans-serif;
|
17 |
-
font-size: 12px;
|
18 |
-
font-weight: 400;
|
19 |
-
text-align: left;
|
20 |
-
text-transform: uppercase;
|
21 |
-
min-width: 90px;
|
22 |
-
display: inline-block;
|
23 |
-
margin-right: 10px;
|
24 |
-
line-height:32px;
|
25 |
-
}
|
26 |
-
.discount h2{
|
27 |
-
font-weight:bold;
|
28 |
-
font-size:12px;
|
29 |
-
}
|
30 |
-
</style>
|
31 |
-
<?php
|
32 |
-
$customerId = Mage::getModel('customer/session')->getCustomerId();
|
33 |
-
$customerPoints = Mage::getModel('qixol/Bonuspoints')->load($customerId);
|
34 |
-
?>
|
35 |
-
<div class="discount">
|
36 |
-
<h2>Reward Points</h2>
|
37 |
-
<?php $r_disc = Mage::getSingleton('customer/session')->getPointsAmount(); ?>
|
38 |
-
<form action="<?php echo Mage::getUrl('qixol/cart/applypoints') ?>" id="bonuspoints" method="post">
|
39 |
-
|
40 |
-
<div class="discount-form">
|
41 |
-
<label for="coupon_code"><?php echo $this->__('Points') ?></label>
|
42 |
-
<input type="hidden" name="removepoints" id="remove-points" value="0" />
|
43 |
-
<div class="field-wrapper">
|
44 |
-
<input class="input-text" type="text" id="reward_points" name="reward_points" value="<?php echo $r_disc; ?>" />
|
45 |
-
<div class="button-wrapper">
|
46 |
-
<button type="button" title="<?php echo $this->__('Apply') ?>" class="button2" onclick="rewardForm.submit(false)" value="<?php echo $this->__('Apply') ?>"><span><span><?php echo $this->__('Apply') ?></span></span></button>
|
47 |
-
|
48 |
-
<?php if(strlen($r_disc > 0)): ?>
|
49 |
-
<button type="button" title="<?php echo $this->__('Cancel') ?>" class="button2 cancel-coupon" onclick="rewardForm.submit(true)" value="<?php echo $this->__('Cancel') ?>"><span><span><?php echo $this->__('Cancel') ?></span></span>
|
50 |
-
</button>
|
51 |
-
<?php endif;?>
|
52 |
-
|
53 |
-
</div>
|
54 |
-
</div><br>
|
55 |
-
<div style="padding-top:20px;"><?php echo $this->__('Balance Available') ?> : <?= sprintf('%d',$customerPoints->getCurrentPoints()); ?> </div>
|
56 |
-
</div>
|
57 |
-
</form>
|
58 |
-
|
59 |
-
</div>
|
60 |
-
|
61 |
-
<script type="text/javascript">
|
62 |
-
//<![CDATA[
|
63 |
-
var rewardForm = new VarienForm('bonuspoints');
|
64 |
-
rewardForm.submit = function (isRemove) {
|
65 |
-
if (isRemove) {
|
66 |
-
$('reward_points').removeClassName('required-entry');
|
67 |
-
$('remove-points').value = "1";
|
68 |
-
} else {
|
69 |
-
$('reward_points').addClassName('required-entry');
|
70 |
-
$('remove-points').value = "0";
|
71 |
-
}
|
72 |
-
return VarienForm.prototype.submit.bind(rewardForm)();
|
73 |
-
}
|
74 |
-
//]]>
|
75 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/cart/cart.phtml
DELETED
@@ -1,246 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
/**
|
29 |
-
* Shopping cart template
|
30 |
-
*
|
31 |
-
* @var $this Mage_Checkout_Block_Cart
|
32 |
-
*/
|
33 |
-
?>
|
34 |
-
<?php $_priceDisplay = ($this->helper('tax')->displayCartBothPrices()) ? 'display-both-prices' : 'display-single-price'; ?>
|
35 |
-
<div class="cart <?php echo $_priceDisplay; ?>">
|
36 |
-
<div class="page-title title-buttons">
|
37 |
-
<h1><?php echo $this->__('Shopping Cart') ?></h1>
|
38 |
-
<?php if(!$this->hasError()): ?>
|
39 |
-
<ul class="checkout-types top">
|
40 |
-
<?php foreach ($this->getMethods('top_methods') as $method): ?>
|
41 |
-
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
42 |
-
<li><?php echo $methodHtml; ?></li>
|
43 |
-
<?php endif; ?>
|
44 |
-
<?php endforeach; ?>
|
45 |
-
</ul>
|
46 |
-
<?php endif; ?>
|
47 |
-
</div>
|
48 |
-
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
49 |
-
<?php echo $this->getChildHtml('form_before') ?>
|
50 |
-
<form action="<?php echo $this->getFormActionUrl() ?>" method="post">
|
51 |
-
<?php echo $this->getBlockHtml('formkey'); ?>
|
52 |
-
<table id="shopping-cart-table" class="cart-table data-table">
|
53 |
-
<col width="1" />
|
54 |
-
<col width="1" />
|
55 |
-
<col width="1" />
|
56 |
-
<col width="1" />
|
57 |
-
<col width="1" />
|
58 |
-
<col width="1" />
|
59 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
60 |
-
<col width="1" />
|
61 |
-
<col width="1" />
|
62 |
-
<?php endif; ?>
|
63 |
-
|
64 |
-
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
65 |
-
<thead>
|
66 |
-
<tr>
|
67 |
-
<th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product') ?></span></th>
|
68 |
-
|
69 |
-
<th rowspan="<?php echo $mergedCells; ?>"> </th>
|
70 |
-
|
71 |
-
<th class="a-center cart-price-head" colspan="<?php echo $mergedCells; ?>">
|
72 |
-
<!-- <div class="cart-price-placeholder">-->
|
73 |
-
<span class="nobr"><?php echo $this->__('Price') ?></span>
|
74 |
-
<!-- </div>-->
|
75 |
-
</th>
|
76 |
-
|
77 |
-
<th rowspan="<?php echo $mergedCells; ?>" class="a-center">
|
78 |
-
<?php echo $this->__('Qty') ?>
|
79 |
-
|
80 |
-
<?php /*if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
81 |
-
<span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span>
|
82 |
-
<?php endif*/ ?>
|
83 |
-
|
84 |
-
</th>
|
85 |
-
|
86 |
-
<th class="a-center cart-total-head" colspan="<?php echo $mergedCells; ?>">
|
87 |
-
<!-- <div class="cart-total-placeholder">-->
|
88 |
-
<?php echo $this->__('Subtotal') ?>
|
89 |
-
<!-- </div>-->
|
90 |
-
</th>
|
91 |
-
|
92 |
-
<th class="a-center" rowspan="<?php echo $mergedCells; ?>"> </th>
|
93 |
-
|
94 |
-
</tr>
|
95 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
96 |
-
<tr>
|
97 |
-
<th class="a-center cart-price-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
98 |
-
<th class="a-center cart-price-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
99 |
-
<th class="a-center cart-total-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
100 |
-
<th class="a-center cart-total-head"><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
101 |
-
</tr>
|
102 |
-
<?php endif; ?>
|
103 |
-
</thead>
|
104 |
-
<tfoot>
|
105 |
-
<tr>
|
106 |
-
<td colspan="50" class="a-right cart-footer-actions">
|
107 |
-
|
108 |
-
<!-- Make this button the first responder rather than empty cart -->
|
109 |
-
<button type="submit" style="visibility:hidden;" data-cart-item-update name="update_cart_action" value="update_qty" title="<?php echo $this->quoteEscape($this->__('Update Shopping Cart')); ?>" class="button2 btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
|
110 |
-
|
111 |
-
<button type="submit" name="update_cart_action" data-cart-empty value="empty_cart" title="<?php echo $this->quoteEscape($this->__('Empty Cart')); ?>" class="button2 btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Empty Cart'); ?></span></span></button>
|
112 |
-
|
113 |
-
<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?php echo $this->quoteEscape($this->__('Update Shopping Cart')); ?>" class="button2 btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
|
114 |
-
|
115 |
-
<span class="or">-<?php echo $this->__('or'); ?>-</span>
|
116 |
-
|
117 |
-
<?php if($this->getContinueShoppingUrl()): ?>
|
118 |
-
<button type="button" title="<?php echo $this->quoteEscape($this->__('Continue Shopping')) ?>" class="button2 btn-continue" onclick="setLocation('<?php echo Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl()) ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
119 |
-
<?php endif; ?>
|
120 |
-
<!--[if lt IE 8]>
|
121 |
-
<input type="hidden" id="update_cart_action_container" data-cart-item-update />
|
122 |
-
<script type="text/javascript">
|
123 |
-
//<![CDATA[
|
124 |
-
Event.observe(window, 'load', function()
|
125 |
-
{
|
126 |
-
// Internet Explorer (lt 8) does not support value attribute in button elements
|
127 |
-
$emptyCartButton = $('empty_cart_button');
|
128 |
-
$cartActionContainer = $('update_cart_action_container');
|
129 |
-
if ($emptyCartButton && $cartActionContainer) {
|
130 |
-
Event.observe($emptyCartButton, 'click', function()
|
131 |
-
{
|
132 |
-
$emptyCartButton.setAttribute('name', 'update_cart_action_temp');
|
133 |
-
$cartActionContainer.setAttribute('name', 'update_cart_action');
|
134 |
-
$cartActionContainer.setValue('empty_cart');
|
135 |
-
});
|
136 |
-
}
|
137 |
-
|
138 |
-
});
|
139 |
-
//]]>
|
140 |
-
</script>
|
141 |
-
<![endif]-->
|
142 |
-
</td>
|
143 |
-
</tr>
|
144 |
-
</tfoot>
|
145 |
-
<tbody>
|
146 |
-
<?php foreach($this->getItems() as $_item): ?>
|
147 |
-
<?php
|
148 |
-
//{{qixol start wrap block
|
149 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
150 |
-
$multiple_coeff=((float)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']/(float)$_item->getQty());
|
151 |
-
$_item->setQty((string)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']);
|
152 |
-
//$_item->setPrice($_item->getPrice()*$multiple_coeff);
|
153 |
-
//$_item->setBasePrice($_item->getBasePrice()*$multiple_coeff);
|
154 |
-
//$_item->setPriceInclTax($_item->getPriceInclTax()*$multiple_coeff);
|
155 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
156 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
157 |
-
$_item->setRowTotal($_item->getRowTotal()*$multiple_coeff);
|
158 |
-
$_item->setBaseRowTotal($_item->getBaseRowTotal()*$multiple_coeff);
|
159 |
-
$_item->setRowTotalInclTax($_item->getRowTotalInclTax()*$multiple_coeff);
|
160 |
-
$_item->setBaseRowTotalInclTax($_item->getBaseRowTotalInclTax()*$multiple_coeff);
|
161 |
-
|
162 |
-
|
163 |
-
unset($multiple_coeff);
|
164 |
-
}
|
165 |
-
// }} qixol
|
166 |
-
?>
|
167 |
-
<?php echo $this->getItemHtml($_item) ?>
|
168 |
-
<?php endforeach ?>
|
169 |
-
<?php
|
170 |
-
//{{qixol start wrap block
|
171 |
-
|
172 |
-
if (isset($_SESSION['qixol_quoted_items'])){
|
173 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $idx_cart=>$item_to_show){
|
174 |
-
if ($item_to_show['new']>0&&(int)$item_to_show['data']['isdelivery']==0&&(int)$item_to_show['data']['splitfromlineid']==0){
|
175 |
-
if ($productId=Mage::getModel('catalog/product')->getIdBySku((string)$item_to_show['data']['variantcode']!=''?(string)$item_to_show['data']['variantcode']:(string)$item_to_show['data']['productcode'])){
|
176 |
-
|
177 |
-
$productObj = Mage::getModel('catalog/product')->load($productId);
|
178 |
-
$quoteItem = Mage::getModel('sales/quote_item')->setStoreId(Mage::app()->getStore()->getId())->setProduct($productObj);
|
179 |
-
$quoteItem->setConvertedPrice((string)$item_to_show['data']['price']);
|
180 |
-
$quoteItem->setRowTotal((string)$item_to_show['data']['price']);
|
181 |
-
$quoteItem->setBaseRowTotal((string)$item_to_show['data']['price']);
|
182 |
-
$quoteItem->setQty((string)$item_to_show['data']['quantity']);
|
183 |
-
$quoteItem->setFreeProduct((int)$item_to_show['free_added']);
|
184 |
-
$quoteItem->setQuote($this);
|
185 |
-
$quoteItem->setId($idx_cart);
|
186 |
-
echo $this->getItemHtml($quoteItem);
|
187 |
-
}
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
192 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $inline_cart_promotion)
|
193 |
-
if($inline_cart_promotion['data']['basketlevel']>0){
|
194 |
-
?>
|
195 |
-
<tr class='promotion_cart_inline_box'>
|
196 |
-
<td class="product-cart-image"> </td>
|
197 |
-
<td class="product-cart-info" colspan='3'><?php echo $inline_cart_promotion['data']['display_text']; ?></td>
|
198 |
-
<td class="product-cart-total" colspan='2'><?php
|
199 |
-
switch ($inline_cart_promotion['data']['type']){
|
200 |
-
case 'ISSUEPOINTS';
|
201 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
202 |
-
break;
|
203 |
-
case 'DELIVERYREDUCTION';
|
204 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
205 |
-
break;
|
206 |
-
case 'BASKETREDUCTION';
|
207 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
208 |
-
break;
|
209 |
-
}
|
210 |
-
?></td>
|
211 |
-
</tr>
|
212 |
-
<?
|
213 |
-
}
|
214 |
-
}
|
215 |
-
}
|
216 |
-
//}} qixol end wrap block
|
217 |
-
?>
|
218 |
-
</tbody>
|
219 |
-
</table>
|
220 |
-
<script type="text/javascript">decorateTable('shopping-cart-table')</script>
|
221 |
-
</form>
|
222 |
-
|
223 |
-
<?php echo $this->getChildHtml('shopping.cart.table.after'); ?>
|
224 |
-
<div class="cart-forms">
|
225 |
-
<?php /* Extensions placeholder */ ?>
|
226 |
-
<?php echo $this->getChildHtml('checkout_cart_widget') ?>
|
227 |
-
<?php echo $this->getChildHtml('coupon') ?>
|
228 |
-
<?php echo $this->getChildHtml('checkout.cart.extra') ?>
|
229 |
-
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
|
230 |
-
</div>
|
231 |
-
<div class="cart-totals-wrapper">
|
232 |
-
<div class="cart-totals">
|
233 |
-
<?php echo $this->getChildHtml('totals'); ?>
|
234 |
-
<?php if(!$this->hasError()): ?>
|
235 |
-
<ul class="checkout-types bottom">
|
236 |
-
<?php foreach ($this->getMethods('methods') as $method): ?>
|
237 |
-
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
238 |
-
<li class="method-<?php echo preg_replace("/[^_a-zA-Z0-9-]/", '-', $method); ?>"><?php echo $methodHtml; ?></li>
|
239 |
-
<?php endif; ?>
|
240 |
-
<?php endforeach; ?>
|
241 |
-
</ul>
|
242 |
-
<?php endif; ?>
|
243 |
-
</div>
|
244 |
-
</div>
|
245 |
-
<?php echo $this->getChildHtml('crosssell') ?>
|
246 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/cart/item/default.phtml
DELETED
@@ -1,386 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
$_item = $this->getItem();
|
29 |
-
$isVisibleProduct = $_item->getProduct()?$_item->getProduct()->isVisibleInSiteVisibility():0;
|
30 |
-
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
31 |
-
?>
|
32 |
-
<?php /* {{ qixol should be added id */ ?>
|
33 |
-
<tr id='qixol_idx_cart_item_<?php echo $_item->getId(); ?>'>
|
34 |
-
<?php /* }} qixol end should be added id */ ?>
|
35 |
-
<td class="product-cart-image">
|
36 |
-
<?php if ($this->hasProductUrl()):?>
|
37 |
-
<a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image">
|
38 |
-
<?php endif;?>
|
39 |
-
<img src="<?php echo $this->getProductThumbnail()->resize(180); ?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
|
40 |
-
<?php if ($this->hasProductUrl()):?>
|
41 |
-
</a>
|
42 |
-
<?php endif;?>
|
43 |
-
|
44 |
-
<ul class="cart-links">
|
45 |
-
<?php if ($isVisibleProduct): ?>
|
46 |
-
<li>
|
47 |
-
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item parameters')) ?>"><?php echo $this->__('Edit') ?></a>
|
48 |
-
</li>
|
49 |
-
<?php endif ?>
|
50 |
-
|
51 |
-
<?php if ($this->helper('wishlist')->isAllowInCart() && $isVisibleProduct) : ?>
|
52 |
-
<li>
|
53 |
-
<a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move to wishlist'); ?></a>
|
54 |
-
</li>
|
55 |
-
<?php endif ?>
|
56 |
-
</ul>
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<?php /* {{ qixol should be added id */ ?>
|
60 |
-
<td class="product-cart-info" id='qixol_idx_cart_item_name_<?php echo $_item->getId(); ?>'>
|
61 |
-
<?php /* }} qixol end should be added id */ ?>
|
62 |
-
|
63 |
-
<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Item')) ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove Item') ?></a>
|
64 |
-
|
65 |
-
<h2 class="product-name">
|
66 |
-
<?php if ($this->hasProductUrl()):?>
|
67 |
-
<a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
|
68 |
-
<?php else: ?>
|
69 |
-
<?php echo $this->escapeHtml($this->getProductName()) ?>
|
70 |
-
<?php endif; ?>
|
71 |
-
</h2>
|
72 |
-
|
73 |
-
<div class="product-cart-sku">
|
74 |
-
<span class="label"><?php echo $this->__('SKU'); ?>:</span> <?php echo $this->escapeHtml($_item->getSku()); ?>
|
75 |
-
</div>
|
76 |
-
|
77 |
-
<?php if ($_options = $this->getOptionList()):?>
|
78 |
-
<dl class="item-options">
|
79 |
-
<?php foreach ($_options as $_option) : ?>
|
80 |
-
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
81 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
82 |
-
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
83 |
-
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
84 |
-
<div class="truncated_full_value">
|
85 |
-
<dl class="item-options">
|
86 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
87 |
-
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
88 |
-
</dl>
|
89 |
-
</div>
|
90 |
-
<?php endif; ?>
|
91 |
-
</dd>
|
92 |
-
<?php endforeach; ?>
|
93 |
-
</dl>
|
94 |
-
<?php endif;?>
|
95 |
-
|
96 |
-
<?php if ($messages = $this->getMessages()): ?>
|
97 |
-
<?php foreach ($messages as $message): ?>
|
98 |
-
<p class="item-msg <?php echo $message['type'] ?>">
|
99 |
-
* <?php echo $this->escapeHtml($message['text']) ?>
|
100 |
-
</p>
|
101 |
-
<?php endforeach; ?>
|
102 |
-
<?php endif; ?>
|
103 |
-
|
104 |
-
<?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
105 |
-
<?php if ($addInfoBlock): ?>
|
106 |
-
<?php echo $addInfoBlock->setItem($_item)->toHtml() ?>
|
107 |
-
<?php endif;
|
108 |
-
/* qixol {{ */
|
109 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')==0&&Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay'):
|
110 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['promotions'] as $promotion){
|
111 |
-
//inline level promotion
|
112 |
-
$is_generated=($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0?$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']:$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']);
|
113 |
-
if (((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytext'){
|
114 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text']; ?></div><?php
|
115 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname'){
|
116 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['name']; ?></div><?php
|
117 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytype'){
|
118 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display']; ?></div><?php
|
119 |
-
}
|
120 |
-
|
121 |
-
}
|
122 |
-
endif;
|
123 |
-
/* }} end qixol */ ?>
|
124 |
-
|
125 |
-
</td>
|
126 |
-
|
127 |
-
<?php if ($canApplyMsrp): ?>
|
128 |
-
<td class="a-center product-cart-price"<?php if ($this->helper('tax')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>>
|
129 |
-
<span class="cart-price">
|
130 |
-
<span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
131 |
-
<?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
|
132 |
-
<a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
|
133 |
-
|
134 |
-
<script type="text/javascript">
|
135 |
-
Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What's this?") ?>");
|
136 |
-
</script>
|
137 |
-
|
138 |
-
</span>
|
139 |
-
</td>
|
140 |
-
<?php else: ?>
|
141 |
-
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
142 |
-
<td class="product-cart-price" data-rwd-label="<?php echo $this->__('Price'); ?>" data-rwd-tax-label="<?php echo $this->__('Excl. Tax'); ?>" >
|
143 |
-
|
144 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
145 |
-
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
146 |
-
<?php else: ?>
|
147 |
-
<span class="cart-price">
|
148 |
-
<?php endif; ?>
|
149 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
150 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
151 |
-
<?php else: ?>
|
152 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
153 |
-
<?php endif; ?>
|
154 |
-
|
155 |
-
</span>
|
156 |
-
|
157 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
158 |
-
|
159 |
-
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
160 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
161 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
162 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
163 |
-
<?php endforeach; ?>
|
164 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
165 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
166 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
167 |
-
<?php endforeach; ?>
|
168 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
169 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
170 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
171 |
-
<?php endforeach; ?>
|
172 |
-
<?php endif; ?>
|
173 |
-
</div>
|
174 |
-
|
175 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
176 |
-
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
177 |
-
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
178 |
-
</div>
|
179 |
-
<?php endif; ?>
|
180 |
-
<?php endif; ?>
|
181 |
-
</td>
|
182 |
-
<?php endif; ?><!-- inclusive price starts here -->
|
183 |
-
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
184 |
-
<td class="product-cart-price" data-rwd-label="<?php echo $this->__('Price'); ?>" data-rwd-tax-label="<?php echo $this->__('Incl. Tax'); ?>">
|
185 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
186 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
187 |
-
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
188 |
-
<?php else: ?>
|
189 |
-
<span class="cart-price">
|
190 |
-
<?php endif; ?>
|
191 |
-
|
192 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
193 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
194 |
-
<?php else: ?>
|
195 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
196 |
-
<?php endif; ?>
|
197 |
-
|
198 |
-
</span>
|
199 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
200 |
-
|
201 |
-
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
202 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
203 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
204 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
205 |
-
<?php endforeach; ?>
|
206 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
207 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
208 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
209 |
-
<?php endforeach; ?>
|
210 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
211 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
212 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
213 |
-
<?php endforeach; ?>
|
214 |
-
<?php endif; ?>
|
215 |
-
</div>
|
216 |
-
|
217 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
218 |
-
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
219 |
-
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
220 |
-
</div>
|
221 |
-
<?php endif; ?>
|
222 |
-
<?php endif; ?>
|
223 |
-
</td>
|
224 |
-
<?php endif; ?>
|
225 |
-
<?php endif; ?>
|
226 |
-
<?php /* qixol should be added id */ ?>
|
227 |
-
<td class="product-cart-actions" data-rwd-label="<?php echo $this->__('Qty'); ?>" id='qixol_idx_cart_item_qty_<?php echo $_item->getId(); ?>'>
|
228 |
-
<?php /* qixol add */ ?>
|
229 |
-
<?php /*if ($_item->getFreeProduct()>0): ?>
|
230 |
-
<div class="cart_inline_item_promo"><?php echo $this->__('free '.$_item->getFreeProduct().' item'); ?><br>
|
231 |
-
<button title="<?php echo Mage::helper('qixol')->quoteEscape($this->__('Add More')) ?>" class="button btn-cart" style="display:inline-block !important" onclick="setLocation('<?php echo $this->helper('checkout/cart')->getAddUrl($_item->getProduct())/*$_item->getProduct()->getProductUrl()*//*; ?>')"><span><span><?php echo $this->__('Add More') ?></span></span></button>
|
232 |
-
</div>
|
233 |
-
<?php else :*/ ?>
|
234 |
-
<?php /* end qixol add */ ?>
|
235 |
-
<input type="text" pattern="\d*" name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4"
|
236 |
-
data-cart-item-id="<?php echo $this->jsQuoteEscape($_item->getSku()) ?>"
|
237 |
-
title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" maxlength="12" />
|
238 |
-
|
239 |
-
<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Update')); ?>" class="button btn-update"><span><span><?php echo $this->__('Update'); ?></span></span>
|
240 |
-
</button>
|
241 |
-
|
242 |
-
<ul class="cart-links">
|
243 |
-
<?php if ($isVisibleProduct): ?>
|
244 |
-
<li>
|
245 |
-
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item parameters')) ?>"><?php echo $this->__('Edit') ?></a>
|
246 |
-
</li>
|
247 |
-
<?php endif ?>
|
248 |
-
|
249 |
-
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
250 |
-
<li>
|
251 |
-
<?php if ($isVisibleProduct): ?>
|
252 |
-
<a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move to wishlist'); ?></a>
|
253 |
-
<?php endif ?>
|
254 |
-
</li>
|
255 |
-
<?php endif ?>
|
256 |
-
</ul>
|
257 |
-
<?php /* qixol add */ ?>
|
258 |
-
<?php //endif ?>
|
259 |
-
<?php /* end qixol add */ ?>
|
260 |
-
<?php
|
261 |
-
//{{qixol
|
262 |
-
/*if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_qty']>0){
|
263 |
-
?><div class="cart_inline_item_new_qty">For <?php echo $_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']; ?> Qty</div><?php
|
264 |
-
}*/
|
265 |
-
//}}qixol end
|
266 |
-
?>
|
267 |
-
</td>
|
268 |
-
|
269 |
-
<!--Sub total starts here -->
|
270 |
-
<?php if (($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
|
271 |
-
<?php /* qixol should be added id */ ?>
|
272 |
-
<td class="product-cart-total" data-rwd-label="<?php echo $this->__('Subtotal'); ?>" id='qixol_idx_cart_item_price_<?php echo $_item->getId(); ?>'>
|
273 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
274 |
-
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
275 |
-
<?php else: ?>
|
276 |
-
<span class="cart-price">
|
277 |
-
<?php endif; ?>
|
278 |
-
|
279 |
-
<?php if ($canApplyMsrp): ?>
|
280 |
-
<span class="cart-msrp-subtotal">--</span>
|
281 |
-
<?php else: ?>
|
282 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
283 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
284 |
-
<?php else: ?>
|
285 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
286 |
-
<?php endif; ?>
|
287 |
-
<?php endif; ?>
|
288 |
-
|
289 |
-
</span>
|
290 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
291 |
-
|
292 |
-
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
293 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
294 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
295 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
296 |
-
<?php endforeach; ?>
|
297 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
298 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
299 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
300 |
-
<?php endforeach; ?>
|
301 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
302 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
303 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
304 |
-
<?php endforeach; ?>
|
305 |
-
<?php endif; ?>
|
306 |
-
</div>
|
307 |
-
|
308 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
309 |
-
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
310 |
-
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
311 |
-
</div>
|
312 |
-
<?php endif; ?>
|
313 |
-
<?php endif; ?>
|
314 |
-
<?php
|
315 |
-
//{{qixol
|
316 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0)){
|
317 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalamount']-$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['totaldiscount']); ?></div><?php
|
318 |
-
}
|
319 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['new']>0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0){
|
320 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']); ?></div><?php
|
321 |
-
}else if ((int)Mage::getStoreConfig('qixol/frontend/cartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
322 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']*$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']); ?></div><?php
|
323 |
-
}
|
324 |
-
//}}qixol end
|
325 |
-
?>
|
326 |
-
</td>
|
327 |
-
<?php endif; ?>
|
328 |
-
<?php if (($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
|
329 |
-
<?php /* qixol should be added id */ ?>
|
330 |
-
<td class="product-cart-total" data-rwd-label="<?php echo $this->__('Subtotal'); ?>" id='qixol_idx_cart_item_price_<?php echo $_item->getId(); ?>'>
|
331 |
-
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
332 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
333 |
-
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
334 |
-
<?php else: ?>
|
335 |
-
<span class="cart-price">
|
336 |
-
<?php endif; ?>
|
337 |
-
|
338 |
-
<?php if ($canApplyMsrp): ?>
|
339 |
-
<span class="cart-msrp-subtotal">--</span>
|
340 |
-
<?php else: ?>
|
341 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
342 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
343 |
-
<?php else: ?>
|
344 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
345 |
-
<?php endif; ?>
|
346 |
-
<?php endif; ?>
|
347 |
-
|
348 |
-
</span>
|
349 |
-
|
350 |
-
|
351 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
352 |
-
|
353 |
-
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
354 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
355 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
356 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
357 |
-
<?php endforeach; ?>
|
358 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
359 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
360 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
361 |
-
<?php endforeach; ?>
|
362 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
363 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
364 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
365 |
-
<?php endforeach; ?>
|
366 |
-
<?php endif; ?>
|
367 |
-
</div>
|
368 |
-
|
369 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
370 |
-
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
371 |
-
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
372 |
-
</div>
|
373 |
-
<?php endif; ?>
|
374 |
-
<?php endif; ?>
|
375 |
-
</td>
|
376 |
-
<?php endif; ?>
|
377 |
-
<td class="a-center product-cart-remove">
|
378 |
-
<?php /* qixol */ ?>
|
379 |
-
<?php if ($_item->getFreeProduct()==0): ?>
|
380 |
-
<?php /* qixol end */ ?>
|
381 |
-
<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Item')) ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove Item') ?></a>
|
382 |
-
<?php /* qixol */ ?>
|
383 |
-
<?php endif; ?>
|
384 |
-
<?php /* qixol end */ ?>
|
385 |
-
</td>
|
386 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/cart/totals.phtml
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
totals
|
|
app/design/frontend/base/default/template/qixol/issuedcoupon/list.phtml
DELETED
@@ -1,95 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
4 |
-
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
5 |
-
$list_coupons_collection=Mage::getModel('qixol/issuedcoupon')->getCustomerIssuedcoupons($customerData->getId());
|
6 |
-
|
7 |
-
?>
|
8 |
-
<div class="page-title">
|
9 |
-
<h1><?php echo $this->__('Issued Coupons') ?></h1>
|
10 |
-
</div>
|
11 |
-
<?php if($list_coupons_collection->getSize()): ?>
|
12 |
-
|
13 |
-
|
14 |
-
<table class="data-table">
|
15 |
-
<col width="60" />
|
16 |
-
<col width="60" />
|
17 |
-
<col width="160" />
|
18 |
-
<col />
|
19 |
-
<thead>
|
20 |
-
<tr>
|
21 |
-
<th><?php echo $this->__('Code') ?></th>
|
22 |
-
<th><?php echo $this->__('Status') ?></th>
|
23 |
-
<th><?php echo $this->__('Valid To') ?></th>
|
24 |
-
<th><?php echo $this->__('Description') ?></th>
|
25 |
-
</tr>
|
26 |
-
</thead>
|
27 |
-
<tbody>
|
28 |
-
<?php foreach($list_coupons_collection as $item): ?>
|
29 |
-
<?php
|
30 |
-
|
31 |
-
$soapclient_coupon = new soapclient('http://evaluation.qixolpromo.com/BasketService.svc?singleWsdl', array('trace' => 1));
|
32 |
-
try {
|
33 |
-
$update_item=false;
|
34 |
-
$result_coupon = $soapclient_coupon->__soapCall('ValidateCouponCode', array('ValidateCouponCode' => array('companyKey' => Mage::getStoreConfig('qixol/integraion/companykey'),'couponCode' => $item->getCouponCodeValue())));
|
35 |
-
$xml_coupon_code_validated=$result_coupon->ValidateCouponCodeResult;
|
36 |
-
if (strlen($xml_coupon_code_validated)>10){
|
37 |
-
$xml_coupon_object = simplexml_load_string($xml_coupon_code_validated);
|
38 |
-
foreach ($xml_coupon_object as $xml_coupon_object_root_key=>$xml_coupon_object_object_sub){
|
39 |
-
if ($xml_coupon_object_root_key=='summary'){
|
40 |
-
$xml_coupon_object_object_coupon_summary=$xml_coupon_object_object_sub->attributes();
|
41 |
-
if ($xml_coupon_object_object_coupon_summary['result']=='false'){
|
42 |
-
$item->setIsUsed(1);
|
43 |
-
$update_item=true;
|
44 |
-
}
|
45 |
-
}
|
46 |
-
else if ($xml_coupon_object_root_key=='coupon'){
|
47 |
-
foreach ($xml_coupon_object_object_sub as $xml_coupon_object_coupon_key=>$xml_coupon_object_object_coupon){
|
48 |
-
if ($xml_coupon_object_coupon_key=='codes'){
|
49 |
-
foreach ($xml_coupon_object_object_coupon as $xml_coupon_object_object_coupon_obj){
|
50 |
-
$xml_coupon_object_object_coupon_attributes=$xml_coupon_object_object_coupon_obj->attributes();
|
51 |
-
if ((string)$xml_coupon_object_object_coupon_attributes['isredeemable']!='true'){
|
52 |
-
$item->setIsUsed(1);
|
53 |
-
$update_item=true;
|
54 |
-
}
|
55 |
-
if (date("Y-m-d H:i:s",strtotime((string)$xml_coupon_object_object_coupon_attributes['validto']))!=$item->getCouponValidTill()){
|
56 |
-
$item->setCouponValidTill(date("Y-m-d H:i:s",strtotime((string)$xml_coupon_object_object_coupon_attributes['validto'])));
|
57 |
-
$update_item=true;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
}
|
66 |
-
} catch (SoapFault $e) {
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
?>
|
71 |
-
<tr>
|
72 |
-
<td><?php echo $item->getCouponCodeValue() ?></td>
|
73 |
-
<td><?php echo (((int)$item->getIsUsed()>0)?($this->__('Inactive')):(($item->getCouponValidTill()!=''&&$item->getCouponValidTill()!='0000-00-00 00:00:00'&&$item->getCouponValidTill()!='1970-01-01 00:00:00'&&strtotime($item->getCouponValidTill())<time())?$this->__('Expired'):$this->__('Active'))) ?></td>
|
74 |
-
<td><?php echo (($item->getCouponValidTill()!='0000-00-00 00:00:00'&&$item->getCouponValidTill()!='1970-01-01 00:00:00')?$item->getCouponValidTill():"Unlimited"); ?></td>
|
75 |
-
<td><?php echo $item->getCouponDescription(); ?></td>
|
76 |
-
</tr>
|
77 |
-
<?php
|
78 |
-
if ($update_item){
|
79 |
-
$item->save();
|
80 |
-
}
|
81 |
-
?>
|
82 |
-
<?php endforeach ?>
|
83 |
-
</tbody>
|
84 |
-
</table>
|
85 |
-
|
86 |
-
|
87 |
-
<?php else: ?>
|
88 |
-
<p><?php echo $this->__('You are having no issued coupons yet.'); ?></p>
|
89 |
-
<div class="buttons-set">
|
90 |
-
<p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>« </small><?php echo $this->__('Back - link to the previously viewed page'); ?></a></p>
|
91 |
-
</div>
|
92 |
-
<?php endif ?>
|
93 |
-
<?php
|
94 |
-
}
|
95 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/issuedpoints/box.phtml
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<div class="account-box ad-account-info">
|
2 |
-
<div class="box-head">
|
3 |
-
<h4><?php echo $this->__('Points') ?></h4>
|
4 |
-
</div>
|
5 |
-
<?php echo $this->getChildHtml('points'); ?>
|
6 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/issuedpoints/dashboard_points.phtml
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$customerId = Mage::getModel('customer/session')->getCustomerId();
|
3 |
-
$customerPoints = Mage::getModel('qixol/Bonuspoints')->load($customerId);
|
4 |
-
?>
|
5 |
-
Your Points: <?= sprintf('%d',$customerPoints->getCurrentPoints()); ?>
|
6 |
-
<br/>
|
7 |
-
Total Points Accumulated: <?= sprintf('%d',$customerPoints->getEarnedPoints()); ?>
|
8 |
-
<br/>
|
9 |
-
Total Points Spent: <?= sprintf('%d',$customerPoints->getSpentPoints()); ?>
|
10 |
-
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/minicart/advert.phtml
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
moved to mincart
|
4 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
5 |
-
$place_box_in_design_after_pattern='.cart';
|
6 |
-
|
7 |
-
|
8 |
-
/* $cart_advertisment_=Mage::getModel('qixol/advert');
|
9 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();*/
|
10 |
-
/*
|
11 |
-
$inline_cart_advert='';
|
12 |
-
|
13 |
-
//for cart items
|
14 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
15 |
-
foreach ($cart->getAllItems() as $item) {
|
16 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
17 |
-
if (isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
18 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
19 |
-
//inline level promotion
|
20 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
21 |
-
$inline_cart_advert.="
|
22 |
-
$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_mcart_item_name_".$item->getId()."'));
|
23 |
-
";
|
24 |
-
//basket level promotion
|
25 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
26 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
31 |
-
if ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
32 |
-
$inline_cart_advert.="
|
33 |
-
$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_mcart_item_qty_".$item->getId()."'));
|
34 |
-
";
|
35 |
-
|
36 |
-
if ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
37 |
-
$inline_cart_advert.="
|
38 |
-
$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_mcart_item_price_".$item->getId()."'));
|
39 |
-
";
|
40 |
-
|
41 |
-
}
|
42 |
-
}
|
43 |
-
$total_discount_amount=0;
|
44 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
45 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
46 |
-
if ($cart_item_process['data']['totaldiscount']>0&&(int)$cart_item_process['new']==0){
|
47 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
48 |
-
}
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''){
|
53 |
-
?><script type="text/javascript" src="http://qixol.holbidev.co.uk/js/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
54 |
-
/*if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
55 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';*//*
|
56 |
-
if ($inline_cart_advert!='')
|
57 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
58 |
-
if ($total_discount_amount>0){
|
59 |
-
/*?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" > Discount</td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount);; ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php*//*
|
60 |
-
?>$('#header-cart .subtotal .price').addClass('qixol_price_cross');$('<?php echo $this->helper('checkout')->formatPrice($cart->getGrandTotal()-$total_discount_amount); ?>').appendTo($('#header-cart .subtotal .price').parent());<?php
|
61 |
-
}
|
62 |
-
?>});</script><?php
|
63 |
-
}*/
|
64 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/minicart/default.phtml
DELETED
@@ -1,238 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
$_item = $this->getItem();
|
29 |
-
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
30 |
-
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
31 |
-
?>
|
32 |
-
<?php /* {{ qixol should be added id */ ?>
|
33 |
-
<li class="item" xmlns="http://www.w3.org/1999/html" id='qixol_idx_mcart_item_<?php echo $_item->getId(); ?>'>
|
34 |
-
<?php if ($this->hasProductUrl()): ?>
|
35 |
-
<a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a>
|
36 |
-
<?php else: ?>
|
37 |
-
<span class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
|
38 |
-
<?php endif; ?>
|
39 |
-
<div class="product-details">
|
40 |
-
<?php /* qixol should be added id */ ?>
|
41 |
-
<p class="product-name" id='qixol_idx_mcart_item_name_<?php echo $_item->getId(); ?>'><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif;
|
42 |
-
/* qixol {{ */
|
43 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay'):
|
44 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['promotions'] as $promotion){
|
45 |
-
//inline level promotion
|
46 |
-
$is_generated=($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0?$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']:$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']);
|
47 |
-
if (((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytext'){
|
48 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text']; ?></div><?php
|
49 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname'){
|
50 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['name']; ?></div><?php
|
51 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytype'){
|
52 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display']; ?></div><?php
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
56 |
-
endif;
|
57 |
-
/* }} end qixol */ ?></p>
|
58 |
-
|
59 |
-
|
60 |
-
<table class="info-wrapper">
|
61 |
-
<tbody>
|
62 |
-
<tr>
|
63 |
-
<th><?php echo $this->__('Price'); ?></th>
|
64 |
-
<td id='qixol_idx_mcart_item_price_<?php echo $_item->getId(); ?>'>
|
65 |
-
<?php if ($canApplyMsrp): ?>
|
66 |
-
|
67 |
-
<span class="map-cart-sidebar-item"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
68 |
-
|
69 |
-
<?php else: ?>
|
70 |
-
|
71 |
-
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
72 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
73 |
-
<?php echo $this->__('Excl. Tax'); ?>:
|
74 |
-
<?php endif; ?>
|
75 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
76 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
77 |
-
<?php else: ?>
|
78 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
79 |
-
<?php endif; ?>
|
80 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
81 |
-
<br />
|
82 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
83 |
-
<small>
|
84 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
85 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
86 |
-
<?php endforeach; ?>
|
87 |
-
</small>
|
88 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
89 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
90 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
91 |
-
<?php endforeach; ?>
|
92 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
93 |
-
<small>
|
94 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
95 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
96 |
-
<?php endforeach; ?>
|
97 |
-
</small>
|
98 |
-
<?php endif; ?>
|
99 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
100 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
101 |
-
<?php endif; ?>
|
102 |
-
<?php endif; ?>
|
103 |
-
<?php endif; ?>
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
108 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
109 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
110 |
-
<br /><?php echo $this->__('Incl. Tax'); ?>:
|
111 |
-
<?php endif; ?>
|
112 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
113 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
114 |
-
<?php else: ?>
|
115 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
116 |
-
<?php endif; ?>
|
117 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
118 |
-
<br />
|
119 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
120 |
-
<small>
|
121 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
122 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
123 |
-
<?php endforeach; ?>
|
124 |
-
</small>
|
125 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
126 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
127 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span>
|
128 |
-
<?php endforeach; ?>
|
129 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
130 |
-
<small>
|
131 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
132 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
133 |
-
<?php endforeach; ?>
|
134 |
-
</small>
|
135 |
-
<?php endif; ?>
|
136 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
137 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
138 |
-
<?php endif; ?>
|
139 |
-
<?php endif; ?>
|
140 |
-
<?php endif; ?>
|
141 |
-
|
142 |
-
<?php endif; //Can apply MSRP ?>
|
143 |
-
<?php
|
144 |
-
//{{qixol
|
145 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0){
|
146 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice(($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalamount']-$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['totaldiscount'])/$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalquantity']);?></div><?php
|
147 |
-
}
|
148 |
-
//}}qixol end
|
149 |
-
?>
|
150 |
-
</td>
|
151 |
-
</tr>
|
152 |
-
<tr class="qty-wrapper">
|
153 |
-
<th><?php echo $this->__('Qty'); ?></th>
|
154 |
-
|
155 |
-
<?php /* qixol should be added id */ ?>
|
156 |
-
<td id='qixol_idx_mcart_item_qty_<?php echo $_item->getId(); ?>'>
|
157 |
-
<?php /*if ($_item->getFreeProduct()>0): ?>
|
158 |
-
<div class="cart_inline_item_promo"><?php echo $this->__('free item'); ?></div>
|
159 |
-
<?php else :*/ ?>
|
160 |
-
<?php /* end qixol add */ ?>
|
161 |
-
<input
|
162 |
-
id="qinput-<?php echo $_item->getId(); ?>"
|
163 |
-
data-link="<?php echo $this->getAjaxUpdateUrl() ?>"
|
164 |
-
data-item-id="<?php echo $_item->getId(); ?>"
|
165 |
-
data-cart-item-id="<?php echo $_item->getSku(); ?>"
|
166 |
-
class="qty cart-item-quantity input-text" name=""
|
167 |
-
value="<?php echo $this->getQty()?>"
|
168 |
-
<?php if ($this->isOnCheckoutPage()) echo 'disabled'; ?>
|
169 |
-
/>
|
170 |
-
|
171 |
-
<button id="qbutton-<?php echo $_item->getId(); ?>"
|
172 |
-
data-item-id="<?php echo $_item->getId(); ?>"
|
173 |
-
disabled="disabled"
|
174 |
-
data-update
|
175 |
-
data-cart-item-update
|
176 |
-
class="button quantity-button">
|
177 |
-
<?php echo $this->__('ok'); ?>
|
178 |
-
</button>
|
179 |
-
<?php
|
180 |
-
//{{qixol
|
181 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0)){
|
182 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalamount']-$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['totaldiscount']); ?></div><?php
|
183 |
-
}
|
184 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['new']>0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0){
|
185 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']); ?></div><?php
|
186 |
-
}else if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
187 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']*$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']); ?></div><?php
|
188 |
-
}
|
189 |
-
//}}qixol end
|
190 |
-
?>
|
191 |
-
<?php /* qixol add */ ?>
|
192 |
-
<?php //endif ?>
|
193 |
-
<?php /* end qixol add */ ?>
|
194 |
-
</td>
|
195 |
-
</tr>
|
196 |
-
</tbody>
|
197 |
-
</table>
|
198 |
-
|
199 |
-
<?php if ($isVisibleProduct&&($_item->getFreeProduct()==0)): ?>
|
200 |
-
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item')) ?>" class="btn-edit">
|
201 |
-
<?php echo $this->__('Edit item')?>
|
202 |
-
</a>
|
203 |
-
|
|
204 |
-
<?php if (!$this->isOnCheckoutPage()): ?>
|
205 |
-
<a href="<?php echo $this->getAjaxDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>"
|
206 |
-
data-confirm="<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>"
|
207 |
-
class="remove">
|
208 |
-
<?php echo $this->__('Remove Item') ?>
|
209 |
-
</a>
|
210 |
-
<?php else: ?>
|
211 |
-
<span><?php echo $this->__('Remove Item') ?></span>
|
212 |
-
<?php endif; ?>
|
213 |
-
<?php endif ?>
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
<?php if ($_options = $this->getOptionList()):?>
|
218 |
-
<div class="truncated">
|
219 |
-
<div class="truncated_full_value">
|
220 |
-
<dl class="item-options">
|
221 |
-
<?php foreach ($_options as $_option) : ?>
|
222 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
223 |
-
<dd>
|
224 |
-
<?php if (is_array($_option['value'])): ?>
|
225 |
-
<?php echo nl2br(implode("\n", $_option['value'])) ?>
|
226 |
-
<?php else: ?>
|
227 |
-
<?php echo $_option['value'] ?>
|
228 |
-
<?php endif; ?>
|
229 |
-
</dd>
|
230 |
-
<?php endforeach; ?>
|
231 |
-
</dl>
|
232 |
-
</div>
|
233 |
-
<a href="#" onclick="return false;" class="details"><?php echo $this->__('Details') ?></a>
|
234 |
-
</div>
|
235 |
-
<?php endif; ?>
|
236 |
-
|
237 |
-
</div>
|
238 |
-
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/minicart/mincart.phtml
DELETED
@@ -1,250 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Shoping cart sidebar
|
29 |
-
*
|
30 |
-
* @var Mage_Checkout_Block_Cart_Minicart $this
|
31 |
-
*/
|
32 |
-
?>
|
33 |
-
<?php
|
34 |
-
$_cartQty = $this->getSummaryCount();
|
35 |
-
if(empty($_cartQty)) {
|
36 |
-
$_cartQty = 0;
|
37 |
-
}
|
38 |
-
?>
|
39 |
-
<div id="minicart-error-message" class="minicart-message"></div>
|
40 |
-
<div id="minicart-success-message" class="minicart-message"></div>
|
41 |
-
|
42 |
-
<div class="minicart-wrapper">
|
43 |
-
|
44 |
-
<p class="block-subtitle">
|
45 |
-
<?php echo $this->__('Recently added item(s)') ?>
|
46 |
-
<a class="close skip-link-close" href="#" title="<?php echo $this->quoteEscape($this->__('Close')); ?>">×</a>
|
47 |
-
</p>
|
48 |
-
|
49 |
-
<?php $_items = $this->getRecentItems() ?>
|
50 |
-
<?php $countItems = count($_items); ?>
|
51 |
-
<?php if($countItems): ?>
|
52 |
-
<div>
|
53 |
-
<ul id="cart-sidebar" class="mini-products-list">
|
54 |
-
<?php foreach($_items as $_item): ?>
|
55 |
-
<?php
|
56 |
-
//{{qixol start wrap block
|
57 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
58 |
-
$multiple_coeff=((float)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']/(float)$_item->getQty());
|
59 |
-
$_item->setQty((string)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']);
|
60 |
-
//$_item->setPrice($_item->getPrice()*$multiple_coeff);
|
61 |
-
//$_item->setBasePrice($_item->getBasePrice()*$multiple_coeff);
|
62 |
-
//$_item->setPriceInclTax($_item->getPriceInclTax()*$multiple_coeff);
|
63 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
64 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
65 |
-
$_item->setRowTotal($_item->getRowTotal()*$multiple_coeff);
|
66 |
-
$_item->setBaseRowTotal($_item->getBaseRowTotal()*$multiple_coeff);
|
67 |
-
$_item->setRowTotalInclTax($_item->getRowTotalInclTax()*$multiple_coeff);
|
68 |
-
$_item->setBaseRowTotalInclTax($_item->getBaseRowTotalInclTax()*$multiple_coeff);
|
69 |
-
|
70 |
-
|
71 |
-
unset($multiple_coeff);
|
72 |
-
}
|
73 |
-
// }} qixol
|
74 |
-
?>
|
75 |
-
<?php echo $this->getItemHtml($_item) ?>
|
76 |
-
<?php endforeach; ?>
|
77 |
-
<?php
|
78 |
-
//{{qixol start wrap block
|
79 |
-
|
80 |
-
if (isset($_SESSION['qixol_quoted_items'])){
|
81 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $idx_cart=>$item_to_show){
|
82 |
-
if ($item_to_show['new']>0&&(int)$item_to_show['data']['isdelivery']==0&&(int)$item_to_show['data']['splitfromlineid']==0){
|
83 |
-
if ($productId=Mage::getModel('catalog/product')->getIdBySku((string)$item_to_show['data']['variantcode']!=''?(string)$item_to_show['data']['variantcode']:(string)$item_to_show['data']['productcode'])){
|
84 |
-
$productObj = Mage::getModel('catalog/product')->load($productId);
|
85 |
-
$quoteItem = Mage::getModel('sales/quote_item')->setStoreId(Mage::app()->getStore()->getId())->setProduct($productObj);
|
86 |
-
$quoteItem->setConvertedPrice((string)$item_to_show['data']['price']);
|
87 |
-
$quoteItem->setQty((string)$item_to_show['data']['quantity']);
|
88 |
-
$quoteItem->setFreeProduct((int)$item_to_show['free_added']);
|
89 |
-
$quoteItem->setQuote($this);
|
90 |
-
$quoteItem->setId($idx_cart);
|
91 |
-
echo $this->getItemHtml($quoteItem);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
96 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $inline_cart_promotion)
|
97 |
-
if($inline_cart_promotion['data']['basketlevel']>0){
|
98 |
-
?>
|
99 |
-
<li class="item odd" xmlns="http://www.w3.org/1999/html">
|
100 |
-
<div class="promotion_cart_inline_box" ><?php echo $inline_cart_promotion['data']['display_text'] ?> : <?php
|
101 |
-
switch ($inline_cart_promotion['data']['type']){
|
102 |
-
case 'DELIVERYREDUCTION';
|
103 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
104 |
-
break;
|
105 |
-
case 'ISSUEPOINTS';
|
106 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
107 |
-
break;
|
108 |
-
case 'BASKETREDUCTION';
|
109 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
110 |
-
break;
|
111 |
-
}
|
112 |
-
?></div>
|
113 |
-
</li>
|
114 |
-
<?
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
//}} qixol end wrap block
|
119 |
-
?>
|
120 |
-
</ul>
|
121 |
-
</div>
|
122 |
-
<script type="text/javascript">
|
123 |
-
truncateOptions();
|
124 |
-
decorateList('cart-sidebar', 'none-recursive');
|
125 |
-
$j('document').ready(function() {
|
126 |
-
var minicartOptions = {
|
127 |
-
formKey: "<?php echo $this->getFormKey();?>"
|
128 |
-
}
|
129 |
-
var Mini = new Minicart(minicartOptions);
|
130 |
-
Mini.init();
|
131 |
-
});
|
132 |
-
</script>
|
133 |
-
|
134 |
-
<div id="minicart-widgets">
|
135 |
-
<?php echo $this->getChildHtml('cart_promotion') ?>
|
136 |
-
</div>
|
137 |
-
<div class="block-content">
|
138 |
-
<p class="subtotal">
|
139 |
-
<?php if ($this->canApplyMsrp()): ?>
|
140 |
-
<span class="map-cart-sidebar-total"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></span>
|
141 |
-
<?php else: ?>
|
142 |
-
<span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
|
143 |
-
<?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
|
144 |
-
<br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
|
145 |
-
<?php endif; ?>
|
146 |
-
<?php endif; ?>
|
147 |
-
</p>
|
148 |
-
</div>
|
149 |
-
|
150 |
-
|
151 |
-
<div class="minicart-actions">
|
152 |
-
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
|
153 |
-
<ul class="checkout-types minicart">
|
154 |
-
<?php echo $this->getChildHtml('extra_actions') ?>
|
155 |
-
<li>
|
156 |
-
<a title="<?php echo $this->quoteEscape($this->__('Checkout')) ?>" class="button checkout-button" href="<?php echo $this->getCheckoutUrl() ?>">
|
157 |
-
<?php echo $this->__('Checkout') ?>
|
158 |
-
</a>
|
159 |
-
</li>
|
160 |
-
</ul>
|
161 |
-
<?php endif ?>
|
162 |
-
<a class="cart-link" href="<?php echo $this->getUrl('checkout/cart'); ?>">
|
163 |
-
<?php echo $this->__('View Shopping Cart'); ?>
|
164 |
-
</a>
|
165 |
-
</div>
|
166 |
-
|
167 |
-
<?php else: ?>
|
168 |
-
<p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
|
169 |
-
|
170 |
-
<?php endif ?>
|
171 |
-
</div>
|
172 |
-
<!-- // qixol //-->
|
173 |
-
<?php
|
174 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
175 |
-
$place_box_in_design_after_pattern='.cart';
|
176 |
-
|
177 |
-
|
178 |
-
$cart_advertisment_=Mage::getModel('qixol/advert');
|
179 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();
|
180 |
-
|
181 |
-
$inline_cart_advert='';
|
182 |
-
|
183 |
-
//for cart items
|
184 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
185 |
-
foreach ($cart->getAllItems() as $item) {
|
186 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
187 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')>0 && Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay' &&
|
188 |
-
isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
189 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
190 |
-
|
191 |
-
//inline level promotion
|
192 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname'){
|
193 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
194 |
-
} elseif((int)$promotion['basketlevel']==0&&(Mage::getStoreConfig('qixol/advanced/services')=='displaytext'||Mage::getStoreConfig('qixol/advanced/services')=='displaytype')) {
|
195 |
-
if ($cart_promotion_data=Mage::getModel('qixol/promotions')->load($promotion['id'])){
|
196 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes(Mage::getStoreConfig('qixol/advanced/services')=='displaytype'?$cart_promotion_data->getPromotionType():$cart_promotion_data->getPromotionText())."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
//basket level promotion
|
201 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
202 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
203 |
-
|
204 |
-
}
|
205 |
-
|
206 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
207 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')>0&&$_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
208 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_mcart_item_qty_".$item->getId()."'));";
|
209 |
-
|
210 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')>0&&$_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
211 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_mcart_item_price_".$item->getId()."'));";
|
212 |
-
|
213 |
-
}
|
214 |
-
}
|
215 |
-
$total_discount_amount=0;
|
216 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
217 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
218 |
-
if ($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['new']==0&&((int)Mage::getStoreConfig('qixol/advanced/separateitem')>0||$cart_item_process['data']['generated']==false)){
|
219 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
220 |
-
}
|
221 |
-
//subtotal are not including delivery
|
222 |
-
/*elseif($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['data']['type']=='DELIVERYREDUCTION'){
|
223 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
224 |
-
}*/
|
225 |
-
}
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
230 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $cart_total_process){
|
231 |
-
if ($cart_total_process['data']['discountamount']>0&&$cart_total_process['data']['type']=='BASKETREDUCTION'){
|
232 |
-
$total_discount_amount+=$cart_total_process['data']['discountamount'];
|
233 |
-
}
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''){
|
238 |
-
?><script type="text/javascript" src="http://qixol.holbidev.co.uk/js/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
239 |
-
//commented -show only on base cart
|
240 |
-
/*if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
241 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';*/
|
242 |
-
if ($inline_cart_advert!='')
|
243 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
244 |
-
if ($total_discount_amount>0){
|
245 |
-
/*?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" > Discount</td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount);; ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php*/
|
246 |
-
?>$('#header-cart .subtotal .price').addClass('qixol_price_cross');$('<?php echo $this->helper('checkout')->formatPrice($cart->getSubtotal()-$total_discount_amount); ?>').appendTo($('#header-cart .subtotal .price').parent());<?php
|
247 |
-
}
|
248 |
-
?>});</script><?php
|
249 |
-
}
|
250 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/email/default.phtml
DELETED
@@ -1,163 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_item = $this->getItem() ?>
|
28 |
-
<?php $_order = $this->getItem()->getOrder() ?>
|
29 |
-
<?php
|
30 |
-
$promotions_raw=$_order->getPromotionDataApplied();
|
31 |
-
if(strlen($promotions_raw)>3){
|
32 |
-
$promotions_data_array=unserialize($promotions_raw);
|
33 |
-
}
|
34 |
-
?>
|
35 |
-
<tbody>
|
36 |
-
<tr>
|
37 |
-
<td class="cell-content product-info">
|
38 |
-
<p class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></p>
|
39 |
-
<p class="sku"><?php echo $this->__('SKU'); ?>: <?php echo $this->escapeHtml($this->getSku($_item)) ?></p>
|
40 |
-
<?php if ($this->getItemOptions()): ?>
|
41 |
-
<dl style="margin:0; padding:0;">
|
42 |
-
<?php foreach ($this->getItemOptions() as $option): ?>
|
43 |
-
<dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
|
44 |
-
<dd style="margin:0; padding:0 0 0 9px;">
|
45 |
-
<?php echo nl2br($option['value']) ?>
|
46 |
-
</dd>
|
47 |
-
<?php endforeach; ?>
|
48 |
-
</dl>
|
49 |
-
<?php endif; ?>
|
50 |
-
<?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
51 |
-
<?php if ($addInfoBlock) :?>
|
52 |
-
<?php echo $addInfoBlock->setItem($_item)->toHtml(); ?>
|
53 |
-
<?php endif; ?>
|
54 |
-
<?php
|
55 |
-
//{ qixol
|
56 |
-
//maybe should be redeveloped as additional.product.info template block
|
57 |
-
if (isset($promotions_data_array['items'][$_item->getQuoteItemId()]['promotions'])){
|
58 |
-
foreach ($promotions_data_array['items'][$_item->getQuoteItemId()]['promotions'] as $promotion_data){
|
59 |
-
if ($promotion_data['description']!=''){
|
60 |
-
echo "<br><span class='cart_inline_item_new_price'>".$this->escapeHtml($promotion_data['description'])."</span><br>";
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
}
|
65 |
-
// } end qixol
|
66 |
-
?>
|
67 |
-
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
68 |
-
</td>
|
69 |
-
<td class="cell-content align-center"><?php echo $_item->getQtyOrdered()*1 ?></td>
|
70 |
-
<td class="cell-content align-right">
|
71 |
-
<?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
72 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
73 |
-
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
|
74 |
-
<?php endif; ?>
|
75 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
|
76 |
-
<?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
77 |
-
<?php else: ?>
|
78 |
-
<?php echo $_order->formatPrice($_item->getRowTotal()) ?>
|
79 |
-
<?php endif; ?>
|
80 |
-
|
81 |
-
|
82 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
83 |
-
<br />
|
84 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
|
85 |
-
<small>
|
86 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
87 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
88 |
-
<?php endforeach; ?>
|
89 |
-
</small>
|
90 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
91 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
92 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></small></span><br />
|
93 |
-
<?php endforeach; ?>
|
94 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
|
95 |
-
<small>
|
96 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
97 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
98 |
-
<?php endforeach; ?>
|
99 |
-
</small>
|
100 |
-
<?php endif; ?>
|
101 |
-
|
102 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
103 |
-
<br />
|
104 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
105 |
-
<?php endif; ?>
|
106 |
-
<?php endif; ?>
|
107 |
-
<?php endif; ?>
|
108 |
-
|
109 |
-
|
110 |
-
<?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
111 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
112 |
-
<br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
|
113 |
-
<?php endif; ?>
|
114 |
-
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
115 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
|
116 |
-
<?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
117 |
-
<?php else: ?>
|
118 |
-
<?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
119 |
-
<?php endif; ?>
|
120 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
121 |
-
<br />
|
122 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
|
123 |
-
<small>
|
124 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
125 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
126 |
-
<?php endforeach; ?>
|
127 |
-
</small>
|
128 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
129 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
130 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
131 |
-
<?php endforeach; ?>
|
132 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
|
133 |
-
<small>
|
134 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
135 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
136 |
-
<?php endforeach; ?>
|
137 |
-
</small>
|
138 |
-
<?php endif; ?>
|
139 |
-
|
140 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
141 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
142 |
-
<?php endif; ?>
|
143 |
-
<?php endif; ?>
|
144 |
-
<?php endif; ?>
|
145 |
-
<?php
|
146 |
-
if (isset($promotions_data_array['items'][$_item->getQuoteItemId()])&&(int)$promotions_data_array['items'][$_item->getQuoteItemId()]['basketlevel']==0&&(float)$promotions_data_array['items'][$_item->getQuoteItemId()]['discount']>0){
|
147 |
-
echo '<div class="cart_inline_item_new_price">'.Mage::helper('qixol')->__("Discount:-").$this->getOrder()->formatPrice($promotions_data_array['items'][$_item->getQuoteItemId()]['discount'])."<div>";
|
148 |
-
}
|
149 |
-
?>
|
150 |
-
|
151 |
-
</td>
|
152 |
-
</tr>
|
153 |
-
<?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
|
154 |
-
<tr>
|
155 |
-
<td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
|
156 |
-
<strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
|
157 |
-
<?php echo $this->__('From:'); ?> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?><br />
|
158 |
-
<?php echo $this->__('To:'); ?> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?><br />
|
159 |
-
<strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
|
160 |
-
</td>
|
161 |
-
</tr>
|
162 |
-
<?php endif; ?>
|
163 |
-
</tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/email/items.phtml
DELETED
@@ -1,138 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
|
28 |
-
<?php $_order = $this->getOrder(); ?>
|
29 |
-
|
30 |
-
<?php if ($_order): ?>
|
31 |
-
<?php
|
32 |
-
$promotions_raw=$_order->getPromotionDataApplied();
|
33 |
-
if(strlen($promotions_raw)>3){
|
34 |
-
$promotions_data_array=unserialize($promotions_raw);
|
35 |
-
}
|
36 |
-
?>
|
37 |
-
<?php $_items = $_order->getAllItems(); ?>
|
38 |
-
<?php $_itemCount = count($_items); ?>
|
39 |
-
<tr>
|
40 |
-
<td>
|
41 |
-
<table class="items" cellpadding="0" cellspacing="0" border="0">
|
42 |
-
<thead>
|
43 |
-
<tr>
|
44 |
-
<th class="cell-name">
|
45 |
-
<?php if($_itemCount > 1): ?>
|
46 |
-
<?php echo $this->__('Items in your order'); ?>
|
47 |
-
<?php else: ?>
|
48 |
-
<?php echo $this->__('Item in your order'); ?>
|
49 |
-
<?php endif; ?>
|
50 |
-
</th>
|
51 |
-
<th class="cell-name align-center">
|
52 |
-
<?php echo $this->__('Qty'); ?>
|
53 |
-
</th>
|
54 |
-
<th class="cell-name align-right">
|
55 |
-
<?php echo $this->__('Price'); ?>
|
56 |
-
</th>
|
57 |
-
</tr>
|
58 |
-
</thead>
|
59 |
-
<?php $i=0; foreach ($_order->getAllItems() as $_item): ?>
|
60 |
-
<?php if($_item->getParentItem()) continue; else $i++; ?>
|
61 |
-
<?php echo $this->getItemHtml($_item) ?>
|
62 |
-
<?php endforeach; ?>
|
63 |
-
<?php
|
64 |
-
if (is_array($promotions_data_array['promotion_summary'])&&count($promotions_data_array['promotion_summary'])>0){
|
65 |
-
foreach ($promotions_data_array['promotion_summary'] as $inline_cart_promotion){
|
66 |
-
if($inline_cart_promotion['data']['basketlevel']>0||$inline_cart_promotion['data']['type']=='ISSUEPOINTS'){
|
67 |
-
?>
|
68 |
-
<tbody>
|
69 |
-
<tr class='promotion_cart_inline_box'>
|
70 |
-
<td class="product-cart-info" colspan='1'><?php echo $inline_cart_promotion['data']['display_text']; ?></td>
|
71 |
-
<td class="product-cart-total" colspan='2' style="text-align:right;"><?php
|
72 |
-
switch ($inline_cart_promotion['data']['type']){
|
73 |
-
case 'DELIVERYREDUCTION';
|
74 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
75 |
-
break;
|
76 |
-
case 'ISSUEPOINTS';
|
77 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
78 |
-
break;
|
79 |
-
case 'BASKETREDUCTION';
|
80 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
81 |
-
break;
|
82 |
-
}
|
83 |
-
?></td>
|
84 |
-
</tr>
|
85 |
-
</tbody>
|
86 |
-
<?
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
?>
|
91 |
-
</table>
|
92 |
-
</td>
|
93 |
-
</tr>
|
94 |
-
<tr>
|
95 |
-
<td>
|
96 |
-
<?php echo $this->getChildHtml('order_totals') ?>
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
<?php if ($this->helper('giftmessage/message')->isMessagesAvailable('order', $_order, $_order->getStore()) && $_order->getGiftMessageId()): ?>
|
100 |
-
<?php $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId()); ?>
|
101 |
-
<?php if ($_giftMessage): ?>
|
102 |
-
<br />
|
103 |
-
<table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #EAEAEA;">
|
104 |
-
<thead>
|
105 |
-
<tr>
|
106 |
-
<th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><strong><?php echo $this->__('Gift Message for this Order') ?></strong></th>
|
107 |
-
</tr>
|
108 |
-
</thead>
|
109 |
-
|
110 |
-
<tbody>
|
111 |
-
|
112 |
-
<tr>
|
113 |
-
<td colspan="4" align="left" style="padding:3px 9px">
|
114 |
-
<strong><?php echo $this->__('From:'); ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?>
|
115 |
-
<br /><strong><?php echo $this->__('To:'); ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
|
116 |
-
<br /><strong><?php echo $this->__('Message:'); ?></strong><br /> <?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
|
117 |
-
</td>
|
118 |
-
</tr>
|
119 |
-
</tbody>
|
120 |
-
</table>
|
121 |
-
<?php endif; ?>
|
122 |
-
<?php endif; ?>
|
123 |
-
<?php $_history = $_order->getVisibleStatusHistory() ?>
|
124 |
-
<?php if (count($_history)): ?>
|
125 |
-
<tr>
|
126 |
-
<td>
|
127 |
-
<div class="order-additional order-comments">
|
128 |
-
<dl class="order-about">
|
129 |
-
<?php foreach ($_history as $_historyItem): ?>
|
130 |
-
<dt><?php echo $this->formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?></dt>
|
131 |
-
<dd><?php echo $this->escapeHtml($_historyItem->getComment()) ?></dd>
|
132 |
-
<?php endforeach; ?>
|
133 |
-
</dl>
|
134 |
-
</div>
|
135 |
-
</td>
|
136 |
-
</tr>
|
137 |
-
<?php endif; ?>
|
138 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/invoice/default.phtml
DELETED
@@ -1,328 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_item = $this->getItem() ?>
|
28 |
-
<?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
|
29 |
-
<tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
|
30 |
-
<td><h4 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h4>
|
31 |
-
<?php if ($_options = $this->getItemOptions()): ?>
|
32 |
-
<dl class="item-options">
|
33 |
-
<?php foreach ($_options as $_option) : ?>
|
34 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
35 |
-
<?php if (!$this->getPrintStatus()): ?>
|
36 |
-
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
37 |
-
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
|
38 |
-
<?php echo $_formatedOptionValue['value'] ?>
|
39 |
-
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
40 |
-
<div class="truncated_full_value">
|
41 |
-
<dl class="item-options">
|
42 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
43 |
-
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
44 |
-
</dl>
|
45 |
-
</div>
|
46 |
-
<?php endif; ?>
|
47 |
-
</dd>
|
48 |
-
<?php else: ?>
|
49 |
-
<dd><?php echo $this->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
|
50 |
-
<?php endif; ?>
|
51 |
-
<?php endforeach; ?>
|
52 |
-
</dl>
|
53 |
-
<?php endif; ?>
|
54 |
-
<?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
55 |
-
<?php if ($addInfoBlock) : ?>
|
56 |
-
<?php echo $addInfoBlock->setItem($_item->getOrderItem())->toHtml(); ?>
|
57 |
-
<?php endif; ?>
|
58 |
-
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
59 |
-
<?php if ($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?>
|
60 |
-
<a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link"
|
61 |
-
onclick="return giftMessageToogle('<?php echo $_item->getId() ?>')"><?php echo $this->__('Gift Message') ?></a>
|
62 |
-
<?php endif; ?>
|
63 |
-
</td>
|
64 |
-
<td><?php echo $this->escapeHtml(Mage::helper('core/string')->splitInjection($this->getSku())) ?></td>
|
65 |
-
<td class="a-right">
|
66 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
67 |
-
<span class="price-excl-tax">
|
68 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
69 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
70 |
-
<span class="cart-price">
|
71 |
-
<?php endif; ?>
|
72 |
-
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
73 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
74 |
-
</span>
|
75 |
-
<?php endif; ?>
|
76 |
-
<?php endif; ?>
|
77 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
78 |
-
<span class="cart-tax-total"
|
79 |
-
onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
80 |
-
<?php else: ?>
|
81 |
-
<span class="cart-price">
|
82 |
-
<?php endif; ?>
|
83 |
-
|
84 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
85 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?>
|
86 |
-
<?php else: ?>
|
87 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
|
88 |
-
<?php endif; ?>
|
89 |
-
|
90 |
-
</span>
|
91 |
-
|
92 |
-
|
93 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
94 |
-
|
95 |
-
<span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>"
|
96 |
-
style="display:none;">
|
97 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
98 |
-
<small>
|
99 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
100 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
101 |
-
: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
102 |
-
<?php endforeach; ?>
|
103 |
-
</small>
|
104 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
105 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
106 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>
|
107 |
-
: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></small></span>
|
108 |
-
<?php endforeach; ?>
|
109 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
110 |
-
<small>
|
111 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
112 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
113 |
-
: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
114 |
-
<?php endforeach; ?>
|
115 |
-
</small>
|
116 |
-
<?php endif; ?>
|
117 |
-
</span>
|
118 |
-
|
119 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
120 |
-
<span class="cart-tax-total"
|
121 |
-
onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
122 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>
|
123 |
-
:<br/> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?></span>
|
124 |
-
</span>
|
125 |
-
<?php endif; ?>
|
126 |
-
<?php endif; ?>
|
127 |
-
</span>
|
128 |
-
<br/>
|
129 |
-
<?php endif; ?>
|
130 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
131 |
-
<span class="price-incl-tax">
|
132 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
133 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
134 |
-
<span class="cart-price">
|
135 |
-
<?php endif; ?>
|
136 |
-
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
137 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
138 |
-
</span>
|
139 |
-
<?php endif; ?>
|
140 |
-
<?php endif; ?>
|
141 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
|
142 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
143 |
-
<span class="cart-tax-total"
|
144 |
-
onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
145 |
-
<?php else: ?>
|
146 |
-
<span class="cart-price">
|
147 |
-
<?php endif; ?>
|
148 |
-
|
149 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
150 |
-
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
151 |
-
<?php else: ?>
|
152 |
-
<?php echo $this->getOrder()->formatPrice($_incl - $this->getItem()->getWeeeTaxDisposition()) ?>
|
153 |
-
<?php endif; ?>
|
154 |
-
|
155 |
-
</span>
|
156 |
-
|
157 |
-
|
158 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
159 |
-
|
160 |
-
<span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>"
|
161 |
-
style="display:none;">
|
162 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
163 |
-
<small>
|
164 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
165 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
166 |
-
: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
167 |
-
<?php endforeach; ?>
|
168 |
-
</small>
|
169 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
170 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
171 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>
|
172 |
-
: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
|
173 |
-
<?php endforeach; ?>
|
174 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
175 |
-
<small>
|
176 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
177 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
178 |
-
: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
179 |
-
<?php endforeach; ?>
|
180 |
-
</small>
|
181 |
-
<?php endif; ?>
|
182 |
-
</span>
|
183 |
-
|
184 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
185 |
-
<span class="cart-tax-total"
|
186 |
-
onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
187 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>
|
188 |
-
:<br/> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
189 |
-
</span>
|
190 |
-
<?php endif; ?>
|
191 |
-
<?php endif; ?>
|
192 |
-
</span>
|
193 |
-
<?php endif; ?>
|
194 |
-
</td>
|
195 |
-
<td class="a-center"><?php echo $_item->getQty() * 1 ?> </td>
|
196 |
-
<td class="a-right">
|
197 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
198 |
-
<span class="price-excl-tax">
|
199 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
200 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
201 |
-
<span class="cart-price">
|
202 |
-
<?php endif; ?>
|
203 |
-
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
204 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
205 |
-
</span>
|
206 |
-
<?php endif; ?>
|
207 |
-
<?php endif; ?>
|
208 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
209 |
-
<span class="cart-tax-total"
|
210 |
-
onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
211 |
-
<?php else: ?>
|
212 |
-
<span class="cart-price">
|
213 |
-
<?php endif; ?>
|
214 |
-
|
215 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
216 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal() + $this->getItem()->getWeeeTaxAppliedRowAmount() + $this->getItem()->getWeeeTaxRowDisposition()); ?>
|
217 |
-
<?php else: ?>
|
218 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
|
219 |
-
<?php endif; ?>
|
220 |
-
|
221 |
-
</span>
|
222 |
-
|
223 |
-
|
224 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
225 |
-
|
226 |
-
<span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>"
|
227 |
-
style="display:none;">
|
228 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
229 |
-
<small>
|
230 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
231 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
232 |
-
: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
233 |
-
<?php endforeach; ?>
|
234 |
-
</small>
|
235 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
236 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
237 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>
|
238 |
-
: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></small></span>
|
239 |
-
<?php endforeach; ?>
|
240 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
241 |
-
<small>
|
242 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
243 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
244 |
-
: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
245 |
-
<?php endforeach; ?>
|
246 |
-
</small>
|
247 |
-
<?php endif; ?>
|
248 |
-
</span>
|
249 |
-
|
250 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
251 |
-
<span class="cart-tax-total"
|
252 |
-
onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
253 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>
|
254 |
-
:<br/> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal() + $this->getItem()->getWeeeTaxAppliedRowAmount() + $this->getItem()->getWeeeTaxRowDisposition()); ?></span>
|
255 |
-
</span>
|
256 |
-
<?php endif; ?>
|
257 |
-
<?php endif; ?>
|
258 |
-
</span>
|
259 |
-
<br/>
|
260 |
-
<?php endif; ?>
|
261 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
262 |
-
<span class="price-incl-tax">
|
263 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
264 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
265 |
-
<span class="cart-price">
|
266 |
-
<?php endif; ?>
|
267 |
-
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
268 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
269 |
-
</span>
|
270 |
-
<?php endif; ?>
|
271 |
-
<?php endif; ?>
|
272 |
-
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
|
273 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
274 |
-
<span class="cart-tax-total"
|
275 |
-
onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
276 |
-
<?php else: ?>
|
277 |
-
<span class="cart-price">
|
278 |
-
<?php endif; ?>
|
279 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
280 |
-
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
281 |
-
<?php else: ?>
|
282 |
-
<?php echo $this->getOrder()->formatPrice($_incl - $this->getItem()->getWeeeTaxRowDisposition()) ?>
|
283 |
-
<?php endif; ?>
|
284 |
-
|
285 |
-
</span>
|
286 |
-
|
287 |
-
|
288 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
289 |
-
|
290 |
-
<span class="cart-tax-info" id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>"
|
291 |
-
style="display:none;">
|
292 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
293 |
-
<small>
|
294 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
295 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
296 |
-
: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
297 |
-
<?php endforeach; ?>
|
298 |
-
</small>
|
299 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
300 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
301 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>
|
302 |
-
: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
|
303 |
-
<?php endforeach; ?>
|
304 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
305 |
-
<small>
|
306 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
307 |
-
<span class="nobr"><?php echo $tax['title']; ?>
|
308 |
-
: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
309 |
-
<?php endforeach; ?>
|
310 |
-
</small>
|
311 |
-
<?php endif; ?>
|
312 |
-
</span>
|
313 |
-
|
314 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
315 |
-
<span class="cart-tax-total"
|
316 |
-
onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
317 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>
|
318 |
-
:<br/> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
319 |
-
</span>
|
320 |
-
<?php endif; ?>
|
321 |
-
<?php endif; ?>
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
</span>
|
326 |
-
<?php endif; ?>
|
327 |
-
</td>
|
328 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/invoice/invoice.phtml
DELETED
@@ -1,128 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_order = $this->getOrder() ?>
|
28 |
-
<?php
|
29 |
-
$promotions_raw=$_order->getPromotionDataApplied();
|
30 |
-
if(strlen($promotions_raw)>3){
|
31 |
-
$promotions_data_array=unserialize($promotions_raw);
|
32 |
-
}
|
33 |
-
?>
|
34 |
-
<h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
|
35 |
-
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
|
36 |
-
<?php $_invoice = $this->getInvoice() ?>
|
37 |
-
<?php if($_invoice): ?>
|
38 |
-
<?php $_invoices = array($_invoice); ?>
|
39 |
-
<?php else: ?>
|
40 |
-
<?php $_invoices = $_order->getInvoiceCollection() ?>
|
41 |
-
<?php endif; ?>
|
42 |
-
<?php foreach ($_invoices as $_invoice): ?>
|
43 |
-
<h2 class="h2"><?php echo $this->__('Invoice #%s', $_invoice->getIncrementId()) ?></h2>
|
44 |
-
<div class="col2-set">
|
45 |
-
<div class="col-1">
|
46 |
-
<?php if (!$_order->getIsVirtual()): ?>
|
47 |
-
<h3><?php echo $this->__('Shipping Address') ?></h3>
|
48 |
-
<?php $_shipping = $_invoice->getShippingAddress() ?>
|
49 |
-
<address><?php echo $_shipping->format('html') ?></address>
|
50 |
-
</div>
|
51 |
-
<div class="col-2">
|
52 |
-
<?php endif; ?>
|
53 |
-
<h3><?php echo $this->__('Billing Address') ?></h3>
|
54 |
-
<?php $_billing = $_invoice->getbillingAddress() ?>
|
55 |
-
<address><?php echo $_order->getBillingAddress()->format('html') ?></address>
|
56 |
-
</div>
|
57 |
-
<?php if (!$_order->getIsVirtual()): ?>
|
58 |
-
</div>
|
59 |
-
<div class="col2-set">
|
60 |
-
<div class="col-1">
|
61 |
-
<h3><?php echo $this->__('Shipping Method') ?></h3>
|
62 |
-
<?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
|
63 |
-
</div>
|
64 |
-
<?php endif; ?>
|
65 |
-
<div class="col-2">
|
66 |
-
<h3><?php echo $this->__('Payment Method') ?></h3>
|
67 |
-
<?php echo $this->getPaymentInfoHtml() ?>
|
68 |
-
</div>
|
69 |
-
</div>
|
70 |
-
<h3><?php echo $this->__('Items Invoiced') ?></h3>
|
71 |
-
<table class="data-table" id="my-invoice-table-<?php echo $_invoice->getId(); ?>">
|
72 |
-
<col />
|
73 |
-
<col width="1" />
|
74 |
-
<col width="1" />
|
75 |
-
<col width="1" />
|
76 |
-
<col width="1" />
|
77 |
-
<thead>
|
78 |
-
<tr>
|
79 |
-
<th><?php echo $this->__('Product Name') ?></th>
|
80 |
-
<th><?php echo $this->__('SKU') ?></th>
|
81 |
-
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
82 |
-
<th class="a-center"><span class="nobr"><?php echo $this->__('Qty Invoiced') ?></span></th>
|
83 |
-
<th class="a-right"><?php echo $this->__('Subtotal') ?></th>
|
84 |
-
</tr>
|
85 |
-
</thead>
|
86 |
-
<tfoot>
|
87 |
-
<?php echo $this->getInvoiceTotalsHtml($_invoice)?>
|
88 |
-
</tfoot>
|
89 |
-
<?php $_items = $_invoice->getItemsCollection(); ?>
|
90 |
-
<?php $_count = $_items->count(); ?>
|
91 |
-
<?php foreach ($_items as $_item): ?>
|
92 |
-
<?php if ($_item->getOrderItem()->getParentItem()) continue; ?>
|
93 |
-
<tbody>
|
94 |
-
<?php echo $this->getItemHtml($_item) ?>
|
95 |
-
</tbody>
|
96 |
-
<?php endforeach; ?>
|
97 |
-
<?php
|
98 |
-
if (is_array($promotions_data_array['promotion_summary'])&&count($promotions_data_array['promotion_summary'])>0){
|
99 |
-
foreach ($promotions_data_array['promotion_summary'] as $inline_cart_promotion){
|
100 |
-
if($inline_cart_promotion['data']['basketlevel']>0||$inline_cart_promotion['data']['type']=='ISSUEPOINTS'){
|
101 |
-
?>
|
102 |
-
<tbody>
|
103 |
-
<tr class='promotion_cart_inline_box'>
|
104 |
-
<td class="product-cart-info" colspan='1'><?php echo $inline_cart_promotion['data']['display_text']; ?></td>
|
105 |
-
<td class="product-cart-total" colspan='2' style="text-align:right;"><?php
|
106 |
-
switch ($inline_cart_promotion['data']['type']){
|
107 |
-
case 'DELIVERYREDUCTION';
|
108 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
109 |
-
break;
|
110 |
-
case 'ISSUEPOINTS';
|
111 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
112 |
-
break;
|
113 |
-
case 'BASKETREDUCTION';
|
114 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
115 |
-
break;
|
116 |
-
}
|
117 |
-
?></td>
|
118 |
-
</tr>
|
119 |
-
</tbody>
|
120 |
-
<?
|
121 |
-
}
|
122 |
-
}
|
123 |
-
}
|
124 |
-
?>
|
125 |
-
</table>
|
126 |
-
<script type="text/javascript">decorateTable('my-invoice-table-<?php echo $_invoice->getId(); ?>', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
127 |
-
<?php endforeach; ?>
|
128 |
-
<script type="text/javascript">window.print();</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/items/default.phtml
DELETED
@@ -1,347 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_item = $this->getItem() ?>
|
28 |
-
<?php
|
29 |
-
$promotions_raw=$_item->getOrder()->getPromotionDataApplied();
|
30 |
-
if(strlen($promotions_raw)>3){
|
31 |
-
$promotions_data_array=unserialize($promotions_raw);
|
32 |
-
}
|
33 |
-
?>
|
34 |
-
<tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
|
35 |
-
<td><h3 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h3>
|
36 |
-
<?php if($_options = $this->getItemOptions()): ?>
|
37 |
-
<dl class="item-options">
|
38 |
-
<?php foreach ($_options as $_option) : ?>
|
39 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
40 |
-
<?php if (!$this->getPrintStatus()): ?>
|
41 |
-
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
42 |
-
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
|
43 |
-
<?php echo $_formatedOptionValue['value'] ?>
|
44 |
-
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
45 |
-
<div class="truncated_full_value">
|
46 |
-
<dl class="item-options">
|
47 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
48 |
-
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
49 |
-
</dl>
|
50 |
-
</div>
|
51 |
-
<?php endif; ?>
|
52 |
-
</dd>
|
53 |
-
<?php else: ?>
|
54 |
-
<dd>
|
55 |
-
<?php echo nl2br($this->escapeHtml( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) )) ?>
|
56 |
-
</dd>
|
57 |
-
<?php endif; ?>
|
58 |
-
<?php endforeach; ?>
|
59 |
-
</dl>
|
60 |
-
<?php endif; ?>
|
61 |
-
<?php
|
62 |
-
//{ qixol
|
63 |
-
//maybe should be redeveloped as additional.product.info template block
|
64 |
-
if (isset($promotions_data_array['items'][$_item->getQuoteItemId()]['promotions'])){
|
65 |
-
foreach ($promotions_data_array['items'][$_item->getQuoteItemId()]['promotions'] as $promotion_data){
|
66 |
-
if ($promotion_data['description']!=''){
|
67 |
-
echo "<span class='cart_inline_item_new_price'>".$this->escapeHtml($promotion_data['description'])."</span><br>";
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
}
|
72 |
-
// } end qixol
|
73 |
-
?>
|
74 |
-
<?php $addtInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
75 |
-
<?php if ($addtInfoBlock) :?>
|
76 |
-
<?php echo $addtInfoBlock->setItem($_item)->toHtml(); ?>
|
77 |
-
<?php endif; ?>
|
78 |
-
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
79 |
-
<?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
|
80 |
-
<a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>')"><?php echo $this->__('Gift Message') ?></a>
|
81 |
-
<?php endif; ?>
|
82 |
-
</td>
|
83 |
-
<td><?php echo $this->escapeHtml(Mage::helper('core/string')->splitInjection($this->getSku())) ?></td>
|
84 |
-
<td class="a-right">
|
85 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
86 |
-
<span class="price-excl-tax">
|
87 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
88 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
89 |
-
<span class="cart-price">
|
90 |
-
<?php endif; ?>
|
91 |
-
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
92 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
93 |
-
</span>
|
94 |
-
<?php endif; ?>
|
95 |
-
<?php endif; ?>
|
96 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
97 |
-
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
98 |
-
<?php else: ?>
|
99 |
-
<span class="cart-price">
|
100 |
-
<?php endif; ?>
|
101 |
-
|
102 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
103 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?>
|
104 |
-
<?php else: ?>
|
105 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
|
106 |
-
<?php endif; ?>
|
107 |
-
|
108 |
-
</span>
|
109 |
-
|
110 |
-
|
111 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
112 |
-
|
113 |
-
<span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
114 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
115 |
-
<small>
|
116 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
117 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
118 |
-
<?php endforeach; ?>
|
119 |
-
</small>
|
120 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
121 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
122 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></small></span>
|
123 |
-
<?php endforeach; ?>
|
124 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
125 |
-
<small>
|
126 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
127 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
128 |
-
<?php endforeach; ?>
|
129 |
-
</small>
|
130 |
-
<?php endif; ?>
|
131 |
-
</span>
|
132 |
-
|
133 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
134 |
-
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
135 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?></span>
|
136 |
-
</span>
|
137 |
-
<?php endif; ?>
|
138 |
-
<?php endif; ?>
|
139 |
-
</span>
|
140 |
-
<br />
|
141 |
-
<?php endif; ?>
|
142 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
143 |
-
<span class="price-incl-tax">
|
144 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
145 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
146 |
-
<span class="cart-price">
|
147 |
-
<?php endif; ?>
|
148 |
-
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
149 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
150 |
-
</span>
|
151 |
-
<?php endif; ?>
|
152 |
-
<?php endif; ?>
|
153 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
|
154 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
155 |
-
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
156 |
-
<?php else: ?>
|
157 |
-
<span class="cart-price">
|
158 |
-
<?php endif; ?>
|
159 |
-
|
160 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
161 |
-
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
162 |
-
<?php else: ?>
|
163 |
-
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
|
164 |
-
<?php endif; ?>
|
165 |
-
|
166 |
-
</span>
|
167 |
-
|
168 |
-
|
169 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
170 |
-
|
171 |
-
<span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
172 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
173 |
-
<small>
|
174 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
175 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
176 |
-
<?php endforeach; ?>
|
177 |
-
</small>
|
178 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
179 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
180 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
|
181 |
-
<?php endforeach; ?>
|
182 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
183 |
-
<small>
|
184 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
185 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
186 |
-
<?php endforeach; ?>
|
187 |
-
</small>
|
188 |
-
<?php endif; ?>
|
189 |
-
</span>
|
190 |
-
|
191 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
192 |
-
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
193 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
194 |
-
</span>
|
195 |
-
<?php endif; ?>
|
196 |
-
<?php endif; ?>
|
197 |
-
</span>
|
198 |
-
<?php endif; ?>
|
199 |
-
</td>
|
200 |
-
<td class="a-right">
|
201 |
-
<span class="nobr">
|
202 |
-
<?php if ($this->getItem()->getQtyOrdered() > 0): ?>
|
203 |
-
<?php echo $this->__('Ordered'); ?>: <strong><?php echo $this->getItem()->getQtyOrdered()*1 ?></strong><br />
|
204 |
-
<?php endif; ?>
|
205 |
-
<?php if ($this->getItem()->getQtyShipped() > 0): ?>
|
206 |
-
<?php echo $this->__('Shipped'); ?>: <strong><?php echo $this->getItem()->getQtyShipped()*1 ?></strong><br />
|
207 |
-
<?php endif; ?>
|
208 |
-
<?php if ($this->getItem()->getQtyCanceled() > 0): ?>
|
209 |
-
<?php echo $this->__('Canceled'); ?>: <strong><?php echo $this->getItem()->getQtyCanceled()*1 ?></strong><br />
|
210 |
-
<?php endif; ?>
|
211 |
-
<?php if ($this->getItem()->getQtyRefunded() > 0): ?>
|
212 |
-
<?php echo $this->__('Refunded'); ?>: <strong><?php echo $this->getItem()->getQtyRefunded()*1 ?></strong><br />
|
213 |
-
<?php endif; ?>
|
214 |
-
</span>
|
215 |
-
</td>
|
216 |
-
<td class="a-right">
|
217 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
218 |
-
<span class="price-excl-tax">
|
219 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
220 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
221 |
-
<span class="cart-price">
|
222 |
-
<?php endif; ?>
|
223 |
-
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
224 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
225 |
-
</span>
|
226 |
-
<?php endif; ?>
|
227 |
-
<?php endif; ?>
|
228 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
229 |
-
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
230 |
-
<?php else: ?>
|
231 |
-
<span class="cart-price">
|
232 |
-
<?php endif; ?>
|
233 |
-
|
234 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
235 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
|
236 |
-
<?php else: ?>
|
237 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
|
238 |
-
<?php endif; ?>
|
239 |
-
|
240 |
-
</span>
|
241 |
-
|
242 |
-
|
243 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
244 |
-
|
245 |
-
<span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
246 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
247 |
-
<small>
|
248 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
249 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
250 |
-
<?php endforeach; ?>
|
251 |
-
</small>
|
252 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
253 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
254 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></small></span>
|
255 |
-
<?php endforeach; ?>
|
256 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
257 |
-
<small>
|
258 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
259 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
260 |
-
<?php endforeach; ?>
|
261 |
-
</small>
|
262 |
-
<?php endif; ?>
|
263 |
-
</span>
|
264 |
-
|
265 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
266 |
-
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
267 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?></span>
|
268 |
-
</span>
|
269 |
-
<?php endif; ?>
|
270 |
-
<?php endif; ?>
|
271 |
-
</span>
|
272 |
-
<br />
|
273 |
-
<?php endif; ?>
|
274 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
275 |
-
<span class="price-incl-tax">
|
276 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
277 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
278 |
-
<span class="cart-price">
|
279 |
-
<?php endif; ?>
|
280 |
-
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
281 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
282 |
-
</span>
|
283 |
-
<?php endif; ?>
|
284 |
-
<?php endif; ?>
|
285 |
-
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
|
286 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
287 |
-
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
288 |
-
<?php else: ?>
|
289 |
-
<span class="cart-price">
|
290 |
-
<?php endif; ?>
|
291 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
292 |
-
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
293 |
-
<?php else: ?>
|
294 |
-
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?>
|
295 |
-
<?php endif; ?>
|
296 |
-
|
297 |
-
</span>
|
298 |
-
|
299 |
-
|
300 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
301 |
-
|
302 |
-
<span class="cart-tax-info" id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
303 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
304 |
-
<small>
|
305 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
306 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
307 |
-
<?php endforeach; ?>
|
308 |
-
</small>
|
309 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
310 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
311 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
|
312 |
-
<?php endforeach; ?>
|
313 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
314 |
-
<small>
|
315 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
316 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
317 |
-
<?php endforeach; ?>
|
318 |
-
</small>
|
319 |
-
<?php endif; ?>
|
320 |
-
</span>
|
321 |
-
|
322 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
323 |
-
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
324 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
325 |
-
</span>
|
326 |
-
<?php endif; ?>
|
327 |
-
<?php endif; ?>
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
</span>
|
332 |
-
<?php endif; ?>
|
333 |
-
<?php
|
334 |
-
if (isset($promotions_data_array['items'][$_item->getQuoteItemId()])&&(int)$promotions_data_array['items'][$_item->getQuoteItemId()]['basketlevel']==0&&(float)$promotions_data_array['items'][$_item->getQuoteItemId()]['discount']>0){
|
335 |
-
echo '<div class="cart_inline_item_new_price">'.Mage::helper('qixol')->__("Discount:-").$this->getOrder()->formatPrice($promotions_data_array['items'][$_item->getQuoteItemId()]['discount'])."<div>";
|
336 |
-
}
|
337 |
-
?>
|
338 |
-
</td>
|
339 |
-
<!--
|
340 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
341 |
-
<th class="a-right"><?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?></th>
|
342 |
-
<?php endif; ?>
|
343 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
344 |
-
<th class="a-right"><?php echo $this->getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($this->getItem())); ?></th>
|
345 |
-
<?php endif; ?>
|
346 |
-
-->
|
347 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/items/items.phtml
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_order = $this->getOrder(); ?>
|
28 |
-
<?php
|
29 |
-
$promotions_raw=$_order->getPromotionDataApplied();
|
30 |
-
if(strlen($promotions_raw)>3){
|
31 |
-
$promotions_data_array=unserialize($promotions_raw);
|
32 |
-
}
|
33 |
-
?>
|
34 |
-
<table class="data-table" id="my-orders-table" summary="<?php echo Mage::helper('core')->quoteEscape($this->__('Items Ordered')) ?>">
|
35 |
-
<col />
|
36 |
-
<col width="1" />
|
37 |
-
<col width="1" />
|
38 |
-
<col width="1" />
|
39 |
-
<col width="1" />
|
40 |
-
<thead>
|
41 |
-
<tr>
|
42 |
-
<th><?php echo $this->__('Product Name') ?></th>
|
43 |
-
<th><?php echo $this->__('SKU') ?></th>
|
44 |
-
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
45 |
-
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
46 |
-
<th class="a-right"><?php echo $this->__('Subtotal') ?></th>
|
47 |
-
</tr>
|
48 |
-
</thead>
|
49 |
-
<tfoot>
|
50 |
-
<?php echo $this->getChildHtml('order_totals') ?>
|
51 |
-
</tfoot>
|
52 |
-
<?php $_items = $_order->getItemsCollection(); ?>
|
53 |
-
<?php $_index = 0; ?>
|
54 |
-
<?php $_count = $_items->count(); ?>
|
55 |
-
<?php foreach ($_items as $_item): ?>
|
56 |
-
<?php if ($_item->getParentItem()) continue; ?>
|
57 |
-
<tbody>
|
58 |
-
<?php echo $this->getItemHtml($_item) ?>
|
59 |
-
<?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
|
60 |
-
<tr class="border<?php echo ($_index++ > $_count ?' last':'') ?>" id="order-item-gift-message-<?php echo $_item->getId() ?>" style="display:none;">
|
61 |
-
<?php $_giftMessage=$this->helper('giftmessage/message')->getGiftMessageForEntity($_item); ?>
|
62 |
-
<td class="gift-message-row" colspan="7">
|
63 |
-
<a href="#" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Close')) ?>" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>');" class="btn-close"><?php echo $this->__('Close') ?></a>
|
64 |
-
<dl class="gift-message">
|
65 |
-
<dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?></dt>
|
66 |
-
<dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?></dt>
|
67 |
-
<dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_item) ?></dd>
|
68 |
-
</dl>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
<?php endif ?>
|
72 |
-
</tbody>
|
73 |
-
<?php endforeach; ?>
|
74 |
-
<?php
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
if (is_array($promotions_data_array['promotion_summary'])&&count($promotions_data_array['promotion_summary'])>0){
|
80 |
-
foreach ($promotions_data_array['promotion_summary'] as $inline_cart_promotion){
|
81 |
-
if($inline_cart_promotion['data']['basketlevel']>0||$inline_cart_promotion['data']['type']=='ISSUEPOINTS'){
|
82 |
-
?>
|
83 |
-
<tbody>
|
84 |
-
<tr class='promotion_cart_inline_box'>
|
85 |
-
<td class="product-cart-info" colspan='3'><?php echo $inline_cart_promotion['data']['display_text']; ?></td>
|
86 |
-
<td class="product-cart-total" colspan='2' style="text-align:right;"><?php
|
87 |
-
switch ($inline_cart_promotion['data']['type']){
|
88 |
-
case 'DELIVERYREDUCTION';
|
89 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
90 |
-
break;
|
91 |
-
case 'ISSUEPOINTS';
|
92 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
93 |
-
break;
|
94 |
-
case 'BASKETREDUCTION';
|
95 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
96 |
-
break;
|
97 |
-
}
|
98 |
-
?></td>
|
99 |
-
</tr>
|
100 |
-
</tbody>
|
101 |
-
<?
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
?>
|
107 |
-
|
108 |
-
</table>
|
109 |
-
<script type="text/javascript">decorateTable('my-orders-table', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/print/default.phtml
DELETED
@@ -1,347 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_item = $this->getItem() ?>
|
28 |
-
<?php
|
29 |
-
$promotions_raw=$_item->getOrder()->getPromotionDataApplied();
|
30 |
-
if(strlen($promotions_raw)>3){
|
31 |
-
$promotions_data_array=unserialize($promotions_raw);
|
32 |
-
}
|
33 |
-
?>
|
34 |
-
<tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
|
35 |
-
<td><h3 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h3>
|
36 |
-
<?php if($_options = $this->getItemOptions()): ?>
|
37 |
-
<dl class="item-options">
|
38 |
-
<?php foreach ($_options as $_option) : ?>
|
39 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
40 |
-
<?php if (!$this->getPrintStatus()): ?>
|
41 |
-
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
42 |
-
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
|
43 |
-
<?php echo $_formatedOptionValue['value'] ?>
|
44 |
-
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
45 |
-
<div class="truncated_full_value">
|
46 |
-
<dl class="item-options">
|
47 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
48 |
-
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
49 |
-
</dl>
|
50 |
-
</div>
|
51 |
-
<?php endif; ?>
|
52 |
-
</dd>
|
53 |
-
<?php else: ?>
|
54 |
-
<dd>
|
55 |
-
<?php echo nl2br($this->escapeHtml( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) )) ?>
|
56 |
-
</dd>
|
57 |
-
<?php endif; ?>
|
58 |
-
<?php endforeach; ?>
|
59 |
-
</dl>
|
60 |
-
<?php endif; ?>
|
61 |
-
<?php $addtInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
62 |
-
<?php
|
63 |
-
//{ qixol
|
64 |
-
//maybe should be redeveloped as additional.product.info template block
|
65 |
-
if (isset($promotions_data_array['items'][$_item->getQuoteItemId()]['promotions'])){
|
66 |
-
foreach ($promotions_data_array['items'][$_item->getQuoteItemId()]['promotions'] as $promotion_data){
|
67 |
-
if ($promotion_data['description']!=''){
|
68 |
-
echo "<span class='cart_inline_item_new_price'><b>".$this->escapeHtml($promotion_data['description'])."</b></span><br>";
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
}
|
73 |
-
// } end qixol
|
74 |
-
?>
|
75 |
-
<?php if ($addtInfoBlock) :?>
|
76 |
-
<?php echo $addtInfoBlock->setItem($_item)->toHtml(); ?>
|
77 |
-
<?php endif; ?>
|
78 |
-
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
79 |
-
<?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
|
80 |
-
<a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>')"><?php echo $this->__('Gift Message') ?></a>
|
81 |
-
<?php endif; ?>
|
82 |
-
</td>
|
83 |
-
<td><?php echo $this->escapeHtml(Mage::helper('core/string')->splitInjection($this->getSku())) ?></td>
|
84 |
-
<td class="a-right">
|
85 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
86 |
-
<span class="price-excl-tax">
|
87 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
88 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
89 |
-
<span class="cart-price">
|
90 |
-
<?php endif; ?>
|
91 |
-
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
92 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
93 |
-
</span>
|
94 |
-
<?php endif; ?>
|
95 |
-
<?php endif; ?>
|
96 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
97 |
-
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
98 |
-
<?php else: ?>
|
99 |
-
<span class="cart-price">
|
100 |
-
<?php endif; ?>
|
101 |
-
|
102 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
103 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?>
|
104 |
-
<?php else: ?>
|
105 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
|
106 |
-
<?php endif; ?>
|
107 |
-
|
108 |
-
</span>
|
109 |
-
|
110 |
-
|
111 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
112 |
-
|
113 |
-
<span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
114 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
115 |
-
<small>
|
116 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
117 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
118 |
-
<?php endforeach; ?>
|
119 |
-
</small>
|
120 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
121 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
122 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></small></span>
|
123 |
-
<?php endforeach; ?>
|
124 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
125 |
-
<small>
|
126 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
127 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
128 |
-
<?php endforeach; ?>
|
129 |
-
</small>
|
130 |
-
<?php endif; ?>
|
131 |
-
</span>
|
132 |
-
|
133 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
134 |
-
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
135 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?></span>
|
136 |
-
</span>
|
137 |
-
<?php endif; ?>
|
138 |
-
<?php endif; ?>
|
139 |
-
</span>
|
140 |
-
<br />
|
141 |
-
<?php endif; ?>
|
142 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
143 |
-
<span class="price-incl-tax">
|
144 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
145 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
146 |
-
<span class="cart-price">
|
147 |
-
<?php endif; ?>
|
148 |
-
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
149 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
150 |
-
</span>
|
151 |
-
<?php endif; ?>
|
152 |
-
<?php endif; ?>
|
153 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
|
154 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
155 |
-
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
156 |
-
<?php else: ?>
|
157 |
-
<span class="cart-price">
|
158 |
-
<?php endif; ?>
|
159 |
-
|
160 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
161 |
-
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
162 |
-
<?php else: ?>
|
163 |
-
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
|
164 |
-
<?php endif; ?>
|
165 |
-
|
166 |
-
</span>
|
167 |
-
|
168 |
-
|
169 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
170 |
-
|
171 |
-
<span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
172 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
173 |
-
<small>
|
174 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
175 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
176 |
-
<?php endforeach; ?>
|
177 |
-
</small>
|
178 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
179 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
180 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
|
181 |
-
<?php endforeach; ?>
|
182 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
183 |
-
<small>
|
184 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
185 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
186 |
-
<?php endforeach; ?>
|
187 |
-
</small>
|
188 |
-
<?php endif; ?>
|
189 |
-
</span>
|
190 |
-
|
191 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
192 |
-
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
193 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
194 |
-
</span>
|
195 |
-
<?php endif; ?>
|
196 |
-
<?php endif; ?>
|
197 |
-
</span>
|
198 |
-
<?php endif; ?>
|
199 |
-
</td>
|
200 |
-
<td class="a-right">
|
201 |
-
<span class="nobr">
|
202 |
-
<?php if ($this->getItem()->getQtyOrdered() > 0): ?>
|
203 |
-
<?php echo $this->__('Ordered'); ?>: <strong><?php echo $this->getItem()->getQtyOrdered()*1 ?></strong><br />
|
204 |
-
<?php endif; ?>
|
205 |
-
<?php if ($this->getItem()->getQtyShipped() > 0): ?>
|
206 |
-
<?php echo $this->__('Shipped'); ?>: <strong><?php echo $this->getItem()->getQtyShipped()*1 ?></strong><br />
|
207 |
-
<?php endif; ?>
|
208 |
-
<?php if ($this->getItem()->getQtyCanceled() > 0): ?>
|
209 |
-
<?php echo $this->__('Canceled'); ?>: <strong><?php echo $this->getItem()->getQtyCanceled()*1 ?></strong><br />
|
210 |
-
<?php endif; ?>
|
211 |
-
<?php if ($this->getItem()->getQtyRefunded() > 0): ?>
|
212 |
-
<?php echo $this->__('Refunded'); ?>: <strong><?php echo $this->getItem()->getQtyRefunded()*1 ?></strong><br />
|
213 |
-
<?php endif; ?>
|
214 |
-
</span>
|
215 |
-
</td>
|
216 |
-
<td class="a-right">
|
217 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
218 |
-
<span class="price-excl-tax">
|
219 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
220 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
221 |
-
<span class="cart-price">
|
222 |
-
<?php endif; ?>
|
223 |
-
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
224 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
225 |
-
</span>
|
226 |
-
<?php endif; ?>
|
227 |
-
<?php endif; ?>
|
228 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
229 |
-
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
230 |
-
<?php else: ?>
|
231 |
-
<span class="cart-price">
|
232 |
-
<?php endif; ?>
|
233 |
-
|
234 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
235 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
|
236 |
-
<?php else: ?>
|
237 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
|
238 |
-
<?php endif; ?>
|
239 |
-
|
240 |
-
</span>
|
241 |
-
|
242 |
-
|
243 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
244 |
-
|
245 |
-
<span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
246 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
247 |
-
<small>
|
248 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
249 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
250 |
-
<?php endforeach; ?>
|
251 |
-
</small>
|
252 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
253 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
254 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></small></span>
|
255 |
-
<?php endforeach; ?>
|
256 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
257 |
-
<small>
|
258 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
259 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
260 |
-
<?php endforeach; ?>
|
261 |
-
</small>
|
262 |
-
<?php endif; ?>
|
263 |
-
</span>
|
264 |
-
|
265 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
266 |
-
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
267 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?></span>
|
268 |
-
</span>
|
269 |
-
<?php endif; ?>
|
270 |
-
<?php endif; ?>
|
271 |
-
</span>
|
272 |
-
<br />
|
273 |
-
<?php endif; ?>
|
274 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
275 |
-
<span class="price-incl-tax">
|
276 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
277 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
278 |
-
<span class="cart-price">
|
279 |
-
<?php endif; ?>
|
280 |
-
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
281 |
-
<?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
282 |
-
</span>
|
283 |
-
<?php endif; ?>
|
284 |
-
<?php endif; ?>
|
285 |
-
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
|
286 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
287 |
-
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
288 |
-
<?php else: ?>
|
289 |
-
<span class="cart-price">
|
290 |
-
<?php endif; ?>
|
291 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
292 |
-
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
293 |
-
<?php else: ?>
|
294 |
-
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?>
|
295 |
-
<?php endif; ?>
|
296 |
-
|
297 |
-
</span>
|
298 |
-
|
299 |
-
|
300 |
-
<?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
|
301 |
-
|
302 |
-
<span class="cart-tax-info" id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
|
303 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
304 |
-
<small>
|
305 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
306 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
307 |
-
<?php endforeach; ?>
|
308 |
-
</small>
|
309 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
310 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
311 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
|
312 |
-
<?php endforeach; ?>
|
313 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
314 |
-
<small>
|
315 |
-
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
316 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
317 |
-
<?php endforeach; ?>
|
318 |
-
</small>
|
319 |
-
<?php endif; ?>
|
320 |
-
</span>
|
321 |
-
|
322 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
323 |
-
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
324 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
325 |
-
</span>
|
326 |
-
<?php endif; ?>
|
327 |
-
<?php endif; ?>
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
</span>
|
332 |
-
<?php endif; ?>
|
333 |
-
<?php
|
334 |
-
if (isset($promotions_data_array['items'][$_item->getQuoteItemId()])&&(int)$promotions_data_array['items'][$_item->getQuoteItemId()]['basketlevel']==0&&(float)$promotions_data_array['items'][$_item->getQuoteItemId()]['discount']>0){
|
335 |
-
echo '<div class="cart_inline_item_new_price"><b>'.Mage::helper('qixol')->__("Discount:-").$this->getOrder()->formatPrice($promotions_data_array['items'][$_item->getQuoteItemId()]['discount'])."</b><div>";
|
336 |
-
}
|
337 |
-
?>
|
338 |
-
</td>
|
339 |
-
<!--
|
340 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
341 |
-
<th class="a-right"><?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?></th>
|
342 |
-
<?php endif; ?>
|
343 |
-
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
344 |
-
<th class="a-right"><?php echo $this->getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($this->getItem())); ?></th>
|
345 |
-
<?php endif; ?>
|
346 |
-
-->
|
347 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/print/messages.phtml
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!!!!!
|
|
app/design/frontend/base/default/template/qixol/myaccount/order/print/print.phtml
DELETED
@@ -1,132 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_order = $this->getOrder() ?>
|
28 |
-
<?php
|
29 |
-
$promotions_raw=$_order->getPromotionDataApplied();
|
30 |
-
if(strlen($promotions_raw)>3){
|
31 |
-
$promotions_data_array=unserialize($promotions_raw);
|
32 |
-
}
|
33 |
-
?>
|
34 |
-
<h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
|
35 |
-
<p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
|
36 |
-
<div class="col2-set">
|
37 |
-
<?php if (!$_order->getIsVirtual()): ?>
|
38 |
-
<div class="col-1">
|
39 |
-
<h2><?php echo $this->__('Shipping Address') ?></h2>
|
40 |
-
<address><?php echo $_order->getShippingAddress()->format('html') ?></address>
|
41 |
-
</div>
|
42 |
-
<div class="col-2">
|
43 |
-
<?php else: ?>
|
44 |
-
<div class="col-1">
|
45 |
-
<?php endif; ?>
|
46 |
-
<h2><?php echo $this->__('Billing Address') ?></h2>
|
47 |
-
<address><?php echo $_order->getBillingAddress()->format('html') ?></address>
|
48 |
-
</div>
|
49 |
-
<?php if (!$_order->getIsVirtual()): ?>
|
50 |
-
</div>
|
51 |
-
<div class="col2-set">
|
52 |
-
<div class="col-1">
|
53 |
-
<h2><?php echo $this->__('Shipping Method') ?></h2>
|
54 |
-
<?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
|
55 |
-
</div>
|
56 |
-
<?php endif; ?>
|
57 |
-
<div class="col-2">
|
58 |
-
<h2><?php echo $this->__('Payment Method') ?></h2>
|
59 |
-
<?php echo $this->getPaymentInfoHtml() ?>
|
60 |
-
</div>
|
61 |
-
</div>
|
62 |
-
<h2><?php echo $this->__('Items Ordered') ?></h2>
|
63 |
-
<table class="data-table" id="my-orders-table">
|
64 |
-
<col />
|
65 |
-
<col width="1" />
|
66 |
-
<col width="1" />
|
67 |
-
<col width="1" />
|
68 |
-
<col width="1" />
|
69 |
-
<thead>
|
70 |
-
<tr>
|
71 |
-
<th><?php echo $this->__('Product Name') ?></th>
|
72 |
-
<th><?php echo $this->__('SKU') ?></th>
|
73 |
-
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
74 |
-
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
75 |
-
<th class="a-right"><?php echo $this->__('Subtotal') ?></th>
|
76 |
-
</tr>
|
77 |
-
</thead>
|
78 |
-
<tfoot>
|
79 |
-
<?php echo $this->getChildHtml('order_totals') ?>
|
80 |
-
</tfoot>
|
81 |
-
<?php $_items = $_order->getItemsCollection(); ?>
|
82 |
-
<?php $_count = $_items->count(); ?>
|
83 |
-
<?php foreach ($_items as $_item): ?>
|
84 |
-
<?php if ($_item->getParentItem()) continue; ?>
|
85 |
-
<tbody>
|
86 |
-
<?php echo $this->getItemHtml($_item) ?>
|
87 |
-
</tbody>
|
88 |
-
<?php endforeach; ?>
|
89 |
-
<?php
|
90 |
-
|
91 |
-
if (is_array($promotions_data_array['promotion_summary'])&&count($promotions_data_array['promotion_summary'])>0){
|
92 |
-
foreach ($promotions_data_array['promotion_summary'] as $inline_cart_promotion){
|
93 |
-
if($inline_cart_promotion['data']['basketlevel']>0||$inline_cart_promotion['data']['type']=='ISSUEPOINTS'){
|
94 |
-
?>
|
95 |
-
<tbody>
|
96 |
-
<tr class='promotion_cart_inline_box'>
|
97 |
-
<td class="product-cart-info" colspan='3'><?php echo $inline_cart_promotion['data']['display_text']; ?></td>
|
98 |
-
<td class="product-cart-total" colspan='2' style="text-align:right;"><?php
|
99 |
-
switch ($inline_cart_promotion['data']['type']){
|
100 |
-
case 'DELIVERYREDUCTION';
|
101 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
102 |
-
break;
|
103 |
-
case 'ISSUEPOINTS';
|
104 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
105 |
-
break;
|
106 |
-
case 'BASKETREDUCTION';
|
107 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
108 |
-
break;
|
109 |
-
}
|
110 |
-
?></td>
|
111 |
-
</tr>
|
112 |
-
</tbody>
|
113 |
-
<?
|
114 |
-
}
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
?>
|
119 |
-
</table>
|
120 |
-
<script type="text/javascript">decorateTable('my-orders-table', {'tbody' : ['odd', 'even'], 'tbody tr' : ['first', 'last']})</script>
|
121 |
-
<script type="text/javascript">window.print();</script>
|
122 |
-
<?php $_history = $this->getOrder()->getVisibleStatusHistory() ?>
|
123 |
-
<?php if (count($_history)): ?>
|
124 |
-
<div class="order-additional order-comments">
|
125 |
-
<dl class="order-about">
|
126 |
-
<?php foreach ($_history as $_historyItem): ?>
|
127 |
-
<dt><?php echo $this->formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?></dt>
|
128 |
-
<dd><?php echo $this->escapeHtml($_historyItem->getComment()) ?></dd>
|
129 |
-
<?php endforeach; ?>
|
130 |
-
</dl>
|
131 |
-
</div>
|
132 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/onepage/advert.phtml
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
3 |
-
$place_box_in_design_after_pattern='.cart';
|
4 |
-
|
5 |
-
|
6 |
-
$cart_advertisment_=Mage::getModel('qixol/advert');
|
7 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();
|
8 |
-
|
9 |
-
$inline_cart_advert='';
|
10 |
-
$total_discount_amount=0;
|
11 |
-
$delivery_discount_amount=0;
|
12 |
-
//for cart items
|
13 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
14 |
-
foreach ($cart->getAllItems() as $item) {
|
15 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
16 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')>0 && Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay' &&
|
17 |
-
isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
18 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
19 |
-
//inline level promotion
|
20 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytext'){
|
21 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
22 |
-
} elseif((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname') {
|
23 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['name'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
24 |
-
|
25 |
-
} elseif((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytype') {
|
26 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
//basket level promotion
|
31 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
32 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
37 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')>0 && $_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
38 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_cart_item_qty_".$item->getId()."'));";
|
39 |
-
|
40 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')>0 && $_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
41 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_cart_item_price_".$item->getId()."'));";
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
46 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
47 |
-
if ($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['new']==0&&((int)Mage::getStoreConfig('qixol/advanced/separateitem')>0||$cart_item_process['data']['generated']==false)){
|
48 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
49 |
-
}/*elseif($cart_item_process['data']['isdelivery']){
|
50 |
-
foreach ($cart_item_process['promotions'] as $delivery_promotion){
|
51 |
-
if ($delivery_promotion['discountamount']>0){
|
52 |
-
$delivery_discount_amount+=$delivery_promotion['discountamount'];
|
53 |
-
}
|
54 |
-
}
|
55 |
-
}*/
|
56 |
-
}
|
57 |
-
}
|
58 |
-
if (isset($_SESSION['qixol_quoted_items']['cart_data']['deliverytotaldiscount'])){
|
59 |
-
$delivery_discount_amount=$_SESSION['qixol_quoted_items']['cart_data']['deliverytotaldiscount'];
|
60 |
-
}
|
61 |
-
|
62 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
63 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $cart_total_process){
|
64 |
-
if ($cart_total_process['data']['discountamount']>0&&$cart_total_process['data']['type']=='BASKETREDUCTION'){
|
65 |
-
$total_discount_amount+=$cart_total_process['data']['discountamount'];
|
66 |
-
}
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''||$total_discount_amount>0){
|
72 |
-
?><script type="text/javascript" src="<?php echo Mage::getBaseUrl('js'); ?>/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">jQuery( document ).ready(function( $ ) {<?php
|
73 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
74 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';
|
75 |
-
if ($inline_cart_advert!='')
|
76 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
77 |
-
if ($total_discount_amount>0||$delivery_discount_amount>0){
|
78 |
-
if ($delivery_discount_amount>0){
|
79 |
-
?>$('<tr class="qixol_review_discount"><td class="a-right" colspan="3" ><?php echo Mage::helper('qixol')->__("Delivery Discount");?></td><td class="a-right" ><span class="qixol_review_total_price"><?php echo $this->helper('checkout')->formatPrice($delivery_discount_amount);; ?></span></td></tr>').insertBefore($('#checkout-review-table tfoot tr:last'));<?php
|
80 |
-
}
|
81 |
-
if ($total_discount_amount>0){
|
82 |
-
?>$('<tr class="qixol_review_discount"><td class="a-right" colspan="3" ><?php echo Mage::helper('qixol')->__("Products Discount");?></td><td class="a-right" ><span class="qixol_review_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount);; ?></span></td></tr>').insertBefore($('#checkout-review-table tfoot tr:last'));<?php
|
83 |
-
}
|
84 |
-
?>$('#checkout-review-table tfoot strong .price').addClass('qixol_price_cross');$('<span class="qixol_grand_total_price"><?php echo $this->helper('checkout')->formatPrice($cart->getGrandTotal()-$total_discount_amount-$delivery_discount_amount); ?></span>').appendTo($('#checkout-review-table tfoot strong .price').parent());<?php
|
85 |
-
}
|
86 |
-
?>});</script><?php
|
87 |
-
}
|
88 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/onepage/item.phtml
DELETED
@@ -1,288 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php $_item = $this->getItem()?>
|
28 |
-
<?php /* {{ qixol should be added id */ ?>
|
29 |
-
<tr id='qixol_idx_cart_item_<?php echo $_item->getId(); ?>'>
|
30 |
-
<?php /* }} qixol end should be added id */ ?>
|
31 |
-
<?php /* {{ qixol should be added id */ ?>
|
32 |
-
<td id='qixol_idx_cart_item_name_<?php echo $_item->getId(); ?>'><h3 class="product-name"><?php echo $this->escapeHtml($this->getProductName()) ?></h3>
|
33 |
-
<?php if ($_options = $this->getOptionList()):?>
|
34 |
-
<dl class="item-options">
|
35 |
-
<?php foreach ($_options as $_option) : ?>
|
36 |
-
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
37 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
38 |
-
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
39 |
-
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
40 |
-
<div class="truncated_full_value">
|
41 |
-
<dl class="item-options">
|
42 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
43 |
-
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
44 |
-
</dl>
|
45 |
-
</div>
|
46 |
-
<?php endif; ?>
|
47 |
-
</dd>
|
48 |
-
<?php endforeach; ?>
|
49 |
-
</dl>
|
50 |
-
<?php endif;?>
|
51 |
-
<?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()):?>
|
52 |
-
<?php echo $addtInfoBlock->setItem($_item)->toHtml() ?>
|
53 |
-
<?php endif; /* qixol {{ */
|
54 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay'):
|
55 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['promotions'] as $promotion){
|
56 |
-
//inline level promotion
|
57 |
-
$is_generated=($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0?$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']:$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']);
|
58 |
-
if (((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytext'){
|
59 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text']; ?></div><?php
|
60 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname'){
|
61 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['name']; ?></div><?php
|
62 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytype'){
|
63 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display']; ?></div><?php
|
64 |
-
}
|
65 |
-
|
66 |
-
}
|
67 |
-
endif;
|
68 |
-
/* }} end qixol */ ?>
|
69 |
-
</td>
|
70 |
-
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
71 |
-
<td class="a-right">
|
72 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
73 |
-
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
74 |
-
<?php else: ?>
|
75 |
-
<span class="cart-price">
|
76 |
-
<?php endif; ?>
|
77 |
-
|
78 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
79 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
80 |
-
<?php else: ?>
|
81 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
82 |
-
<?php endif; ?>
|
83 |
-
|
84 |
-
</span>
|
85 |
-
|
86 |
-
|
87 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
88 |
-
|
89 |
-
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
90 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
91 |
-
<small>
|
92 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
93 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
94 |
-
<?php endforeach; ?>
|
95 |
-
</small>
|
96 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
97 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
98 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></small></span><br />
|
99 |
-
<?php endforeach; ?>
|
100 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
101 |
-
<small>
|
102 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
103 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
104 |
-
<?php endforeach; ?>
|
105 |
-
</small>
|
106 |
-
<?php endif; ?>
|
107 |
-
</div>
|
108 |
-
|
109 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
110 |
-
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
111 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
112 |
-
</div>
|
113 |
-
<?php endif; ?>
|
114 |
-
<?php endif; ?>
|
115 |
-
</td>
|
116 |
-
<?php endif; ?>
|
117 |
-
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
118 |
-
<td>
|
119 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
120 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
121 |
-
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
122 |
-
<?php else: ?>
|
123 |
-
<span class="cart-price">
|
124 |
-
<?php endif; ?>
|
125 |
-
|
126 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
127 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
128 |
-
<?php else: ?>
|
129 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
130 |
-
<?php endif; ?>
|
131 |
-
|
132 |
-
</span>
|
133 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
134 |
-
|
135 |
-
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
136 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
137 |
-
<small>
|
138 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
139 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
140 |
-
<?php endforeach; ?>
|
141 |
-
</small>
|
142 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
143 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
144 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
145 |
-
<?php endforeach; ?>
|
146 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
147 |
-
<small>
|
148 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
149 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
150 |
-
<?php endforeach; ?>
|
151 |
-
</small>
|
152 |
-
<?php endif; ?>
|
153 |
-
</div>
|
154 |
-
|
155 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
156 |
-
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
157 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
158 |
-
</div>
|
159 |
-
<?php endif; ?>
|
160 |
-
<?php endif; ?>
|
161 |
-
</td>
|
162 |
-
<?php endif; ?>
|
163 |
-
<?php /* qixol should be added id */ ?>
|
164 |
-
<td class="a-center" id='qixol_idx_cart_item_qty_<?php echo $_item->getId(); ?>'><?php echo $_item->getQty();
|
165 |
-
//{{qixol
|
166 |
-
/*if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_qty']>0){
|
167 |
-
?><div class="cart_inline_item_new_qty">For promo <?php echo $_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity'];?> Qty</div><?php
|
168 |
-
}
|
169 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
170 |
-
?><div class="cart_inline_item_new_price">+ <?php echo $_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']; ?> free</div><?php
|
171 |
-
}*/
|
172 |
-
//}}qixol end
|
173 |
-
?></td>
|
174 |
-
<!-- sub total starts here -->
|
175 |
-
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
176 |
-
<?php /* qixol should be added id */ ?>
|
177 |
-
<td class="a-right" id='qixol_idx_cart_item_price_<?php echo $_item->getId(); ?>'>
|
178 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
179 |
-
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
180 |
-
<?php else: ?>
|
181 |
-
<span class="cart-price">
|
182 |
-
<?php endif; ?>
|
183 |
-
|
184 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
185 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
186 |
-
<?php else: ?>
|
187 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
188 |
-
<?php endif; ?>
|
189 |
-
|
190 |
-
</span>
|
191 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
192 |
-
|
193 |
-
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
194 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
195 |
-
<small>
|
196 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
197 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
198 |
-
<?php endforeach; ?>
|
199 |
-
</small>
|
200 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
201 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
202 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></small></span><br />
|
203 |
-
<?php endforeach; ?>
|
204 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
205 |
-
<small>
|
206 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
207 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
208 |
-
<?php endforeach; ?>
|
209 |
-
</small>
|
210 |
-
<?php endif; ?>
|
211 |
-
</div>
|
212 |
-
|
213 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
214 |
-
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
215 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
216 |
-
</div>
|
217 |
-
<?php endif; ?>
|
218 |
-
<?php endif; ?>
|
219 |
-
<?php
|
220 |
-
//{{qixol
|
221 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0){
|
222 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalamount']-$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['totaldiscount']); ?></div><?php
|
223 |
-
}
|
224 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['new']>0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0){
|
225 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']); ?></div><?php
|
226 |
-
}else if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
227 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']*$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']); ?></div><?php
|
228 |
-
}
|
229 |
-
//}}qixol end
|
230 |
-
?>
|
231 |
-
</td>
|
232 |
-
<?php endif; ?>
|
233 |
-
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
234 |
-
<td id='qixol_idx_cart_item_price_<?php echo $_item->getId(); ?>'>
|
235 |
-
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
236 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
237 |
-
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
238 |
-
<?php else: ?>
|
239 |
-
<span class="cart-price">
|
240 |
-
<?php endif; ?>
|
241 |
-
|
242 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
243 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
244 |
-
<?php else: ?>
|
245 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
246 |
-
<?php endif; ?>
|
247 |
-
|
248 |
-
</span>
|
249 |
-
|
250 |
-
|
251 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
252 |
-
|
253 |
-
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
254 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
255 |
-
<small>
|
256 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
257 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
258 |
-
<?php endforeach; ?>
|
259 |
-
</small>
|
260 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
261 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
262 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
263 |
-
<?php endforeach; ?>
|
264 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
265 |
-
<small>
|
266 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
267 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
268 |
-
<?php endforeach; ?>
|
269 |
-
</small>
|
270 |
-
<?php endif; ?>
|
271 |
-
</div>
|
272 |
-
|
273 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
274 |
-
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
275 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
276 |
-
</div>
|
277 |
-
<?php endif; ?>
|
278 |
-
<?php endif; ?>
|
279 |
-
<?php
|
280 |
-
//{{qixol
|
281 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0){
|
282 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['lineamount']); ?></div><?php
|
283 |
-
}
|
284 |
-
//}}qixol end
|
285 |
-
?>
|
286 |
-
</td>
|
287 |
-
<?php endif; ?>
|
288 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/onepage/review.phtml
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php echo $this->getChildHtml('items_before'); ?>
|
28 |
-
<div id="checkout-review-table-wrapper">
|
29 |
-
<table class="data-table" id="checkout-review-table">
|
30 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
|
31 |
-
<col />
|
32 |
-
<col width="1" />
|
33 |
-
<col width="1" />
|
34 |
-
<col width="1" />
|
35 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
36 |
-
<col width="1" />
|
37 |
-
<col width="1" />
|
38 |
-
<?php endif; ?>
|
39 |
-
<thead>
|
40 |
-
<tr>
|
41 |
-
<th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
|
42 |
-
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
|
43 |
-
<th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
|
44 |
-
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
|
45 |
-
</tr>
|
46 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
47 |
-
<tr>
|
48 |
-
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
49 |
-
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
50 |
-
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
51 |
-
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
52 |
-
</tr>
|
53 |
-
<?php endif; ?>
|
54 |
-
</thead>
|
55 |
-
<?php echo $this->getChildHtml('totals'); ?>
|
56 |
-
<tbody>
|
57 |
-
<?php foreach($this->getItems() as $_item): ?>
|
58 |
-
<?php
|
59 |
-
//{{qixol start wrap block
|
60 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/onepagejavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
61 |
-
$multiple_coeff=((float)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']/(float)$_item->getQty());
|
62 |
-
$_item->setQty((string)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']);
|
63 |
-
//$_item->setPrice($_item->getPrice()*$multiple_coeff);
|
64 |
-
//$_item->setBasePrice($_item->getBasePrice()*$multiple_coeff);
|
65 |
-
//$_item->setPriceInclTax($_item->getPriceInclTax()*$multiple_coeff);
|
66 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
67 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
68 |
-
$_item->setRowTotal($_item->getRowTotal()*$multiple_coeff);
|
69 |
-
$_item->setBaseRowTotal($_item->getBaseRowTotal()*$multiple_coeff);
|
70 |
-
$_item->setRowTotalInclTax($_item->getRowTotalInclTax()*$multiple_coeff);
|
71 |
-
$_item->setBaseRowTotalInclTax($_item->getBaseRowTotalInclTax()*$multiple_coeff);
|
72 |
-
|
73 |
-
|
74 |
-
unset($multiple_coeff);
|
75 |
-
}
|
76 |
-
//}} qixol
|
77 |
-
?>
|
78 |
-
<?php echo $this->getItemHtml($_item)?>
|
79 |
-
<?php endforeach ?>
|
80 |
-
<?php
|
81 |
-
//{{qixol start wrap block
|
82 |
-
|
83 |
-
if (isset($_SESSION['qixol_quoted_items'])){
|
84 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $idx_cart=>$item_to_show){
|
85 |
-
if ($item_to_show['new']>0&&(int)$item_to_show['data']['isdelivery']==0&&(int)$item_to_show['data']['splitfromlineid']==0){
|
86 |
-
if ($productId=Mage::getModel('catalog/product')->getIdBySku((string)$item_to_show['data']['variantcode']!=''?(string)$item_to_show['data']['variantcode']:(string)$item_to_show['data']['productcode'])){
|
87 |
-
$productObj = Mage::getModel('catalog/product')->load($productId);
|
88 |
-
$quoteItem = Mage::getModel('sales/quote_item')->setStoreId(Mage::app()->getStore()->getId())->setProduct($productObj);
|
89 |
-
$quoteItem->setConvertedPrice((string)$item_to_show['data']['price']);
|
90 |
-
$quoteItem->setQty((string)$item_to_show['data']['quantity']);
|
91 |
-
$quoteItem->setFreeProduct((int)$item_to_show['free_added']);
|
92 |
-
$quoteItem->setQuote($this);
|
93 |
-
$quoteItem->setId($idx_cart);
|
94 |
-
echo $this->getItemHtml($quoteItem);
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
98 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
99 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $inline_cart_promotion)
|
100 |
-
if($inline_cart_promotion['data']['basketlevel']>0){
|
101 |
-
?>
|
102 |
-
<tr class='promotion_review_inline_box'>
|
103 |
-
<td class="product-cart-info" colspan='2'><?php echo $inline_cart_promotion['data']['display_text']." "; ?></td>
|
104 |
-
<td class="product-cart-total" colspan='2' style="text-align:right;"><?php
|
105 |
-
switch ($inline_cart_promotion['data']['type']){
|
106 |
-
case 'DELIVERYREDUCTION';
|
107 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
108 |
-
break;
|
109 |
-
case 'ISSUEPOINTS';
|
110 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
111 |
-
break;
|
112 |
-
case 'BASKETREDUCTION';
|
113 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
114 |
-
break;
|
115 |
-
}
|
116 |
-
?></td>
|
117 |
-
</tr>
|
118 |
-
<?
|
119 |
-
}
|
120 |
-
}
|
121 |
-
}
|
122 |
-
//}} qixol end wrap block
|
123 |
-
?>
|
124 |
-
</tbody>
|
125 |
-
</table>
|
126 |
-
</div>
|
127 |
-
<?php echo $this->getChildHtml('items_after'); ?>
|
128 |
-
<script type="text/javascript">
|
129 |
-
//<![CDATA[
|
130 |
-
decorateTable('checkout-review-table');
|
131 |
-
truncateOptions();
|
132 |
-
//]]>
|
133 |
-
</script>
|
134 |
-
<div id="checkout-review-submit">
|
135 |
-
<?php echo $this->getChildHtml('agreements') ?>
|
136 |
-
<div class="buttons-set" id="review-buttons-container">
|
137 |
-
<p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p>
|
138 |
-
<?php echo $this->getChildHtml('button') ?>
|
139 |
-
<span class="please-wait" id="review-please-wait" style="display:none;">
|
140 |
-
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo Mage::helper('core')->quoteEscape($this->__('Submitting order information...')) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Submitting order information...')) ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
|
141 |
-
</span>
|
142 |
-
</div>
|
143 |
-
<script type="text/javascript">
|
144 |
-
//<![CDATA[
|
145 |
-
review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
|
146 |
-
//]]>
|
147 |
-
</script>
|
148 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/product/qixol_adv.phtml
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (Mage::getStoreConfig('holbi/qixol/enabled')>0&&Mage::getStoreConfig('qixol/frontend/showpromocat')>0){
|
3 |
-
$_productCollection=$this->getLoadedProductCollection();
|
4 |
-
$qixol_bannerbox_category_top=Mage::getModel('qixol/bannerboxes')->load('CATEGORY_TOP');
|
5 |
-
if ($qixol_bannerbox_category_top->getBannerBoxIsActive()>0){
|
6 |
-
$qixol_advertisment=Mage::getModel('qixol/advert');
|
7 |
-
$qixol_top_advertisment_text=$qixol_advertisment->getCategoryTopAdv($_productCollection);
|
8 |
-
$qixol_catalog_all_scripts_inside='';
|
9 |
-
if (trim($qixol_top_advertisment_text)!=''){
|
10 |
-
$qixol_catalog_all_scripts_inside.='$(".category-title").after("<div id=category_top_ class=\'cycle-slideshow\' data-cycle-fx=\''.$qixol_bannerbox_category_top->getBannerBoxTranslationType().'\' data-cycle-timeout=\'1500\' data-cycle-slides=\'> div\'>'.addslashes(preg_replace("/[\n\r]+/","",$qixol_top_advertisment_text)).'</div>");$(\'#category_top_\').cycle();';
|
11 |
-
?>
|
12 |
-
<?php
|
13 |
-
}
|
14 |
-
}
|
15 |
-
|
16 |
-
$qixol_bannerbox_category_stickers=Mage::getModel('qixol/bannerboxes')->load('CATEGORY_STICKERS');
|
17 |
-
if ($qixol_bannerbox_category_stickers->getBannerBoxIsActive()>0){
|
18 |
-
|
19 |
-
$_helper = $this->helper('catalog/output');
|
20 |
-
foreach ($_productCollection as $_product){
|
21 |
-
if ($is_sticker_image=$qixol_advertisment->isSticked($_product,'category')){
|
22 |
-
if ($is_sticker_image!==false){
|
23 |
-
if (is_array($is_sticker_image)){
|
24 |
-
$images_list='';
|
25 |
-
foreach ($is_sticker_image as $image_add){
|
26 |
-
$images_list.='<div style=\'width: 44px; height: 44px; display: block; z-index: 2; background:url(\"'.$image_add.'\") 0 0 no-repeat;background-size:contain;\'></div>';
|
27 |
-
}
|
28 |
-
if ($images_list!='')
|
29 |
-
$qixol_catalog_all_scripts_inside.='$("#product-collection-image-'.$_product->getId().'").after("<div style=\'position: absolute; right: 65; top: 0; width: 44px; height: 44px; display: block; z-index: 2;\' id=stickers_'.$_product->getId().' class=\'cycle-slideshow\' data-cycle-fx=\''.$qixol_bannerbox_category_stickers->getBannerBoxTranslationType().'\' data-cycle-timeout=\'555\' data-cycle-slides=\'> div\'>'.$images_list.'</div>");$(\'#stickers_'.$_product->getId().'\').cycle();';
|
30 |
-
}else {
|
31 |
-
//$qixol_catalog_all_scripts_inside.='$("#product-collection-image-'.$_product->getId().'").after("<div class=\'background_promotion_sale\'></div>");';
|
32 |
-
$qixol_catalog_all_scripts_inside.='$("#product-collection-image-'.$_product->getId().'").after("<div style=\'position: absolute; right: 65; top: 0; width: 44px; height: 44px; display: block; z-index: 2; background:url(\"'.$is_sticker_image.'\") 0 0 no-repeat;background-size:contain;\'></div>");';
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
if ($qixol_catalog_all_scripts_inside!=''){
|
39 |
-
?><script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>/skin/frontend/base/default/js/lib/jquery.cycle2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php echo $qixol_catalog_all_scripts_inside;?>});</script><?php
|
40 |
-
}
|
41 |
-
|
42 |
-
}
|
43 |
-
?>
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/product/qixol_info_details.phtml
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (Mage::getStoreConfig('holbi/qixol/enabled')>0&&Mage::getStoreConfig('qixol/frontend/showpromoboxes')>0){
|
3 |
-
?>
|
4 |
-
<?php $_helper = $this->helper('catalog/output'); ?>
|
5 |
-
<?php $_product = $this->getProduct(); ?>
|
6 |
-
<?php
|
7 |
-
|
8 |
-
$qixol_product_bottom_box=Mage::getModel('qixol/bannerboxes')->load('PRODUCT_BOTTOM');
|
9 |
-
if ($qixol_product_bottom_box->getBannerBoxIsActive()>0){
|
10 |
-
|
11 |
-
$bottom_advertisment_=Mage::getModel('qixol/advert');
|
12 |
-
$bottom_advertisment_text=$bottom_advertisment_->getProductBottmAdv($_product);
|
13 |
-
|
14 |
-
}
|
15 |
-
|
16 |
-
if ($bottom_advertisment_text!=''){
|
17 |
-
$bottom_advertisment_text='<div style="display:block;"><div id=product_bottom_ class="cycle-slideshow" data-cycle-fx="'.$qixol_product_bottom_box->getBannerBoxTranslationType().'" data-cycle-timeout="1500" data-cycle-slides="> div">'.preg_replace("/[\n\r]+/","",$bottom_advertisment_text).'</div></div>';
|
18 |
-
//echo $bottom_advertisment_text;
|
19 |
-
?><script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>/skin/frontend/base/default/js/lib/jquery.cycle2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { $(".add-to-cart").after('<?php echo addslashes($bottom_advertisment_text)?>'); $('#product_bottom_').cycle();});</script><?php
|
20 |
-
}
|
21 |
-
|
22 |
-
}
|
23 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/product/qixol_product_info.phtml
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (Mage::getStoreConfig('holbi/qixol/enabled')>0){
|
3 |
-
?>
|
4 |
-
<?php $_helper = $this->helper('catalog/output'); ?>
|
5 |
-
<?php $_product = $this->getProduct(); ?>
|
6 |
-
<?php
|
7 |
-
$qixol_advertisment=Mage::getModel('qixol/advert');
|
8 |
-
$qixol_product_all_scripts_inside='';
|
9 |
-
|
10 |
-
if (Mage::getStoreConfig('qixol/frontend/showpromoboxes')>0){
|
11 |
-
$qixol_all_promotions_text=$qixol_advertisment->getAllProductAdv($_product);
|
12 |
-
|
13 |
-
if ($qixol_all_promotions_text!=''){
|
14 |
-
// $qixol_product_all_scripts_inside .= '$(".add-to-box").after("<div id=product_advertisment_ class=\'cycle-slideshow\' data-cycle-fx=\'scrollHorz\' data-cycle-timeout=\'1500\' data-cycle-slides=\'> div\'>'.preg_replace("/[\n\r]+/","",$qixol_all_promotions_text).'</div>"); $(\'#product_advertisment_\').cycle();';
|
15 |
-
$qixol_product_all_scripts_inside .= '$(".add-to-box").after("<div class=\'product_all_promotions\'><table style=\'width:100%\'><th>Offers</th><th style=\'width:100px;\'>You Save</th>'.preg_replace("/[\n\r]+/","",$qixol_all_promotions_text).'</div></table>");';
|
16 |
-
}
|
17 |
-
}
|
18 |
-
if (Mage::getStoreConfig('qixol/frontend/showpromoboxes')>0){
|
19 |
-
|
20 |
-
|
21 |
-
$qixol_product_top_box=Mage::getModel('qixol/bannerboxes')->load('PRODUCT_TOP');
|
22 |
-
if ($qixol_product_top_box->getBannerBoxIsActive()>0){
|
23 |
-
$qixol_top_advertisment_text=$qixol_advertisment->getProductInfoTopAdv($_product);
|
24 |
-
|
25 |
-
if ($qixol_top_advertisment_text!=''){
|
26 |
-
$qixol_product_all_scripts_inside .= '$("#messages_product_view").after("<div id=product_top_ class=\'cycle-slideshow\' data-cycle-fx=\''.$qixol_product_top_box->getBannerBoxTranslationType().'\' data-cycle-timeout=\'1500\' data-cycle-slides=\'> div\'>'.preg_replace("/[\n\r]+/","",$qixol_top_advertisment_text).'</div>"); $(\'#product_top_\').cycle();';
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
$qixol_product_inline_box=Mage::getModel('qixol/bannerboxes')->load('PRODUCT_INLINE');
|
31 |
-
|
32 |
-
if ($qixol_product_inline_box->getBannerBoxIsActive()>0){
|
33 |
-
$qixol_inline_advertisment_text=$qixol_advertisment->getProductInlineAdv($_product);
|
34 |
-
|
35 |
-
if ($qixol_inline_advertisment_text!=''){
|
36 |
-
$qixol_product_all_scripts_inside .= '$(".extra-info").after("<div=\'product_inline\' style=\'float: left;width: 100%;\' id=product_inline_ class=\'cycle-slideshow\' data-cycle-fx=\''.$qixol_product_inline_box->getBannerBoxTranslationType().'\' data-cycle-timeout=\'1500\' data-cycle-slides=\'> div\'>'.addslashes($qixol_inline_advertisment_text).'</div>");$(\'#product_inline_\').cycle();';
|
37 |
-
}
|
38 |
-
}
|
39 |
-
}
|
40 |
-
if (Mage::getStoreConfig('qixol/frontend/showpromoprod')>0&&$is_sticker_image=$qixol_advertisment->isSticked($_product,'product')){
|
41 |
-
$qixol_bannerbox_product_stickers=Mage::getModel('qixol/bannerboxes')->load('PRODUCT_INFO_STICKERS');
|
42 |
-
if ($qixol_bannerbox_product_stickers->getBannerBoxIsActive()>0){
|
43 |
-
if ($is_sticker_image!==false){
|
44 |
-
if (is_array($is_sticker_image)){
|
45 |
-
$images_list='';
|
46 |
-
foreach ($is_sticker_image as $image_add){
|
47 |
-
$images_list.='<div style=\'position: absolute; right: 65; top: 0; width: 200px; height: 200px; display: block; z-index: 2; background:url(\"'.$image_add.'\") 0 0 no-repeat;background-size:contain;\'></div>';
|
48 |
-
}
|
49 |
-
if ($images_list!='')
|
50 |
-
$qixol_product_all_scripts_inside.='$(".product-image-gallery").after("<div style=\'position: absolute; right: 65; top: 0; width: 200px; height: 200px; display: block; z-index: 2;\' id=stickers_ class=\'cycle-slideshow\' data-cycle-fx=\''.$qixol_bannerbox_product_stickers->getBannerBoxTranslationType().'\' data-cycle-timeout=\'555\' data-cycle-slides=\'> div\'>'.$images_list.'</div>");$(\'#stickers_\').cycle();';
|
51 |
-
|
52 |
-
} else {
|
53 |
-
$qixol_product_all_scripts_inside.='$(".product-image-gallery").after("<div style=\'position: absolute; right: 65; top: 0; width: 200px; height: 200px; display: block; z-index: 2; background:url(\"'.$is_sticker_image.'\") 0 0 no-repeat;\'></div>");';
|
54 |
-
}
|
55 |
-
|
56 |
-
}
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
if ($qixol_product_all_scripts_inside!=''){
|
61 |
-
?><script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>/skin/frontend/base/default/js/lib/jquery.cycle2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php echo $qixol_product_all_scripts_inside;?>});</script><?php
|
62 |
-
}
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/sidebar/advert.phtml
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
3 |
-
$place_box_in_design_after_pattern='.cart';
|
4 |
-
|
5 |
-
|
6 |
-
$cart_advertisment_=Mage::getModel('qixol/advert');
|
7 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();
|
8 |
-
|
9 |
-
$inline_cart_advert='';
|
10 |
-
|
11 |
-
//for cart items
|
12 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
13 |
-
foreach ($cart->getAllItems() as $item) {
|
14 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
15 |
-
if (isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
16 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
17 |
-
//inline level promotion
|
18 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
19 |
-
$inline_cart_advert.="
|
20 |
-
$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));
|
21 |
-
";
|
22 |
-
//basket level promotion
|
23 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
24 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
29 |
-
if ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
30 |
-
$inline_cart_advert.="
|
31 |
-
$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_cart_item_qty_".$item->getId()."'));
|
32 |
-
";
|
33 |
-
|
34 |
-
if ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
35 |
-
$inline_cart_advert.="
|
36 |
-
$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_cart_item_price_".$item->getId()."'));
|
37 |
-
";
|
38 |
-
|
39 |
-
}
|
40 |
-
}
|
41 |
-
$total_discount_amount=0;
|
42 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
43 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
44 |
-
if ($cart_item_process['data']['totaldiscount']>0){
|
45 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''){
|
51 |
-
?><script type="text/javascript" src="<?php echo Mage::getBaseUrl('js'); ?>/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
52 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
53 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';
|
54 |
-
if ($inline_cart_advert!='')
|
55 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
56 |
-
if ($total_discount_amount>0){
|
57 |
-
?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" > Discount</td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount);; ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php
|
58 |
-
?>$('#shopping-cart-totals-table tfoot .price').addClass('qixol_price_cross');$('<span class="qixol_grand_total_price"><?php echo $this->helper('checkout')->formatPrice($cart->getGrandTotal()-$total_discount_amount); ?></span>').appendTo($('#shopping-cart-totals-table tfoot .price').parent());<?php
|
59 |
-
}
|
60 |
-
?>});</script><?php
|
61 |
-
}
|
62 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/sidebar/default.phtml
DELETED
@@ -1,145 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
$_item = $this->getItem();
|
29 |
-
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
30 |
-
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
31 |
-
?>
|
32 |
-
<li class="item">
|
33 |
-
<?php if ($this->hasProductUrl()): ?>
|
34 |
-
<a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a>
|
35 |
-
<?php else: ?>
|
36 |
-
<span class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
|
37 |
-
<?php endif; ?>
|
38 |
-
<div class="product-details">
|
39 |
-
<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>" onclick="return confirm('<?php echo Mage::helper('core')->quoteEscape($this->__('Are you sure you would like to remove this item from the shopping cart?'), true) ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>
|
40 |
-
<?php if ($isVisibleProduct): ?>
|
41 |
-
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item')) ?>" class="btn-edit"><?php echo $this->__('Edit item')?></a>
|
42 |
-
<?php endif ?>
|
43 |
-
<p class="product-name"><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif; ?></p>
|
44 |
-
<strong><?php echo $this->getQty() ?></strong> x
|
45 |
-
|
46 |
-
<?php if ($canApplyMsrp): ?>
|
47 |
-
|
48 |
-
<span class="map-cart-sidebar-item"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
49 |
-
|
50 |
-
<?php else: ?>
|
51 |
-
|
52 |
-
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
53 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
54 |
-
<?php echo $this->__('Excl. Tax'); ?>:
|
55 |
-
<?php endif; ?>
|
56 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
57 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
58 |
-
<?php else: ?>
|
59 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
60 |
-
<?php endif; ?>
|
61 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
62 |
-
<br />
|
63 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
64 |
-
<small>
|
65 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
66 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
67 |
-
<?php endforeach; ?>
|
68 |
-
</small>
|
69 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
70 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
71 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
72 |
-
<?php endforeach; ?>
|
73 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
74 |
-
<small>
|
75 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
76 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
77 |
-
<?php endforeach; ?>
|
78 |
-
</small>
|
79 |
-
<?php endif; ?>
|
80 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
81 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
82 |
-
<?php endif; ?>
|
83 |
-
<?php endif; ?>
|
84 |
-
<?php endif; ?>
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
89 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
90 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
91 |
-
<br /><?php echo $this->__('Incl. Tax'); ?>:
|
92 |
-
<?php endif; ?>
|
93 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
94 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
95 |
-
<?php else: ?>
|
96 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
97 |
-
<?php endif; ?>
|
98 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
99 |
-
<br />
|
100 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
101 |
-
<small>
|
102 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
103 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
104 |
-
<?php endforeach; ?>
|
105 |
-
</small>
|
106 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
107 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
108 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
109 |
-
<?php endforeach; ?>
|
110 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
111 |
-
<small>
|
112 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
113 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
114 |
-
<?php endforeach; ?>
|
115 |
-
</small>
|
116 |
-
<?php endif; ?>
|
117 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
118 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
119 |
-
<?php endif; ?>
|
120 |
-
<?php endif; ?>
|
121 |
-
<?php endif; ?>
|
122 |
-
|
123 |
-
<?php endif; //Can apply MSRP ?>
|
124 |
-
|
125 |
-
<?php if ($_options = $this->getOptionList()):?>
|
126 |
-
<div class="truncated">
|
127 |
-
<div class="truncated_full_value">
|
128 |
-
<dl class="item-options">
|
129 |
-
<?php foreach ($_options as $_option) : ?>
|
130 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
131 |
-
<dd>
|
132 |
-
<?php if (is_array($_option['value'])): ?>
|
133 |
-
<?php echo nl2br(implode("\n", $_option['value'])) ?>
|
134 |
-
<?php else: ?>
|
135 |
-
<?php echo $_option['value'] ?>
|
136 |
-
<?php endif; ?>
|
137 |
-
</dd>
|
138 |
-
<?php endforeach; ?>
|
139 |
-
</dl>
|
140 |
-
</div>
|
141 |
-
<a href="#" onclick="return false;" class="details"><?php echo $this->__('Details') ?></a>
|
142 |
-
</div>
|
143 |
-
<?php endif; ?>
|
144 |
-
</div>
|
145 |
-
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/qixol/sidebar/sidebar.phtml
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Shoping cart sidebar
|
29 |
-
*
|
30 |
-
* @see Mage_Checkout_Block_Cart_Sidebar
|
31 |
-
*/
|
32 |
-
|
33 |
-
?>
|
34 |
-
<?php if ($this->getIsNeedToDisplaySideBar()):?>
|
35 |
-
<div class="block block-cart">
|
36 |
-
<?php $_cartQty = $this->getSummaryCount() ?>
|
37 |
-
<div class="block-title">
|
38 |
-
<strong><span><?php echo $this->__('My Cart') ?></span></strong>
|
39 |
-
</div>
|
40 |
-
<div class="block-content">
|
41 |
-
<?php if ($_cartQty>0): ?>
|
42 |
-
<div class="summary">
|
43 |
-
<?php if ($_cartQty==1): ?>
|
44 |
-
<p class="amount"><?php echo $this->__('There is <a href="%s">1 item</a> in your cart.', $this->getUrl('checkout/cart')) ?></p>
|
45 |
-
<?php else: ?>
|
46 |
-
<p class="amount"><?php echo $this->__('There are <a href="%s">%s items</a> in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?></p>
|
47 |
-
<?php endif ?>
|
48 |
-
<p class="subtotal">
|
49 |
-
<?php if ($this->canApplyMsrp()): ?>
|
50 |
-
<span class="map-cart-sidebar-total"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></span>
|
51 |
-
<?php else: ?>
|
52 |
-
<span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
|
53 |
-
<?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
|
54 |
-
<br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
|
55 |
-
<?php endif; ?>
|
56 |
-
<?php endif; ?>
|
57 |
-
</p>
|
58 |
-
</div>
|
59 |
-
<?php endif ?>
|
60 |
-
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
|
61 |
-
<div class="actions">
|
62 |
-
<?php echo $this->getChildHtml('extra_actions') ?>
|
63 |
-
<button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Checkout')) ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
|
64 |
-
</div>
|
65 |
-
<?php endif ?>
|
66 |
-
<?php $_items = $this->getRecentItems() ?>
|
67 |
-
<?php if(count($_items)): ?>
|
68 |
-
<p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
|
69 |
-
<ol id="cart-sidebar" class="mini-products-list">
|
70 |
-
<?php foreach($_items as $_item): ?>
|
71 |
-
<?php echo $this->getItemHtml($_item) ?>
|
72 |
-
<?php endforeach; ?>
|
73 |
-
</ol>
|
74 |
-
<script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
|
75 |
-
<?php else: ?>
|
76 |
-
<p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
|
77 |
-
<?php endif ?>
|
78 |
-
</div>
|
79 |
-
</div>
|
80 |
-
<?php endif;?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/rwd/default/template/qixol/minicart/advert.phtml
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
moved to mincart
|
4 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
5 |
-
$place_box_in_design_after_pattern='.cart';
|
6 |
-
|
7 |
-
|
8 |
-
/* $cart_advertisment_=Mage::getModel('qixol/advert');
|
9 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();*/
|
10 |
-
/*
|
11 |
-
$inline_cart_advert='';
|
12 |
-
|
13 |
-
//for cart items
|
14 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
15 |
-
foreach ($cart->getAllItems() as $item) {
|
16 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
17 |
-
if (isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
18 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
19 |
-
//inline level promotion
|
20 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
21 |
-
$inline_cart_advert.="
|
22 |
-
$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_mcart_item_name_".$item->getId()."'));
|
23 |
-
";
|
24 |
-
//basket level promotion
|
25 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
26 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
31 |
-
if ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
32 |
-
$inline_cart_advert.="
|
33 |
-
$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_mcart_item_qty_".$item->getId()."'));
|
34 |
-
";
|
35 |
-
|
36 |
-
if ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
37 |
-
$inline_cart_advert.="
|
38 |
-
$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_mcart_item_price_".$item->getId()."'));
|
39 |
-
";
|
40 |
-
|
41 |
-
}
|
42 |
-
}
|
43 |
-
$total_discount_amount=0;
|
44 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
45 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
46 |
-
if ($cart_item_process['data']['totaldiscount']>0&&(int)$cart_item_process['new']==0){
|
47 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
48 |
-
}
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''){
|
53 |
-
?><script type="text/javascript" src="http://qixol.holbidev.co.uk/js/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
54 |
-
/*if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
55 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';*//*
|
56 |
-
if ($inline_cart_advert!='')
|
57 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
58 |
-
if ($total_discount_amount>0){
|
59 |
-
/*?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" > Discount</td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount);; ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php*//*
|
60 |
-
?>$('#header-cart .subtotal .price').addClass('qixol_price_cross');$('<?php echo $this->helper('checkout')->formatPrice($cart->getGrandTotal()-$total_discount_amount); ?>').appendTo($('#header-cart .subtotal .price').parent());<?php
|
61 |
-
}
|
62 |
-
?>});</script><?php
|
63 |
-
}*/
|
64 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/rwd/default/template/qixol/minicart/default.phtml
DELETED
@@ -1,258 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
$_item = $this->getItem();
|
29 |
-
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
30 |
-
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
31 |
-
?>
|
32 |
-
<?php /* {{ qixol should be added id */ ?>
|
33 |
-
<li class="item" xmlns="http://www.w3.org/1999/html" id='qixol_idx_mcart_item_<?php echo $_item->getId(); ?>'>
|
34 |
-
<?php if ($this->hasProductUrl()): ?>
|
35 |
-
<a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a>
|
36 |
-
<?php else: ?>
|
37 |
-
<span class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
|
38 |
-
<?php endif; ?>
|
39 |
-
<div class="product-details">
|
40 |
-
<?php /* qixol should be added id */ ?>
|
41 |
-
<p class="product-name" id='qixol_idx_mcart_item_name_<?php echo $_item->getId(); ?>'><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif;
|
42 |
-
/* qixol {{ */
|
43 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay'):
|
44 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['promotions'] as $promotion){
|
45 |
-
//inline level promotion
|
46 |
-
$is_generated=($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0?$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']:$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']);
|
47 |
-
if (((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytext'){
|
48 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text']; ?></div><?php
|
49 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname'){
|
50 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['name']; ?></div><?php
|
51 |
-
}elseif(((int)$promotion['basketlevel']==0||$is_generated>0)&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displaytype'){
|
52 |
-
?><div class="cart_inline_item_promo"><?php echo $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display']; ?></div><?php
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
56 |
-
endif;
|
57 |
-
/* }} end qixol */ ?></p>
|
58 |
-
|
59 |
-
|
60 |
-
<table class="info-wrapper">
|
61 |
-
<tbody>
|
62 |
-
<tr>
|
63 |
-
<th><?php echo $this->__('Price'); ?></th>
|
64 |
-
<td id='qixol_idx_mcart_item_price_<?php echo $_item->getId(); ?>'>
|
65 |
-
<?php if ($canApplyMsrp): ?>
|
66 |
-
|
67 |
-
<span class="map-cart-sidebar-item"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
68 |
-
|
69 |
-
<?php else: ?>
|
70 |
-
|
71 |
-
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
72 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
73 |
-
<?php echo $this->__('Excl. Tax'); ?>:
|
74 |
-
<?php endif; ?>
|
75 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
76 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
77 |
-
<?php else: ?>
|
78 |
-
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
79 |
-
<?php endif; ?>
|
80 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
81 |
-
<br />
|
82 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
83 |
-
<small>
|
84 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
85 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
86 |
-
<?php endforeach; ?>
|
87 |
-
</small>
|
88 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
89 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
90 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
91 |
-
<?php endforeach; ?>
|
92 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
93 |
-
<small>
|
94 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
95 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
96 |
-
<?php endforeach; ?>
|
97 |
-
</small>
|
98 |
-
<?php endif; ?>
|
99 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
100 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
101 |
-
<?php endif; ?>
|
102 |
-
<?php endif; ?>
|
103 |
-
<?php endif; ?>
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
108 |
-
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
109 |
-
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
110 |
-
<br /><?php echo $this->__('Incl. Tax'); ?>:
|
111 |
-
<?php endif; ?>
|
112 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
113 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
114 |
-
<?php else: ?>
|
115 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
116 |
-
<?php endif; ?>
|
117 |
-
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
118 |
-
<br />
|
119 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
120 |
-
<small>
|
121 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
122 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
123 |
-
<?php endforeach; ?>
|
124 |
-
</small>
|
125 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
126 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
127 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span>
|
128 |
-
<?php endforeach; ?>
|
129 |
-
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
130 |
-
<small>
|
131 |
-
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
132 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
133 |
-
<?php endforeach; ?>
|
134 |
-
</small>
|
135 |
-
<?php endif; ?>
|
136 |
-
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
137 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
138 |
-
<?php endif; ?>
|
139 |
-
<?php endif; ?>
|
140 |
-
<?php endif; ?>
|
141 |
-
|
142 |
-
<?php endif; //Can apply MSRP ?>
|
143 |
-
<?php
|
144 |
-
//{{qixol
|
145 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0){
|
146 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice(($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalamount']-$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['totaldiscount'])/$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalquantity']);?></div><?php
|
147 |
-
}
|
148 |
-
//}}qixol end
|
149 |
-
?>
|
150 |
-
</td>
|
151 |
-
</tr>
|
152 |
-
<tr class="qty-wrapper">
|
153 |
-
<th><?php echo $this->__('Qty'); ?></th>
|
154 |
-
|
155 |
-
<?php /* qixol should be added id */ ?>
|
156 |
-
<td id='qixol_idx_mcart_item_qty_<?php echo $_item->getId(); ?>'>
|
157 |
-
<?php /*if ($_item->getFreeProduct()>0): ?>
|
158 |
-
<div class="cart_inline_item_promo"><?php echo $this->__('free item'); ?></div>
|
159 |
-
<?php else :*/ ?>
|
160 |
-
<?php /* end qixol add */ ?>
|
161 |
-
<input
|
162 |
-
id="qinput-<?php echo $_item->getId(); ?>"
|
163 |
-
data-link="<?php echo $this->getAjaxUpdateUrl() ?>"
|
164 |
-
data-item-id="<?php echo $_item->getId(); ?>"
|
165 |
-
data-cart-item-id="<?php echo $_item->getSku(); ?>"
|
166 |
-
class="qty cart-item-quantity input-text" name=""
|
167 |
-
value="<?php echo $this->getQty()?>"
|
168 |
-
<?php if ($this->isOnCheckoutPage()) echo 'disabled'; ?>
|
169 |
-
/>
|
170 |
-
|
171 |
-
<button id="qbutton-<?php echo $_item->getId(); ?>"
|
172 |
-
data-item-id="<?php echo $_item->getId(); ?>"
|
173 |
-
disabled="disabled"
|
174 |
-
data-update
|
175 |
-
data-cart-item-update
|
176 |
-
class="button quantity-button">
|
177 |
-
<?php echo $this->__('ok'); ?>
|
178 |
-
</button>
|
179 |
-
<?php
|
180 |
-
//{{qixol
|
181 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['updated_price']>0)){
|
182 |
-
?><div class="cart_inline_item_new_price">Only for <?php echo $this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalamount']-$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['totaldiscount']); ?></div><?php
|
183 |
-
}
|
184 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['new']>0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']>0){
|
185 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']); ?></div><?php
|
186 |
-
}else if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
187 |
-
?><div class="cart_inline_item_new_price"><?php echo $this->__('Discount: -').$this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalprice']*$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']); ?></div><?php
|
188 |
-
}
|
189 |
-
//}}qixol end
|
190 |
-
?>
|
191 |
-
<?php /* qixol add */ ?>
|
192 |
-
<?php //endif ?>
|
193 |
-
<?php /* end qixol add */ ?>
|
194 |
-
</td>
|
195 |
-
</tr>
|
196 |
-
</tbody>
|
197 |
-
</table>
|
198 |
-
|
199 |
-
<?php if ($isVisibleProduct&&($_item->getFreeProduct()==0)): ?>
|
200 |
-
<?php
|
201 |
-
//{{qixol
|
202 |
-
if ($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']==0&&$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']==0):
|
203 |
-
//}}qixol
|
204 |
-
?>
|
205 |
-
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item')) ?>" class="btn-edit">
|
206 |
-
<?php echo $this->__('Edit item')?>
|
207 |
-
</a>
|
208 |
-
|
|
209 |
-
<?php
|
210 |
-
//{{qixol
|
211 |
-
endif;
|
212 |
-
//}}qixol
|
213 |
-
?>
|
214 |
-
<?php
|
215 |
-
//{{qixol
|
216 |
-
if ($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['generated']==0||$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['originalquantity']!=$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']):
|
217 |
-
//}}qixol
|
218 |
-
?>
|
219 |
-
<?php if (!$this->isOnCheckoutPage()): ?>
|
220 |
-
<a href="<?php echo $this->getAjaxDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>"
|
221 |
-
data-confirm="<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>"
|
222 |
-
class="remove">
|
223 |
-
<?php echo $this->__('Remove Item') ?>
|
224 |
-
</a>
|
225 |
-
<?php else: ?>
|
226 |
-
<span><?php echo $this->__('Remove Item') ?></span>
|
227 |
-
<?php endif; ?>
|
228 |
-
<?php
|
229 |
-
//{{qixol
|
230 |
-
endif;
|
231 |
-
//}}qixol
|
232 |
-
?>
|
233 |
-
<?php endif ?>
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
<?php if ($_options = $this->getOptionList()):?>
|
238 |
-
<div class="truncated">
|
239 |
-
<div class="truncated_full_value">
|
240 |
-
<dl class="item-options">
|
241 |
-
<?php foreach ($_options as $_option) : ?>
|
242 |
-
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
243 |
-
<dd>
|
244 |
-
<?php if (is_array($_option['value'])): ?>
|
245 |
-
<?php echo nl2br(implode("\n", $_option['value'])) ?>
|
246 |
-
<?php else: ?>
|
247 |
-
<?php echo $_option['value'] ?>
|
248 |
-
<?php endif; ?>
|
249 |
-
</dd>
|
250 |
-
<?php endforeach; ?>
|
251 |
-
</dl>
|
252 |
-
</div>
|
253 |
-
<a href="#" onclick="return false;" class="details"><?php echo $this->__('Details') ?></a>
|
254 |
-
</div>
|
255 |
-
<?php endif; ?>
|
256 |
-
|
257 |
-
</div>
|
258 |
-
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/rwd/default/template/qixol/minicart/mincart.phtml
DELETED
@@ -1,250 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package rwd_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Shoping cart sidebar
|
29 |
-
*
|
30 |
-
* @var Mage_Checkout_Block_Cart_Minicart $this
|
31 |
-
*/
|
32 |
-
?>
|
33 |
-
<?php
|
34 |
-
$_cartQty = $this->getSummaryCount();
|
35 |
-
if(empty($_cartQty)) {
|
36 |
-
$_cartQty = 0;
|
37 |
-
}
|
38 |
-
?>
|
39 |
-
<div id="minicart-error-message" class="minicart-message"></div>
|
40 |
-
<div id="minicart-success-message" class="minicart-message"></div>
|
41 |
-
|
42 |
-
<div class="minicart-wrapper">
|
43 |
-
|
44 |
-
<p class="block-subtitle">
|
45 |
-
<?php echo $this->__('Recently added item(s)') ?>
|
46 |
-
<a class="close skip-link-close" href="#" title="<?php echo $this->quoteEscape($this->__('Close')); ?>">×</a>
|
47 |
-
</p>
|
48 |
-
|
49 |
-
<?php $_items = $this->getRecentItems() ?>
|
50 |
-
<?php $countItems = count($_items); ?>
|
51 |
-
<?php if($countItems): ?>
|
52 |
-
<div>
|
53 |
-
<ul id="cart-sidebar" class="mini-products-list">
|
54 |
-
<?php foreach($_items as $_item): ?>
|
55 |
-
<?php
|
56 |
-
//{{qixol start wrap block
|
57 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')==0&&($_SESSION['qixol_quoted_items']['items'][$_item->getId()]['free_added']>0)){
|
58 |
-
$multiple_coeff=((float)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']/(float)$_item->getQty());
|
59 |
-
$_item->setQty((string)$_SESSION['qixol_quoted_items']['items'][$_item->getId()]['data']['quantity']);
|
60 |
-
//$_item->setPrice($_item->getPrice()*$multiple_coeff);
|
61 |
-
//$_item->setBasePrice($_item->getBasePrice()*$multiple_coeff);
|
62 |
-
//$_item->setPriceInclTax($_item->getPriceInclTax()*$multiple_coeff);
|
63 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
64 |
-
//$_item->setBasePriceInclTax($_item->getBasePriceInclTax()*$multiple_coeff);
|
65 |
-
$_item->setRowTotal($_item->getRowTotal()*$multiple_coeff);
|
66 |
-
$_item->setBaseRowTotal($_item->getBaseRowTotal()*$multiple_coeff);
|
67 |
-
$_item->setRowTotalInclTax($_item->getRowTotalInclTax()*$multiple_coeff);
|
68 |
-
$_item->setBaseRowTotalInclTax($_item->getBaseRowTotalInclTax()*$multiple_coeff);
|
69 |
-
|
70 |
-
|
71 |
-
unset($multiple_coeff);
|
72 |
-
}
|
73 |
-
// }} qixol
|
74 |
-
?>
|
75 |
-
<?php echo $this->getItemHtml($_item) ?>
|
76 |
-
<?php endforeach; ?>
|
77 |
-
<?php
|
78 |
-
//{{qixol start wrap block
|
79 |
-
|
80 |
-
if (isset($_SESSION['qixol_quoted_items'])){
|
81 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $idx_cart=>$item_to_show){
|
82 |
-
if ($item_to_show['new']>0&&(int)$item_to_show['data']['isdelivery']==0&&(int)$item_to_show['data']['splitfromlineid']==0){
|
83 |
-
if ($productId=Mage::getModel('catalog/product')->getIdBySku((string)$item_to_show['data']['variantcode']!=''?(string)$item_to_show['data']['variantcode']:(string)$item_to_show['data']['productcode'])){
|
84 |
-
$productObj = Mage::getModel('catalog/product')->load($productId);
|
85 |
-
$quoteItem = Mage::getModel('sales/quote_item')->setStoreId(Mage::app()->getStore()->getId())->setProduct($productObj);
|
86 |
-
$quoteItem->setConvertedPrice((string)$item_to_show['data']['price']);
|
87 |
-
$quoteItem->setQty((string)$item_to_show['data']['quantity']);
|
88 |
-
$quoteItem->setFreeProduct((int)$item_to_show['free_added']);
|
89 |
-
$quoteItem->setQuote($this);
|
90 |
-
$quoteItem->setId($idx_cart);
|
91 |
-
echo $this->getItemHtml($quoteItem);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
96 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $inline_cart_promotion)
|
97 |
-
if($inline_cart_promotion['data']['basketlevel']>0){
|
98 |
-
?>
|
99 |
-
<li class="item odd" xmlns="http://www.w3.org/1999/html">
|
100 |
-
<div class="promotion_cart_inline_box" ><?php echo $inline_cart_promotion['data']['display_text'] ?> : <?php
|
101 |
-
switch ($inline_cart_promotion['data']['type']){
|
102 |
-
case 'DELIVERYREDUCTION';
|
103 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
104 |
-
break;
|
105 |
-
case 'ISSUEPOINTS';
|
106 |
-
echo $inline_cart_promotion['data']['issuedpoints']." pt.";
|
107 |
-
break;
|
108 |
-
case 'BASKETREDUCTION';
|
109 |
-
echo $this->helper('checkout')->formatPrice($inline_cart_promotion['data']['discountamount']);
|
110 |
-
break;
|
111 |
-
}
|
112 |
-
?></div>
|
113 |
-
</li>
|
114 |
-
<?
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
//}} qixol end wrap block
|
119 |
-
?>
|
120 |
-
</ul>
|
121 |
-
</div>
|
122 |
-
<script type="text/javascript">
|
123 |
-
truncateOptions();
|
124 |
-
decorateList('cart-sidebar', 'none-recursive');
|
125 |
-
$j('document').ready(function() {
|
126 |
-
var minicartOptions = {
|
127 |
-
formKey: "<?php echo $this->getFormKey();?>"
|
128 |
-
}
|
129 |
-
var Mini = new Minicart(minicartOptions);
|
130 |
-
Mini.init();
|
131 |
-
});
|
132 |
-
</script>
|
133 |
-
|
134 |
-
<div id="minicart-widgets">
|
135 |
-
<?php echo $this->getChildHtml('cart_promotion') ?>
|
136 |
-
</div>
|
137 |
-
<div class="block-content">
|
138 |
-
<p class="subtotal">
|
139 |
-
<?php if ($this->canApplyMsrp()): ?>
|
140 |
-
<span class="map-cart-sidebar-total"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></span>
|
141 |
-
<?php else: ?>
|
142 |
-
<span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
|
143 |
-
<?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
|
144 |
-
<br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
|
145 |
-
<?php endif; ?>
|
146 |
-
<?php endif; ?>
|
147 |
-
</p>
|
148 |
-
</div>
|
149 |
-
|
150 |
-
|
151 |
-
<div class="minicart-actions">
|
152 |
-
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
|
153 |
-
<ul class="checkout-types minicart">
|
154 |
-
<?php echo $this->getChildHtml('extra_actions') ?>
|
155 |
-
<li>
|
156 |
-
<a title="<?php echo $this->quoteEscape($this->__('Checkout')) ?>" class="button checkout-button" href="<?php echo $this->getCheckoutUrl() ?>">
|
157 |
-
<?php echo $this->__('Checkout') ?>
|
158 |
-
</a>
|
159 |
-
</li>
|
160 |
-
</ul>
|
161 |
-
<?php endif ?>
|
162 |
-
<a class="cart-link" href="<?php echo $this->getUrl('checkout/cart'); ?>">
|
163 |
-
<?php echo $this->__('View Shopping Cart'); ?>
|
164 |
-
</a>
|
165 |
-
</div>
|
166 |
-
|
167 |
-
<?php else: ?>
|
168 |
-
<p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
|
169 |
-
|
170 |
-
<?php endif ?>
|
171 |
-
</div>
|
172 |
-
<!-- // qixol //-->
|
173 |
-
<?php
|
174 |
-
//$place_box_in_design_after_pattern=Mage::getStoreConfig('qixol/integraion/boxcartpromotion')
|
175 |
-
$place_box_in_design_after_pattern='.cart';
|
176 |
-
|
177 |
-
|
178 |
-
$cart_advertisment_=Mage::getModel('qixol/advert');
|
179 |
-
$text_to_show_cart_adv=$cart_advertisment_->getCartInlineAdv();
|
180 |
-
|
181 |
-
$inline_cart_advert='';
|
182 |
-
|
183 |
-
//for cart items
|
184 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
185 |
-
foreach ($cart->getAllItems() as $item) {
|
186 |
-
if (isset($_SESSION['qixol_quoted_items'])&&isset($_SESSION['qixol_quoted_items']['items'][$item->getId()])){
|
187 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')>0 && Mage::getStoreConfig('qixol/advanced/services')!='dontdisplay' &&
|
188 |
-
isset($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions']))
|
189 |
-
foreach ($_SESSION['qixol_quoted_items']['items'][$item->getId()]['promotions'] as $promotion){
|
190 |
-
|
191 |
-
//inline level promotion
|
192 |
-
if ((int)$promotion['basketlevel']==0&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']])&&Mage::getStoreConfig('qixol/advanced/services')=='displayname'){
|
193 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['data']['display_text'])."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
194 |
-
} elseif((int)$promotion['basketlevel']==0&&(Mage::getStoreConfig('qixol/advanced/services')=='displaytext'||Mage::getStoreConfig('qixol/advanced/services')=='displaytype')) {
|
195 |
-
if ($cart_promotion_data=Mage::getModel('qixol/promotions')->load($promotion['id'])){
|
196 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_promo\">".addslashes(Mage::getStoreConfig('qixol/advanced/services')=='displaytype'?$cart_promotion_data->getPromotionType():$cart_promotion_data->getPromotionText())."</div>').appendTo($('#qixol_idx_cart_item_name_".$item->getId()."'));";
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
//basket level promotion
|
201 |
-
if ((int)$promotion['basketlevel']==1&&isset($_SESSION['qixol_quoted_items']['summary'][$promotion['id']]))
|
202 |
-
$text_to_show_cart_adv.='';//should be also added??? $_SESSION['qixol_quoted_items']['summary'][$promotion['id']]['display_text'];
|
203 |
-
|
204 |
-
}
|
205 |
-
|
206 |
-
//if quantity changed (get one + one free so will be splited to 2 products with 1 free)
|
207 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')>0&&$_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_qty']>0)
|
208 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_qty\">For promo ".addslashes($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['quantity'])." Qty</div>').appendTo($('#qixol_idx_mcart_item_qty_".$item->getId()."'));";
|
209 |
-
|
210 |
-
if ((int)Mage::getStoreConfig('qixol/frontend/mcartjavascr')>0&&$_SESSION['qixol_quoted_items']['items'][$item->getId()]['updated_price']>0)
|
211 |
-
$inline_cart_advert.="$('<div class=\"cart_inline_item_new_price\">Only for ".addslashes($this->helper('checkout')->formatPrice($_SESSION['qixol_quoted_items']['items'][$item->getId()]['data']['lineamount']))."</div>').appendTo($('#qixol_idx_mcart_item_price_".$item->getId()."'));";
|
212 |
-
|
213 |
-
}
|
214 |
-
}
|
215 |
-
$total_discount_amount=0;
|
216 |
-
if (isset($_SESSION['qixol_quoted_items']['items'])){
|
217 |
-
foreach ($_SESSION['qixol_quoted_items']['items'] as $cart_item_process){
|
218 |
-
if ($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['new']==0&&((int)Mage::getStoreConfig('qixol/advanced/separateitem')>0||$cart_item_process['data']['generated']==false)){
|
219 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
220 |
-
}
|
221 |
-
//subtotal are not including delivery
|
222 |
-
/*elseif($cart_item_process['data']['totaldiscount']>0&&$cart_item_process['data']['type']=='DELIVERYREDUCTION'){
|
223 |
-
$total_discount_amount+=$cart_item_process['data']['totaldiscount'];
|
224 |
-
}*/
|
225 |
-
}
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
if (isset($_SESSION['qixol_quoted_items']['summary'])){
|
230 |
-
foreach ($_SESSION['qixol_quoted_items']['summary'] as $cart_total_process){
|
231 |
-
if ($cart_total_process['data']['discountamount']>0&&$cart_total_process['data']['type']=='BASKETREDUCTION'){
|
232 |
-
$total_discount_amount+=$cart_total_process['data']['discountamount'];
|
233 |
-
}
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5||$inline_cart_advert!=''){
|
238 |
-
?><script type="text/javascript" src="http://qixol.holbidev.co.uk/js/lib/jquery/jquery-1.10.2.min.js"></script><script type="text/javascript">$.noConflict();jQuery( document ).ready(function( $ ) { <?php
|
239 |
-
//commented -show only on base cart
|
240 |
-
/*if ($text_to_show_cart_adv!==false&&strlen($text_to_show_cart_adv)>5)
|
241 |
-
echo '$("'.$place_box_in_design_after_pattern.'").after("<div class=\'qixolcartpromo\'>'.$text_to_show_cart_adv.'</div>");';*/
|
242 |
-
if ($inline_cart_advert!='')
|
243 |
-
echo preg_replace("/[\n\r]+/","",$inline_cart_advert);
|
244 |
-
if ($total_discount_amount>0){
|
245 |
-
/*?>$('<tr class="qixol_discount"><td class="a-right" colspan="1" > Discount</td><td class="a-right" ><span class="qixol_total_price"><?php echo $this->helper('checkout')->formatPrice($total_discount_amount);; ?></span></td></tr>').appendTo($('#shopping-cart-totals-table tbody'));<?php*/
|
246 |
-
?>$('#header-cart .subtotal .price').addClass('qixol_price_cross');$('<?php echo $this->helper('checkout')->formatPrice($cart->getSubtotal()-$total_discount_amount); ?>').appendTo($('#header-cart .subtotal .price').parent());<?php
|
247 |
-
}
|
248 |
-
?>});</script><?php
|
249 |
-
}
|
250 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Holbi_Qixol.xml
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Holbi_Qixol>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
<version>0.1.0</version>
|
8 |
-
</Holbi_Qixol>
|
9 |
-
</modules>
|
10 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/en_US/Holbi_Qixol.csv
DELETED
@@ -1,132 +0,0 @@
|
|
1 |
-
"%s","%s"
|
2 |
-
"Banner Box Manager","Banner Box Manager"
|
3 |
-
"Add Banner box","Add Banner box"
|
4 |
-
"Banner Manager","Banner Manager"
|
5 |
-
"Add Banner Item","Add Banner Item"
|
6 |
-
"Add Shipping Map","Add Shipping Map"
|
7 |
-
"Wrong column format","Wrong column format"
|
8 |
-
"Shipping Name Magento:","Shipping Name Magento:"
|
9 |
-
"Shipping Name To","Shipping Name To"
|
10 |
-
"Edit","Edit"
|
11 |
-
"Delete","Delete"
|
12 |
-
"Shipping Map Information","Shipping Map Information"
|
13 |
-
"Item information","Item information"
|
14 |
-
"Name to be send to quxiol.","Name to be send to quxiol."
|
15 |
-
"Save Item","Save Item"
|
16 |
-
"Delete Item","Delete Item"
|
17 |
-
"Save And Continue Edit","Save And Continue Edit"
|
18 |
-
"Add Item","Add Item"
|
19 |
-
"Edit Item '%s'","Edit Item '%s'"
|
20 |
-
"Banner Box Type","Banner Box Type"
|
21 |
-
"Enabled?","Enabled?"
|
22 |
-
"Translate Type","Translate Type"
|
23 |
-
"Action","Action"
|
24 |
-
"ID","ID"
|
25 |
-
"Image","Image"
|
26 |
-
"Link Name","Link Name"
|
27 |
-
"Title","Title"
|
28 |
-
"Banner Group","Banner Group"
|
29 |
-
"Not defined","Not defined"
|
30 |
-
"Buy one get one free","Buy one get one free"
|
31 |
-
"Buy one get one reduced","Buy one get one reduced"
|
32 |
-
"Bundle","Bundle"
|
33 |
-
"Deal","Deal"
|
34 |
-
"Free product","Free product"
|
35 |
-
"Issue points","Issue points"
|
36 |
-
"Basket reduction","Basket reduction"
|
37 |
-
"Delivery coupon","Delivery coupon"
|
38 |
-
"Product reduction","Product reduction"
|
39 |
-
"Status","Status"
|
40 |
-
"Sort Order","Sort Order"
|
41 |
-
"Default?","Default?"
|
42 |
-
"Are you sure?","Are you sure?"
|
43 |
-
"Change status","Change status"
|
44 |
-
"Qixol","Qixol"
|
45 |
-
"Manage Banners","Manage Banners"
|
46 |
-
"Manage Banner Position","Manage Banner Position"
|
47 |
-
"Manage Shippings Map","Manage Shippings Map"
|
48 |
-
"Qixol Extension","Qixol Extension"
|
49 |
-
"Qixol Setting","Qixol Setting"
|
50 |
-
"General / Intagration","General / Intagration"
|
51 |
-
"Qixol Setting","Qixol Setting"
|
52 |
-
"Enabled","Enabled"
|
53 |
-
"Company Key","Company Key"
|
54 |
-
"Company key assigned to you when you register in Qixol Promo <a href=\"http://www.qixolpromo.com\">click</a>.","Company key assigned to you when you register in Qixol Promo <a href=\"http://www.qixolpromo.com\">click</a>."
|
55 |
-
"Integration Services","Integration Services"
|
56 |
-
"Front-End Settings","Front-End Settings"
|
57 |
-
"Show promotion sticker in cataloge","Show promotion sticker in cataloge"
|
58 |
-
"Show promotion stickers on products on cataloge","Show promotion stickers on products on cataloge"
|
59 |
-
"Show promotion sticker on product","Show promotion sticker on product"
|
60 |
-
"Show promotion stickers on the product page","Show promotion stickers on the product page"
|
61 |
-
"Show promotion boxes","Show promotion boxes"
|
62 |
-
"Show promotion box in cart","Show promotion box in cart"
|
63 |
-
"Show cart related only promotion box","Show cart related only promotion box"
|
64 |
-
"Use Javascript onepage update.","Use Javascript onepage update."
|
65 |
-
"One one page chackout use javascript cart update.","One one page chackout use javascript cart update."
|
66 |
-
"Use Javascript cart update.","Use Javascript cart update."
|
67 |
-
"Cart confirmation use javascript replace.","Cart confirmation use javascript replace."
|
68 |
-
"Use Javascript topcart update.","Use Javascript topcart update."
|
69 |
-
"Top cart javascript replace.","Top cart javascript replace."
|
70 |
-
"Advanced","Advanced"
|
71 |
-
"Basket Validation","Basket Validation"
|
72 |
-
"Shopping Cart Configuration","Shopping Cart Configuration"
|
73 |
-
"Show promotional details","Show promotional details"
|
74 |
-
"Synchronized Items","Synchronized Items"
|
75 |
-
"Synchronization Config","Synchronization Config"
|
76 |
-
"Send real Category as categorycode","Send real Category as categorycode"
|
77 |
-
"Send product categories in attribute categorycode","Send product categories in attribute categorycode"
|
78 |
-
"Stores","For stores"
|
79 |
-
"Synchronise Customer groups","Synchronise Customer groups"
|
80 |
-
"Synchronise Customer groups","Synchronise Customer groups"
|
81 |
-
"Synchronise Shipping Methods","Synchronise Shipping Methods"
|
82 |
-
"Synchronise Curency Sore List","Synchronise Curency Sore List"
|
83 |
-
"Synchronise Stores","Synchronise Stores"
|
84 |
-
"Channel","Channel"
|
85 |
-
"Store Group","Store Group"
|
86 |
-
"The channel and store group are used in the store hierarchy submited to Promo.","The channel and store group are used in the store hierarchy submited to Promo."
|
87 |
-
"Synchronise on Saving","Synchronise on Saving"
|
88 |
-
"Customers","Customers"
|
89 |
-
"Synchronization Config","Synchronization Config"
|
90 |
-
"Synch only this types:","Synch only this types:"
|
91 |
-
"Shippings","Shippings"
|
92 |
-
"Only active","Only active"
|
93 |
-
"Synch only this types:","Synch only this types:"
|
94 |
-
"Products Attributes","Products Attributes"
|
95 |
-
"Include when synch product:",""
|
96 |
-
"Run export products","Run export products"
|
97 |
-
"Export products to qixol.","Export products to qixol."
|
98 |
-
"Run import promotions","Run import promotions"
|
99 |
-
"Import promotions from qixol.","Import promotions from qixol."
|
100 |
-
"Synchronise Products","Synchronise Products"
|
101 |
-
"product export run","product export run"
|
102 |
-
"Export finished","Export finished"
|
103 |
-
"promotion import run","promotion import run"
|
104 |
-
"Import finished","Import finished"
|
105 |
-
"Stickers Manager","Stickers Manager"
|
106 |
-
"Add Sticker","Add Sticker"
|
107 |
-
"Store Name Magento:","Store Name Magento:"
|
108 |
-
"Store Name To","Store Name To"
|
109 |
-
"Store Map Information","Store Map Information"
|
110 |
-
"Use Dafault Banner Promotion?","Use Dafault Banner Promotion?"
|
111 |
-
"Default Banner Promotion name","Default Banner Promotion name"
|
112 |
-
"Unique Banner Promotion refference","Unique Banner Promotion refference"
|
113 |
-
"Products","Products"
|
114 |
-
"Currency","Currency"
|
115 |
-
"Promotions","Promotions"
|
116 |
-
"Imported","Imported"
|
117 |
-
"Manage Stores Map","Manage Stores Map"
|
118 |
-
"Banner boxes Manager","Banner boxes Manager"
|
119 |
-
"Box Manager","Box Manager"
|
120 |
-
"Unable to find item to save","Unable to find item to save"
|
121 |
-
"Item was successfully deleted","Item was successfully deleted"
|
122 |
-
"Please select item(s)","Please select item(s)"
|
123 |
-
"Total of %d record(s) were successfully deleted","Total of %d record(s) were successfully deleted"
|
124 |
-
"Total of %d record(s) were successfully updated","Total of %d record(s) were successfully updated"
|
125 |
-
"Customer Group Map","Customer Group Map"
|
126 |
-
"Customer Groups Map","Customer Groups Map"
|
127 |
-
"Shippings Map","Shippings Map"
|
128 |
-
"Sticker Manager","Sticker Manager"
|
129 |
-
"Item Sticker","Item Sticker"
|
130 |
-
"Stores Map","Stores Map"
|
131 |
-
"Qixol coupon '%s' was applied to your order.","Qixol coupon '%s' was applied to your order."
|
132 |
-
"Qixol coupon '%s' not applicable.","Qixol coupon '%s' not applicable."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
media/custom/banners/File-1459507414.jpg
DELETED
Binary file
|
media/custom/banners/resize/File-1459507414.jpg
DELETED
Binary file
|
media/custom/stickers/File-1460972848.png
DELETED
Binary file
|
media/custom/stickers/bogof.png
ADDED
Binary file
|
media/custom/stickers/bogor.png
ADDED
Binary file
|
media/custom/stickers/bundle.png
ADDED
Binary file
|
media/custom/stickers/deal.png
ADDED
Binary file
|
media/custom/stickers/freeproduct.png
ADDED
Binary file
|
media/custom/stickers/issuecoupon.png
ADDED
Binary file
|
media/custom/stickers/issuepoints.png
ADDED
Binary file
|
media/custom/stickers/offers.png
ADDED
Binary file
|
media/custom/stickers/productsreduction.png
ADDED
Binary file
|
media/custom/stickers/resize/File-1460972848.png
DELETED
Binary file
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Holbi_Qixol</name>
|
4 |
-
<version>0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Qixol Promo</summary>
|
10 |
-
<description>Qixol Promo</description>
|
11 |
-
<notes>
|
12 |
-
|
13 |
-
<
|
14 |
-
<
|
15 |
-
<contents><target name="magecommunity"><dir name="Holbi"><dir name="Qixol"><dir name="Block"><dir name="Adminhtml"><dir name="Banner"><dir name="Edit"><file name="Form.php" hash="d71914390aab1875d9fb2413f4d04613"/><dir name="Tab"><file name="Form.php" hash="6e65041a8706b168f9a4eb4962a586a8"/></dir><file name="Tabs.php" hash="a5fd5d419c05984afde1327e9786c5ef"/></dir><file name="Edit.php" hash="ebe0882eb9fecd3f3d0d8087f0924ae6"/><file name="Grid.php" hash="a2ad1c0c3070bd8972029be05b7146b0"/></dir><file name="Banner.php" hash="e7803ebe90ef08deebbd2cbf9abb0c6b"/><dir name="Bannerboxes"><dir name="Edit"><file name="Form.php" hash="d6c3af85c039ed10bd4b5298e5a8fdf7"/><dir name="Tab"><file name="Form.php" hash="4283e54a04538c7f41e90cd3d1b179d6"/></dir><file name="Tabs.php" hash="6816f2f18877aec8ffb85a367437894a"/></dir><file name="Edit.php" hash="dba2ea53db50ed2b4bf74c3140354999"/><file name="Grid.php" hash="783889924b3df86b383ea1e6c3332f55"/></dir><file name="Bannerboxes.php" hash="d5cf8e6e5aff896fc223ae0865ace01f"/><dir name="Customergrouspmap"><dir name="Edit"><file name="Form.php" hash="c1b3cc172df6031509a311cb86117432"/><dir name="Tab"><file name="Form.php" hash="51c06cf0172fcfd588c7a478112cda4e"/></dir><file name="Tabs.php" hash="e2e12aae00892771e646299d780b86fb"/></dir><file name="Edit.php" hash="9c34b4674745e4e7d2338ded7fa5fffb"/><file name="Grid.php" hash="ca515bbc1cfa5b08e880446ce2fc7a57"/></dir><file name="Customergrouspmap.php" hash="396275064dd3113b1eb77e047b8da3e4"/><file name="Qixolbackend.php" hash="4d0e68d1a93e34828845546f73632da3"/><dir name="Sales"><dir name="Order"><file name="Total.php" hash="130b2e3ac9addf6c549ca28f4f7601be"/></dir></dir><dir name="Shippingmap"><dir name="Edit"><file name="Form.php" hash="b97943e0a024201b7dce5f87a466386f"/><dir name="Tab"><file name="Form.php" hash="42d23355f861bb11478d819aac4cd272"/></dir><file name="Tabs.php" hash="43cc0071d7150372f405c90e2aeff8d3"/></dir><file name="Edit.php" hash="632f884ff1f13c8783fac29fa159d68d"/><file name="Grid.php" hash="65263b3b765ea6fe178b25b79457f06d"/></dir><file name="Shippingmap.php" hash="12bbf577948da9ed308c35c23c6a9557"/><dir name="Sticker"><dir name="Edit"><file name="Form.php" hash="5c9cfe98d9f675c2d80659bd5d102480"/><dir name="Tab"><file name="Form.php" hash="657537928a3a9abd32f0043a44441257"/></dir><file name="Tabs.php" hash="c5030382b2dce637cb01876ba3516cec"/></dir><file name="Edit.php" hash="28df2c2abab10786fc402dc7707705a0"/><file name="Grid.php" hash="b9e23d604679448bf17995c6f6f6585c"/></dir><file name="Sticker.php" hash="bfd8e13b42c6d87e70ac897e11077592"/><dir name="Storesmap"><dir name="Edit"><file name="Form.php" hash="49d409972ca75ba6376df6aae3070311"/><dir name="Tab"><file name="Form.php" hash="928d701c1cf95861eda1a0bef9bd7176"/></dir><file name="Tabs.php" hash="204a1c126c905dfe1e31cfffa846d2e9"/></dir><file name="Edit.php" hash="f43946f32e4c3d0494c048ea6cf00803"/><file name="Grid.php" hash="6e773cc5594269e3fa0b6b7990df1d0b"/></dir><file name="Storesmap.php" hash="2842e7961008c9e239ee1173335a5f7d"/><dir name="System"><dir name="Config"><file name="Attributes.php" hash="77e2e0b38c4e66e3777fc9650513cf43"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Banner.php" hash="c2acfb4db1186c499558ca567eb48ff6"/></dir><dir name="Renderer"><file name="Banner.php" hash="296d1e458e6e9c7ef7f6a61f15a88006"/><file name="Sticker.php" hash="2d46519cc50d358210763f6bcbb53cf6"/></dir></dir><file name="Column.php" hash="24649c123824e02fc5bc0065a2e10b9f"/></dir><file name="Grid.php" hash="67c71f7b791a9ddc3920acc817460842"/></dir></dir><file name="Banner.php" hash="62bca7639d22f76f6133e02c9fed05b7"/><file name="Bannerboxes.php" hash="93d126ad3d9245c31eec24c7840bc6df"/><file name="Customergrouspmap.php" hash="7c332c2486315898244effc7376e31f4"/><file name="Issuedcoupon.php" hash="9d55be59c65290b8e59a718f3b401f48"/><dir name="Sales"><file name="Creditmemo.php" hash="92cda7a592b436d3c041f901537b0e29"/><file name="Invoice.php" hash="74fbc325806674d1efd40c58eb8ed24b"/><dir name="Order"><file name="Total.php" hash="1fee6af13f937861c6515ffb05b875c9"/></dir><file name="Order.php" hash="e347cf1a2dd983f1bad98e001cc97f09"/></dir><file name="Shippingmap.php" hash="152317fea90f4a8245a990b6a21d3886"/><file name="Startexportbutton.php" hash="484b3948e3c3aea48e2d2cc6844c5dac"/><file name="Startimportbutton.php" hash="6bdcd1e205b4d88fdf2202c789f4a2bc"/><file name="Sticker.php" hash="9b6c1dddb45b4cacda8d57b02412d84d"/><file name="Storesmap.php" hash="65d09ba7ed0481da9259dcec979f3fd9"/></dir><dir name="Helper"><file name="Data.php" hash="98c158b7a0bb71b0a6d1f59a4862691d"/></dir><dir name="Model"><file name="Advert.php" hash="e58c3ad343d964711f1e54859563725b"/><file name="Banner.php" hash="212456b3d92ff0e757a50ed5606146fb"/><file name="Bannerboxes.php" hash="bb4acb463a52a89d0063b8e949db5c46"/><file name="Bannerimages.php" hash="a760b4a6181afa849a5aec18cdec5d5a"/><file name="Bannerresize.php" hash="0c6f139d85181eb5f87b25acc4466688"/><file name="Bonuspoints.php" hash="69473842674ac8e73f62cd3576a8fde8"/><file name="Creditmemopoints.php" hash="8f358656a81dbecbe6e52838ad3c7250"/><file name="Cron.php" hash="e06f60c416737838485c484b8495760b"/><file name="Customergrouspmap.php" hash="18a434ca18a3fcff2fcc4ca9d00546ee"/><file name="Deletedproduct.php" hash="5094bd3b2fc5d4351090274a9aeaac58"/><file name="Exportstat.php" hash="25f805f0b75e288f7028368be3c8ef97"/><file name="Exprpocessstat.php" hash="cbf898eae206c986208df350ca99daa8"/><file name="Invoicepoints.php" hash="cc5323b8a47f52ea997f75d6955ece54"/><file name="Issuedcoupon.php" hash="d58a9cb376c05b6bab2d752294e09240"/><dir name="Mysql4"><dir name="Banner"><file name="Collection.php" hash="a6e42a9870849271c905c9afd5797146"/></dir><file name="Banner.php" hash="82a41ee8e5bf97bd496daf2d5722a61f"/><dir name="Bannerboxes"><file name="Collection.php" hash="660b47e973bccd7476f417a1180047c0"/></dir><file name="Bannerboxes.php" hash="619c0bbebe9998c4f4a08e64c6981433"/><dir name="Bannerimages"><file name="Collection.php" hash="fc19451f38ea15d2dedba512a30e7d3a"/></dir><file name="Bannerimages.php" hash="5eafd1b353d0837cccfb5bd81467ae0d"/><dir name="Bonuspoints"><file name="Collection.php" hash="ecb2d5983d7a6427095c3d19fe669c96"/></dir><file name="Bonuspoints.php" hash="884d4799506f9756f782c18afa348b19"/><dir name="Customergrouspmap"><file name="Collection.php" hash="ad86722b8b7df02099df0303cec67741"/></dir><file name="Customergrouspmap.php" hash="2d6d2d92fbfd3abdb89d165f9f85ed3a"/><dir name="Deletedproduct"><file name="Collection.php" hash="2c684f9f6bc07a2c2d628273792ea944"/></dir><file name="Deletedproduct.php" hash="82b3f14c209563687ab8f46326cba1b5"/><dir name="Exportstat"><file name="Collection.php" hash="652408a7900b75b6d6ff12fccabeac62"/></dir><file name="Exportstat.php" hash="42bbc370d24ea0378615154e3f0609cc"/><dir name="Exprpocessstat"><file name="Collection.php" hash="3276373ca5eac84f0c02f61ecd7b4bb7"/></dir><file name="Exprpocessstat.php" hash="9d21536935477e42e007a583ef01f702"/><dir name="Issuedcoupon"><file name="Collection.php" hash="d6777620dec2ee1576b3a6bf348ae471"/></dir><file name="Issuedcoupon.php" hash="8e833c092f6a233ae4f90844a670cc20"/><dir name="Promotions"><file name="Collection.php" hash="cb03ee5a074e2b33d262f6791ec8546e"/></dir><file name="Promotions.php" hash="0ec34451a06f915011e6748b79119a43"/><dir name="Shippingmap"><file name="Collection.php" hash="fcd435cf002813799807b7162d3d3ed6"/></dir><file name="Shippingmap.php" hash="f0a339441e70f7b0a9c93b4e51e9ddba"/><dir name="Sticker"><file name="Collection.php" hash="e053aa1e885d6e088a42b9422a34b2d4"/></dir><file name="Sticker.php" hash="267d84eace8e01df78757d52d293ffc0"/><dir name="Storesmap"><file name="Collection.php" hash="6522df844fb0a112f7a2fc5fc2231b0f"/></dir><file name="Storesmap.php" hash="ed88a28b499ada6c9caec701a578252b"/></dir><file name="Observer.php" hash="64257a56611bf2b9cd916894be6b92d5"/><file name="Ordertotalpoints.php" hash="b130e1dda5d8dce5ea1326fe1a6938f0"/><file name="Promotions.php" hash="3f27c9cf03e1313173d80114f86f0ea7"/><file name="Shippingmap.php" hash="5934ad1ce43f54fe471f6b28eb4bf40d"/><file name="Sinch.php" hash="b9b40dee529aa13e6790c9805d2e300f"/><file name="Status.php" hash="1af6751454ee49a639ee4a1a80d4e1eb"/><file name="Sticker.php" hash="18d49365d84cf60d0a63145b69fe85b0"/><file name="Storesmap.php" hash="334e0504f520bb8d83c34880d16875ac"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="d784f4eded271f604e5dca79f0241463"/><dir name="Cart"><file name="Settings.php" hash="046910c563a1db3dc0c254b5c432ba79"/></dir><dir name="Customers"><file name="List.php" hash="616d7245643beb825c6707416f5f8a27"/></dir><dir name="Iservices"><file name="Values.php" hash="dae568b7699e00ec52ab4a89ba4fa672"/></dir><dir name="Shippings"><file name="List.php" hash="f018937ee8c0f629b1ac5bbc0b7a1a1d"/></dir><file name="Stores.php" hash="c6bda52815c10d26191c6b76b739e8b0"/></dir></dir></dir><dir name="Wysiwyg"><file name="Config.php" hash="90f8c29f21e08ba904372d442a3763d0"/></dir><file name="config.php" hash="791d755b14b819157cc5fca81852be40"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BannerController.php" hash="c1afb0ed57c19a39e70f75566866c8be"/><file name="BannerboxesController.php" hash="18bcc6a4174715ba3b09ba41002a5f74"/><file name="CustomergrouspmapController.php" hash="e76d0ce7609541ed3d410515b58cf920"/><file name="QixolbackendController.php" hash="ac6b9e50ee761186e7057f8a4d49ca14"/><file name="ShippingmapController.php" hash="6a669e3830ffec4b767c6c4d69c6b9f0"/><file name="StickerController.php" hash="470d66f98789030a7c85d62c8782986f"/><file name="StoresmapController.php" hash="c43892e5d05980d15ae4ac64a4bd50ca"/></dir><file name="AjaxController.php" hash="34da1d4782504ad8eb61ad615e650526"/><file name="CartController.php" hash="8d1081bb9a993c8c2a00162b6c815b37"/><file name="IndexController.php" hash="402d66f4fc4b61d7b68d633dde27c482"/><file name="IssuedcouponController.php" hash="f979cc85991b4c512762812f0b5b6ff6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9f4fe1ad17beda87ffb36f9185352da5"/><file name="config.xml" hash="4e4a1351686522f604e29dad71055f48"/><file name="system.xml" hash="dbc99cf01d73353b4339211e11ce5302"/></dir><dir name="sql"><dir name="qixol_setup"><file name="mysql4-install-0.1.0.php" hash="26e3086b2acedb2a05b4f4dd5883cb03"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="qixol.xml" hash="9c29c3af1f828ce9409e19dd2c4997bf"/></dir><dir name="template"><dir name="qixol"><dir name="cart"><file name="advert.phtml" hash="b0edba9e87f90ed3936b4543078dd4bf"/><file name="bonuspointbox.phtml" hash="558a50838ea7148dd106850850497231"/><file name="cart.phtml" hash="6b3f6b3911446fbf32b93e1ac7887272"/><dir name="item"><file name="default.phtml" hash="aea076b7e11eec60a5679bec0afe0160"/></dir><file name="totals.phtml" hash="32fa9abb563b44dc2d47434c709f8ae2"/></dir><dir name="issuedcoupon"><file name="list.phtml" hash="cefe204c4b02ab55ef1a291fedd6e09a"/></dir><dir name="issuedpoints"><file name="box.phtml" hash="2d534d83303b774cc4b254d1612771b7"/><file name="dashboard_points.phtml" hash="aafc7550392e7d335b5275317fc8adfb"/></dir><dir name="minicart"><file name="advert.phtml" hash="ba608046e14a5256aa7aa4de00a5b4c8"/><file name="default.phtml" hash="1558c016fb475639bef78c86a98fca65"/><file name="mincart.phtml" hash="1a8aa6db499d9a896e2768b4c4206af6"/></dir><dir name="myaccount"><dir name="order"><dir name="email"><file name="default.phtml" hash="85f8299e6bf0a7d8a2e0760bfe247fe8"/><file name="items.phtml" hash="b644e367111d6da7eb3f7d38e25e10d4"/></dir><dir name="invoice"><file name="default.phtml" hash="8d3f98f1b23f4d336b24b1f2082cfa11"/><file name="invoice.phtml" hash="07a7eeb965726d75509efd39ba065ccd"/></dir><dir name="items"><file name="default.phtml" hash="273be10efd43ed4fa15d7b0617be54a6"/><file name="items.phtml" hash="aa9fc3723982ecc1c46c3bc9c752ecbc"/></dir><dir name="print"><file name="default.phtml" hash="df6637723ed3614b4ef55716d2ec6b4a"/><file name="messages.phtml" hash="952bccf9afe8e4c04306f70f7bed6610"/><file name="print.phtml" hash="79d9b8e56c74d3e8c9d1b239440f611d"/></dir></dir></dir><dir name="onepage"><file name="advert.phtml" hash="a62651791334d131ed6cc01638b2488a"/><file name="item.phtml" hash="e1cb72018ef4c415c7ec1ae3194a0681"/><file name="review.phtml" hash="2676aaaea6b2f041d3166084f1f5b87d"/></dir><dir name="product"><file name="qixol_adv.phtml" hash="303b6597fcde958595a8fdc82f62c43c"/><file name="qixol_info_details.phtml" hash="f3977e56147100a3cf13f67fd76d792e"/><file name="qixol_product_info.phtml" hash="39f0565311a2c7ada4df7ea43c1f926f"/></dir><dir name="sidebar"><file name="advert.phtml" hash="b7ecad79b3f7e2de4690c0245c380f82"/><file name="default.phtml" hash="317f41c1259a37e576827ead92683945"/><file name="sidebar.phtml" hash="1324c07adc3ceb719e910add0e613e18"/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="qixol"><dir name="minicart"><file name="advert.phtml" hash="ba608046e14a5256aa7aa4de00a5b4c8"/><file name="default.phtml" hash="e59d0727333f190f5e4ca17d903cf233"/><file name="mincart.phtml" hash="1a8aa6db499d9a896e2768b4c4206af6"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="qixol.xml" hash="91d82605756c495c2fc4002642b48f36"/></dir><dir name="template"><dir name="qixol"><file name="bannerboxes.phtml" hash="947eb49c5f7420e1442141024ae80e92"/><file name="banners.phtml" hash="188b11b26646abbed6f0c6c9e68cc1f7"/><file name="customergrouspmap.phtml" hash="947eb49c5f7420e1442141024ae80e92"/><dir name="order"><file name="advert.phtml" hash="0456514c76c469e25b64ca9152480838"/></dir><file name="qixolbackend.phtml" hash="3012313aed77e18b6294c7fc4f4bb8ec"/><file name="shippingmap.phtml" hash="947eb49c5f7420e1442141024ae80e92"/><file name="stickers.phtml" hash="188b11b26646abbed6f0c6c9e68cc1f7"/><file name="storesmap.phtml" hash="947eb49c5f7420e1442141024ae80e92"/><dir name="system"><dir name="config"><file name="attributes.phtml" hash="a8aa43dd93f3e775cd9c3b8a236ab318"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Holbi_Qixol.csv" hash="23218037ec52ca71df65dac18a5771a4"/></dir></target><target name="mageetc"><dir name="modules"><file name="Holbi_Qixol.xml" hash="59d6337543a22d444bfe06576926a63f"/></dir></target><target name="magemedia"><dir name="custom"><dir name="banners"><file name="File-1459507414.jpg" hash="26b1b67be785a51f43505b629d31837a"/><dir name="resize"><file name="File-1459507414.jpg" hash="26b1b67be785a51f43505b629d31837a"/></dir></dir><dir name="stickers"><file name="File-1460972848.png" hash="15e3e653f3efd82a4f619cc253813038"/><dir name="resize"><file name="File-1460972848.png" hash="15e3e653f3efd82a4f619cc253813038"/></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="_run.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="_yes.gif" hash="0afb20898a704a106cb4c598868abf32"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="qixol.css" hash="e69d3270a5014f45c607a1d335b687ef"/></dir><dir name="images"><dir name="qixol"><file name="BASKETREDUCTION.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="BOGOF.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="BOGOR.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="BUNDLE.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="DEAL.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="DELIVERYREDUCTION.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="FREEPRODUCT.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="ISSUECOUPON.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="ISSUEPOINTS.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="PRODUCTSREDUCTION.png" hash="f192b6bf609a7db2857e923b8b36ab08"/><file name="red_sales_sticker_pv.png" hash="f192b6bf609a7db2857e923b8b36ab08"/></dir></dir><dir name="js"><dir name="lib"><file name="jquery.cycle2.min.js" hash="24f809434b3e494cc7b98c6c08404b33"/><file name="jquery.cycle2.swipe.min.js" hash="15747fbd45dd1adcaf8f04a2d8a71d68"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="var"><dir name="logs_qixol"><file name="logs_here.txt" hash="68b329da9893e34099c7d8ad5cb9c940"/></dir></dir></target></contents>
|
|
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Holbi_Qixol</name>
|
4 |
+
<version>0.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Qixol Promo extension</summary>
|
10 |
+
<description>Qixol Promo extension</description>
|
11 |
+
<notes>1. REST service consumer added
|
12 |
+
2. other minor improvements</notes>
|
13 |
+
<authors><author><name>Qixol</name><user>KenWestgate</user><email>ken.westgate@qixol.com</email></author><author><name>Holbi</name><user>sbukovetsky</user><email>sbukovetsky@holbi.co.uk</email></author></authors>
|
14 |
+
<date>2016-08-24</date>
|
15 |
+
<time>14:50:09</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Holbi"><dir name="Qixol"><dir name="Block"><dir name="Adminhtml"><dir name="Banner"><dir name="Edit"><dir name="Bannerimage"><file name="Grid.php" hash="b826358c0c67906092d8061bb75b460e"/><dir name="Tab"><file name="Form.php" hash="17a060f6c99fc04b9f6d09fbee187a78"/></dir></dir><file name="Form.php" hash="ee047b94f20984954d51b88c9ab7906b"/><dir name="Tab"><file name="Bannerimage.php" hash="95f6f783938fd59bf04a9ad1532e1cd4"/><file name="Form.php" hash="60e58817b3ca5380e8ed58d2dd4345d4"/></dir><file name="Tabs.php" hash="f8e88b0fb84b08c3b88abb861a7cd796"/></dir><file name="Edit.php" hash="2eb03ebbe02d1a9ea5685ff071abc98f"/><file name="Grid.php" hash="454d799c03fd9c10ca051d740a4fd69f"/></dir><file name="Banner.php" hash="226fe027ed41f1beb5138712173bf2fe"/><dir name="Bannerboxes"><dir name="Edit"><file name="Form.php" hash="fad605fa77ff529c125dfa93b12c957f"/><dir name="Tab"><file name="Form.php" hash="4d6b46df7e676530cee57f2967d32c00"/></dir><file name="Tabs.php" hash="71a89a22d333e7d914c7b0457e0361ac"/></dir><file name="Edit.php" hash="f81762e0ef3fa37aaf564226b021c604"/><file name="Grid.php" hash="b396ef19ca37f3895f79665849f21ed8"/></dir><file name="Bannerboxes.php" hash="d5cf8e6e5aff896fc223ae0865ace01f"/><dir name="Bannerimage"><dir name="Edit"><file name="Form.php" hash="89a571930fb1ea6d3045c8dee4401ae0"/><dir name="Tab"><file name="Form.php" hash="bac50656a496b2845e84905e544b7631"/></dir><file name="Tabs.php" hash="259df566e619a043af93845cc3f31747"/></dir><file name="Edit.php" hash="55f22673ebf2ff9ce0b5bdc2fb5560bc"/></dir><file name="Bannerimage.php" hash="a4782568fb2780601752e134be02496c"/><dir name="Customergrouspmap"><dir name="Edit"><file name="Form.php" hash="facba6257c168e93867b50240ed0bcc0"/><dir name="Tab"><file name="Form.php" hash="536d10054e06296b3322a16e3e44903e"/></dir><file name="Tabs.php" hash="04b72a28c5d8d603b3e01687bf70264c"/></dir><file name="Edit.php" hash="614b03d590ed52e14e68c063e0062bb9"/><file name="Grid.php" hash="f55b1478d3274236ce69507110fcc37a"/></dir><file name="Customergrouspmap.php" hash="1026d1b232abb4a93871ecefda3cbafb"/><file name="Qixolbackend.php" hash="4d0e68d1a93e34828845546f73632da3"/><dir name="Sales"><dir name="Order"><file name="Total.php" hash="130b2e3ac9addf6c549ca28f4f7601be"/></dir></dir><dir name="Shippingmap"><dir name="Edit"><file name="Form.php" hash="a45c9eec6e2cd83b01846d0e51a1188a"/><dir name="Tab"><file name="Form.php" hash="820b6e124b4d51f66de520c36884a8a8"/></dir><file name="Tabs.php" hash="203a6f579710201083a49eb22d198144"/></dir><file name="Edit.php" hash="83bf7c0d29066768cefcabcee08483ed"/><file name="Grid.php" hash="52aed826cf6049f7557fb6525fdb8bbe"/></dir><file name="Shippingmap.php" hash="e105520061c1b90f0a08bfca079c9b51"/><dir name="Sticker"><dir name="Edit"><file name="Form.php" hash="94914355411e35a0bd1d474b1e24b167"/><dir name="Tab"><file name="Form.php" hash="da05b18a29c528b5ddb9f53d2c126b54"/></dir><file name="Tabs.php" hash="b4fa471d000f81cefa45115966703213"/></dir><file name="Edit.php" hash="03273b6d084fe05896056bfe3afa6f05"/><file name="Grid.php" hash="a09b4e1cd9010b418b1347fa0c7289fd"/></dir><file name="Sticker.php" hash="16b3dcc85511717dbe938a116d6d806e"/><dir name="Storesmap"><dir name="Edit"><file name="Form.php" hash="d076c1b057debc3003818b69133c4d04"/><dir name="Tab"><file name="Form.php" hash="8089507e866b0bf1a74aeac622d83578"/></dir><file name="Tabs.php" hash="f562922937ea900e32459b0427e20043"/></dir><file name="Edit.php" hash="96a0506218be245a4ee9774bd2666e34"/><file name="Grid.php" hash="7fe55085504ae4206560070c61781308"/></dir><file name="Storesmap.php" hash="2347f61f16935f0df0a0951a59da4470"/><dir name="System"><dir name="Config"><file name="Attributes.php" hash="77e2e0b38c4e66e3777fc9650513cf43"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Banner.php" hash="3574c7927776146bf9b16844afd8d183"/></dir><dir name="Renderer"><file name="Banner.php" hash="e8a93b3fbb55e2c0391bbe34585a392c"/><file name="Sticker.php" hash="a1f8867250e5ab7f5529431d673d8d33"/></dir></dir><file name="Column.php" hash="79fe6c325c9c7cb24b0f74686ff0f89a"/></dir><file name="Grid.php" hash="67c71f7b791a9ddc3920acc817460842"/></dir></dir><file name="Banner.php" hash="abe2ce68291c7bacdbf08f31ed0c1127"/><file name="Bannerboxes.php" hash="93d126ad3d9245c31eec24c7840bc6df"/><file name="Customergrouspmap.php" hash="7c332c2486315898244effc7376e31f4"/><file name="Issuedcoupon.php" hash="9d55be59c65290b8e59a718f3b401f48"/><dir name="Sales"><file name="Creditmemo.php" hash="92cda7a592b436d3c041f901537b0e29"/><file name="Invoice.php" hash="74fbc325806674d1efd40c58eb8ed24b"/><dir name="Order"><file name="Total.php" hash="1fee6af13f937861c6515ffb05b875c9"/></dir><file name="Order.php" hash="e347cf1a2dd983f1bad98e001cc97f09"/></dir><file name="Shippingmap.php" hash="152317fea90f4a8245a990b6a21d3886"/><file name="Startexportbutton.php" hash="484b3948e3c3aea48e2d2cc6844c5dac"/><file name="Startimportbutton.php" hash="6bdcd1e205b4d88fdf2202c789f4a2bc"/><file name="Sticker.php" hash="27b6c35e545dbd1b050f8597c3d525b0"/><file name="Storesmap.php" hash="65d09ba7ed0481da9259dcec979f3fd9"/></dir><dir name="Helper"><file name="Data.php" hash="98c158b7a0bb71b0a6d1f59a4862691d"/></dir><dir name="Model"><file name="Advert.php" hash="8fb409d4e0ee40deeefc2dd25176a238"/><file name="Banner.php" hash="d4444b950b94927b7696a3ad9784b407"/><file name="Bannerboxes.php" hash="d0bb822a7cb1cb3cf140c297c01744d0"/><file name="Bannerimage.php" hash="bda43fde1b1c854bae838dc29951078a"/><file name="Bannerresize.php" hash="0c6f139d85181eb5f87b25acc4466688"/><file name="Bonuspoints.php" hash="69473842674ac8e73f62cd3576a8fde8"/><file name="Creditmemopoints.php" hash="8f358656a81dbecbe6e52838ad3c7250"/><file name="Cron.php" hash="e06f60c416737838485c484b8495760b"/><file name="Customergrouspmap.php" hash="3c6d9905c79b0650b1cb4e80eef77047"/><file name="Deletedproduct.php" hash="5094bd3b2fc5d4351090274a9aeaac58"/><file name="Exportstat.php" hash="25f805f0b75e288f7028368be3c8ef97"/><file name="Exprpocessstat.php" hash="cbf898eae206c986208df350ca99daa8"/><file name="Invoicepoints.php" hash="cc5323b8a47f52ea997f75d6955ece54"/><file name="Issuedcoupon.php" hash="d58a9cb376c05b6bab2d752294e09240"/><dir name="Mysql4"><dir name="Banner"><file name="Collection.php" hash="522c4b6c8224aabeae99c3115a3d8067"/></dir><file name="Banner.php" hash="5a5dfac37bc8085b5a5b6da399a7dc62"/><dir name="Bannerboxes"><file name="Collection.php" hash="5d5ac7f0035516a1ee160ef3398c2e5a"/></dir><file name="Bannerboxes.php" hash="619c0bbebe9998c4f4a08e64c6981433"/><dir name="Bannerimage"><file name="Collection.php" hash="c6eb30bf93ac2756b95fc3df88ebdb99"/></dir><file name="Bannerimage.php" hash="ed7d0bb68f9617ba3be312755d63cfd1"/><dir name="Bonuspoints"><file name="Collection.php" hash="ecb2d5983d7a6427095c3d19fe669c96"/></dir><file name="Bonuspoints.php" hash="884d4799506f9756f782c18afa348b19"/><dir name="Customergrouspmap"><file name="Collection.php" hash="c112ec4dc7fa3f930ace519e2d465120"/></dir><file name="Customergrouspmap.php" hash="2d6d2d92fbfd3abdb89d165f9f85ed3a"/><dir name="Deletedproduct"><file name="Collection.php" hash="2c684f9f6bc07a2c2d628273792ea944"/></dir><file name="Deletedproduct.php" hash="82b3f14c209563687ab8f46326cba1b5"/><dir name="Exportstat"><file name="Collection.php" hash="652408a7900b75b6d6ff12fccabeac62"/></dir><file name="Exportstat.php" hash="42bbc370d24ea0378615154e3f0609cc"/><dir name="Exprpocessstat"><file name="Collection.php" hash="3276373ca5eac84f0c02f61ecd7b4bb7"/></dir><file name="Exprpocessstat.php" hash="9d21536935477e42e007a583ef01f702"/><dir name="Issuedcoupon"><file name="Collection.php" hash="d6777620dec2ee1576b3a6bf348ae471"/></dir><file name="Issuedcoupon.php" hash="8e833c092f6a233ae4f90844a670cc20"/><dir name="Promotions"><file name="Collection.php" hash="cb03ee5a074e2b33d262f6791ec8546e"/></dir><file name="Promotions.php" hash="0ec34451a06f915011e6748b79119a43"/><dir name="Shippingmap"><file name="Collection.php" hash="7bdfcb05a2490096b6e3a343b4d6b4b7"/></dir><file name="Shippingmap.php" hash="f0a339441e70f7b0a9c93b4e51e9ddba"/><dir name="Sticker"><file name="Collection.php" hash="37b4efff774077fa1aefbe6330482fa7"/></dir><file name="Sticker.php" hash="dcdb998abd6525048ad6fd2cb2200480"/><dir name="Storesmap"><file name="Collection.php" hash="bd36e5cbb269a8ad78cc69b01ed5b02e"/></dir><file name="Storesmap.php" hash="ed88a28b499ada6c9caec701a578252b"/></dir><file name="Observer.php" hash="64257a56611bf2b9cd916894be6b92d5"/><file name="Ordertotalpoints.php" hash="b130e1dda5d8dce5ea1326fe1a6938f0"/><file name="PromoService.php" hash="ef1bc8d7f805e6fbc463461d8c2932ae"/><file name="Promotions.php" hash="3f27c9cf03e1313173d80114f86f0ea7"/><file name="RESTPromoService.php" hash="2e260bd070a7a6b5d1949b41e9d8ab27"/><file name="SOAPPromoService.php" hash="d2e846f466721f6064d57eb17c31f7b0"/><file name="Shippingmap.php" hash="772b084b114506784ca207eabc96ad8d"/><file name="Sinch.php" hash="300d7d43f7cca902a0a45bd963ac99c7"/><file name="Status.php" hash="c2e51fdeae0aac75d94abf582536266e"/><file name="Sticker.php" hash="54a57844ba902455523bfe019f840006"/><file name="Storesmap.php" hash="28877d4e5341394aede5e67be2f2e8c0"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="d784f4eded271f604e5dca79f0241463"/><dir name="Cart"><file name="Settings.php" hash="046910c563a1db3dc0c254b5c432ba79"/></dir><dir name="Customers"><file name="List.php" hash="616d7245643beb825c6707416f5f8a27"/></dir><dir name="IServiceProtocols"><file name="Values.php" hash="e60bbe8b9fa5f37b8239432ca9601e6d"/></dir><dir name="Iservices"><file name="Values.php" hash="06246b912c4906ae881e50fa38cfac13"/></dir><dir name="Shippings"><file name="List.php" hash="b4c320d9b8b7a728fba1548b553b34cd"/></dir><file name="Stores.php" hash="c6bda52815c10d26191c6b76b739e8b0"/></dir></dir></dir><dir name="Wysiwyg"><file name="Config.php" hash="90f8c29f21e08ba904372d442a3763d0"/></dir><file name="config.php" hash="791d755b14b819157cc5fca81852be40"/><file name="iPromoService.php" hash="64c9025036d03e8113fb53331d0c0634"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BannerController.php" hash="b77953e812e6987e38190ef5b2eec0ec"/><file name="BannerboxesController.php" hash="18bcc6a4174715ba3b09ba41002a5f74"/><file name="BannerimageController.php" hash="72ec334feffcd440476a6ee66e13341b"/><file name="CustomergrouspmapController.php" hash="7b43f6ebefaef64dc4b1a32628080343"/><file name="QixolbackendController.php" hash="ac6b9e50ee761186e7057f8a4d49ca14"/><file name="ShippingmapController.php" hash="07d5bff7eae7a245a11b1f0efa59306d"/><file name="StickerController.php" hash="81a9a9bf82fc8e341ae4e327fd9e9fa8"/><file name="StoresmapController.php" hash="dae78527546638efa6cacaeab30c83fc"/></dir><file name="AjaxController.php" hash="045c09dfcfc1939d6d2b2b4bfa76a2e8"/><file name="CartController.php" hash="8d1081bb9a993c8c2a00162b6c815b37"/><file name="IndexController.php" hash="402d66f4fc4b61d7b68d633dde27c482"/><file name="IssuedcouponController.php" hash="f979cc85991b4c512762812f0b5b6ff6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8556d700b717ed3611010105b873c9ef"/><file name="config.xml" hash="df397eecf9ef47798fc1eab67f23f352"/><file name="system.xml" hash="66c215d60eae7e1112ca3a4e49dacfc9"/></dir><dir name="sql"><dir name="qixol_setup"><file name="mysql4-install-0.1.0.php" hash="09d3720c99d7ac8e8ace050f0fed8e0a"/><file name="mysql4-install-0.2.0.php" hash="12a54a3c5d016ee40ef21ea98ab65064"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="9c9398c94ba17677036ed137a040a2d5"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="base"><dir name="default"><dir name="layout"><file name="qixol.xml" hash=""/></dir></dir></dir></target><target name="magelocale"><dir name="."><file name="Holbi_Qixol.xml" hash=""/></dir></target><target name="magemedia"><dir name="custom"><dir name="stickers"><file name="bogof.png" hash="f2e5e0b523b88d158b5a3cd9536cba2f"/><file name="bogor.png" hash="29c394e676fbf47b0231e53c3e506aa8"/><file name="bundle.png" hash="b4cb00ec06de891ef41b9a35ab0073b8"/><file name="deal.png" hash="ec2917f52f90ab9d88c9c569412cf36e"/><file name="freeproduct.png" hash="b4cb00ec06de891ef41b9a35ab0073b8"/><file name="issuecoupon.png" hash="b4cb00ec06de891ef41b9a35ab0073b8"/><file name="issuepoints.png" hash="b4cb00ec06de891ef41b9a35ab0073b8"/><file name="offers.png" hash="b4cb00ec06de891ef41b9a35ab0073b8"/><file name="productsreduction.png" hash="84ce3d4534d3694d115f0fe8e02db2da"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="_run.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="_yes.gif" hash="0afb20898a704a106cb4c598868abf32"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="qixol.css" hash="e0d82ed614c8071e5eb2d1d56ad7c2e2"/></dir><dir name="js"><dir name="lib"><file name="jquery.cycle2.min.js" hash="24f809434b3e494cc7b98c6c08404b33"/><file name="jquery.cycle2.swipe.min.js" hash="15747fbd45dd1adcaf8f04a2d8a71d68"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
skin/frontend/base/default/css/qixol.css
CHANGED
@@ -97,14 +97,20 @@ margin-right: 10px;
|
|
97 |
line-height:32px;
|
98 |
}
|
99 |
.cycle-slideshow{
|
100 |
-
height:100px
|
|
|
101 |
}
|
102 |
.product_all_promotions{
|
103 |
width:100%;
|
|
|
104 |
}
|
105 |
.product_all_promotions table{
|
106 |
border:1px solid;
|
107 |
}
|
108 |
.product_all_promotions th{
|
109 |
background-color:#DDDDEE;
|
|
|
|
|
|
|
|
|
110 |
}
|
97 |
line-height:32px;
|
98 |
}
|
99 |
.cycle-slideshow{
|
100 |
+
/*height:100px;*/
|
101 |
+
display: inline-block;
|
102 |
}
|
103 |
.product_all_promotions{
|
104 |
width:100%;
|
105 |
+
padding-bottom: 10px;
|
106 |
}
|
107 |
.product_all_promotions table{
|
108 |
border:1px solid;
|
109 |
}
|
110 |
.product_all_promotions th{
|
111 |
background-color:#DDDDEE;
|
112 |
+
padding-left: 5px;
|
113 |
+
}
|
114 |
+
.product_all_promotions td{
|
115 |
+
padding-left: 5px;
|
116 |
}
|
skin/frontend/base/default/images/qixol/BASKETREDUCTION.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/BOGOF.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/BOGOR.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/BUNDLE.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/DEAL.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/DELIVERYREDUCTION.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/FREEPRODUCT.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/ISSUECOUPON.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/ISSUEPOINTS.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/PRODUCTSREDUCTION.png
DELETED
Binary file
|
skin/frontend/base/default/images/qixol/red_sales_sticker_pv.png
DELETED
Binary file
|
var/logs_qixol/logs_here.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
|
|