Version Notes
Ths is Stable version
Download this release
Release Info
Developer | Globalshopex |
Extension | GSXInternationalCheckoutWithIframe |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
- app/code/community/GSX/InternationalCheckout/controllers/CheckoutController.php +1 -1
- app/code/community/GSX/InternationalCheckout/controllers/InvoiceController.php +2 -2
- app/code/community/GSX/InternationalCheckout/controllers/TrackingController.php +1 -1
- app/code/community/GSX/InternationalCheckout/etc/config.xml +1 -1
- app/code/community/GSX/InternationalCheckout/etc/system.xml +33 -9
- app/design/frontend/base/default/layout/{internationalcheckout.xml → GSXinternationalcheckout.xml} +2 -3
- app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/Login.phtml +0 -0
- app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/contentCheckout.phtml +21 -24
- app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/contentInvoice.phtml +0 -0
- app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/contentTracking.phtml +0 -0
- app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/international.phtml +60 -58
- package.xml +4 -4
app/code/community/GSX/InternationalCheckout/controllers/CheckoutController.php
CHANGED
@@ -4,7 +4,7 @@ class GSX_InternationalCheckout_CheckoutController extends Mage_Core_Controller_
|
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
-
$templateFile='
|
8 |
|
9 |
$block = $this->getLayout()->createBlock(
|
10 |
'internationalcheckout/international',
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
+
$templateFile='GSXInternationalcheckout/contentCheckout.phtml';
|
8 |
|
9 |
$block = $this->getLayout()->createBlock(
|
10 |
'internationalcheckout/international',
|
app/code/community/GSX/InternationalCheckout/controllers/InvoiceController.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
public function ProcessAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
-
$templateFile='
|
8 |
|
9 |
$block = $this->getLayout()->createBlock(
|
10 |
'internationalcheckout/international',
|
@@ -20,7 +20,7 @@
|
|
20 |
public function indexAction()
|
21 |
{
|
22 |
$this->loadLayout();
|
23 |
-
$templateFile='
|
24 |
|
25 |
$block = $this->getLayout()->createBlock(
|
26 |
'internationalcheckout/international',
|
4 |
public function ProcessAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
+
$templateFile='GSXInternationalcheckout/contentInvoice.phtml';
|
8 |
|
9 |
$block = $this->getLayout()->createBlock(
|
10 |
'internationalcheckout/international',
|
20 |
public function indexAction()
|
21 |
{
|
22 |
$this->loadLayout();
|
23 |
+
$templateFile='GSXInternationalcheckout/contentInvoice.phtml';
|
24 |
|
25 |
$block = $this->getLayout()->createBlock(
|
26 |
'internationalcheckout/international',
|
app/code/community/GSX/InternationalCheckout/controllers/TrackingController.php
CHANGED
@@ -4,7 +4,7 @@ class GSX_InternationalCheckout_TrackingController extends Mage_Core_Controller_
|
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
-
$templateFile='
|
8 |
|
9 |
$block = $this->getLayout()->createBlock(
|
10 |
'internationalcheckout/international',
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
+
$templateFile='GSXInternationalcheckout/contentTracking.phtml';
|
8 |
|
9 |
$block = $this->getLayout()->createBlock(
|
10 |
'internationalcheckout/international',
|
app/code/community/GSX/InternationalCheckout/etc/config.xml
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
<layout>
|
32 |
<updates>
|
33 |
<internationalcheckout>
|
34 |
-
<file>
|
35 |
</internationalcheckout>
|
36 |
</updates>
|
37 |
</layout>
|
31 |
<layout>
|
32 |
<updates>
|
33 |
<internationalcheckout>
|
34 |
+
<file>GSXinternationalcheckout.xml</file>
|
35 |
</internationalcheckout>
|
36 |
</updates>
|
37 |
</layout>
|
app/code/community/GSX/InternationalCheckout/etc/system.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
]]>
|
26 |
</comment>
|
27 |
</name_of_company>
|
28 |
-
<
|
29 |
<label>Local Shipping</label>
|
30 |
<frontend_type>text</frontend_type>
|
31 |
<sort_order>2</sort_order>
|
@@ -38,8 +38,8 @@
|
|
38 |
<span>Example: 0</span>
|
39 |
]]>
|
40 |
</comment>
|
41 |
-
</
|
42 |
-
<
|
43 |
<label>Local Shipping EXP</label>
|
44 |
<frontend_type>text</frontend_type>
|
45 |
<sort_order>3</sort_order>
|
@@ -52,8 +52,8 @@
|
|
52 |
<span>Example: 0</span>
|
53 |
]]>
|
54 |
</comment>
|
55 |
-
</
|
56 |
-
<
|
57 |
<label>International Shipping Restriction Attribute Code</label>
|
58 |
<frontend_type>text</frontend_type>
|
59 |
<sort_order>4</sort_order>
|
@@ -66,11 +66,11 @@
|
|
66 |
<span> * Value Required for Restricting International Shipping</span>
|
67 |
]]>
|
68 |
</comment>
|
69 |
-
</
|
70 |
-
<
|
71 |
<label>Iframe Active</label>
|
72 |
<frontend_type>text</frontend_type>
|
73 |
-
<sort_order>
|
74 |
<show_in_default>1</show_in_default>
|
75 |
<show_in_website>1</show_in_website>
|
76 |
<show_in_store>1</show_in_store>
|
@@ -79,10 +79,34 @@
|
|
79 |
<span> For show GlobalShopex Cart over iframe true</span>
|
80 |
]]>
|
81 |
</comment>
|
82 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
</fields>
|
84 |
</internationalcheckout>
|
85 |
</groups>
|
86 |
</shipping>
|
87 |
</sections>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
</config>
|
25 |
]]>
|
26 |
</comment>
|
27 |
</name_of_company>
|
28 |
+
<local_shipping translate="label">
|
29 |
<label>Local Shipping</label>
|
30 |
<frontend_type>text</frontend_type>
|
31 |
<sort_order>2</sort_order>
|
38 |
<span>Example: 0</span>
|
39 |
]]>
|
40 |
</comment>
|
41 |
+
</local_shipping>
|
42 |
+
<local_shippingexp translate="label">
|
43 |
<label>Local Shipping EXP</label>
|
44 |
<frontend_type>text</frontend_type>
|
45 |
<sort_order>3</sort_order>
|
52 |
<span>Example: 0</span>
|
53 |
]]>
|
54 |
</comment>
|
55 |
+
</local_shippingexp>
|
56 |
+
<restriction_item translate="label">
|
57 |
<label>International Shipping Restriction Attribute Code</label>
|
58 |
<frontend_type>text</frontend_type>
|
59 |
<sort_order>4</sort_order>
|
66 |
<span> * Value Required for Restricting International Shipping</span>
|
67 |
]]>
|
68 |
</comment>
|
69 |
+
</restriction_item>
|
70 |
+
<iframe_active translate="label">
|
71 |
<label>Iframe Active</label>
|
72 |
<frontend_type>text</frontend_type>
|
73 |
+
<sort_order>5</sort_order>
|
74 |
<show_in_default>1</show_in_default>
|
75 |
<show_in_website>1</show_in_website>
|
76 |
<show_in_store>1</show_in_store>
|
79 |
<span> For show GlobalShopex Cart over iframe true</span>
|
80 |
]]>
|
81 |
</comment>
|
82 |
+
</iframe_active>
|
83 |
+
<developer_site translate="label">
|
84 |
+
<label>Developer Site</label>
|
85 |
+
<frontend_type>text</frontend_type>
|
86 |
+
<sort_order>6</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>1</show_in_website>
|
89 |
+
<show_in_store>1</show_in_store>
|
90 |
+
<comment>
|
91 |
+
<![CDATA[
|
92 |
+
<span> Testing Site</span>
|
93 |
+
]]>
|
94 |
+
</comment>
|
95 |
+
</developer_site>
|
96 |
</fields>
|
97 |
</internationalcheckout>
|
98 |
</groups>
|
99 |
</shipping>
|
100 |
</sections>
|
101 |
+
<default>
|
102 |
+
<shipping>
|
103 |
+
<internationalcheckout>
|
104 |
+
<internationalcheckout>
|
105 |
+
<iframe_active>true</iframe_active>
|
106 |
+
<developer_site>false</developer_site>
|
107 |
+
</internationalcheckout>
|
108 |
+
</internationalcheckout>
|
109 |
+
</shipping>
|
110 |
+
</default>
|
111 |
+
|
112 |
</config>
|
app/design/frontend/base/default/layout/{internationalcheckout.xml → GSXinternationalcheckout.xml}
RENAMED
@@ -4,15 +4,14 @@
|
|
4 |
<reference name="content">
|
5 |
<reference name="checkout.cart">
|
6 |
<reference name="checkout.cart.methods">
|
7 |
-
<block type="internationalcheckout/international" name="internationalcheckout.international" template="
|
8 |
-
|
9 |
</reference>
|
10 |
</reference>
|
11 |
</reference>
|
12 |
</checkout_cart_index>
|
13 |
<customer_account_login translate="label">
|
14 |
<reference name="content">
|
15 |
-
<block type="customer/account_forgotpassword" name="forgotPassword" template="
|
16 |
</reference>
|
17 |
</customer_account_login>
|
18 |
</layout>
|
4 |
<reference name="content">
|
5 |
<reference name="checkout.cart">
|
6 |
<reference name="checkout.cart.methods">
|
7 |
+
<block type="internationalcheckout/international" name="internationalcheckout.international" template="GSXInternationalcheckout/international.phtml"/>
|
|
|
8 |
</reference>
|
9 |
</reference>
|
10 |
</reference>
|
11 |
</checkout_cart_index>
|
12 |
<customer_account_login translate="label">
|
13 |
<reference name="content">
|
14 |
+
<block type="customer/account_forgotpassword" name="forgotPassword" template="GSXInternationalcheckout/login.phtml" />
|
15 |
</reference>
|
16 |
</customer_account_login>
|
17 |
</layout>
|
app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/Login.phtml
RENAMED
File without changes
|
app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/contentCheckout.phtml
RENAMED
@@ -1,16 +1,18 @@
|
|
1 |
<?php
|
|
|
2 |
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/name_of_company'));
|
3 |
-
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
4 |
-
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
5 |
-
$
|
|
|
6 |
|
|
|
7 |
if($merchant_id != ""){
|
8 |
$gc_url = $this->GC_URL;
|
9 |
}else{
|
10 |
$gc_url = "http://globalshopex.com/join_us.html";
|
11 |
}
|
12 |
|
13 |
-
|
14 |
?>
|
15 |
|
16 |
<div class="col-main">
|
@@ -34,33 +36,36 @@
|
|
34 |
$ProductPrice = substr ( $ProductPrice , 0,strrpos($ProductPrice, ".") +3 ) ;
|
35 |
$ProductWeight=$_Product->getWeight();
|
36 |
$ProductWeight = substr ( $ProductWeight , 0,strrpos($ProductWeight, ".") +3 ) ;
|
|
|
|
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
$output .= "<input type=\"hidden\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
41 |
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$_Product->getSku()."\"/>\n";
|
|
|
42 |
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
43 |
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
44 |
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$ProductPrice ."\"/>\n";
|
45 |
-
$output .= "<input type=\"hidden\" name=\"ProductBrand$i\" value=\"".$this->getBrand($item)."\"/>\n";
|
46 |
$output .= "<input type=\"hidden\" name=\"ProductSize$i\" value=\"".$this->getSize($item)."\"/>\n";
|
47 |
$output .= "<input type=\"hidden\" name=\"ProductColor$i\" value=\"".$this->getColor($item)."\"/>\n";
|
48 |
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$ProductWeight."\"/>\n";
|
49 |
-
$
|
50 |
-
|
51 |
-
|
|
|
52 |
|
53 |
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
54 |
->setEntityTypeFilter($_Product->getResource()->getTypeId())
|
55 |
-
->addFieldToFilter('attribute_code', $
|
56 |
->load(false);
|
|
|
57 |
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
58 |
$manufac = $attribute->getSource()->getAllOptions(false);
|
59 |
foreach ($manufac as $man) {
|
60 |
$intshiping[$man['value']] = $man['label'];
|
61 |
}
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
$imgWidth = "";
|
65 |
$imgHeight = "";
|
66 |
|
@@ -73,8 +78,8 @@
|
|
73 |
|
74 |
echo $output;
|
75 |
|
76 |
-
if(
|
77 |
-
if(
|
78 |
|
79 |
$GSX_totals = $session->getQuote()->getData();
|
80 |
$coupon_code = $GSX_totals['coupon_code'];
|
@@ -82,14 +87,6 @@
|
|
82 |
$perc = ($discount * 100) / $GSX_totals['subtotal'];
|
83 |
$perc = round($perc , 2);
|
84 |
?>
|
85 |
-
<!--
|
86 |
-
|
87 |
-
<input type="hidden" name="ODiscount" value="<?php echo $perc; ?>" />
|
88 |
-
<input type="hidden" name="ODiscCode" value="<?php echo $coupon_code; ?>" />
|
89 |
-
<input type="hidden" name="ODiscPerc" value="1" />
|
90 |
-
<input type="hidden" name="PrefilledCart" value="http://127.0.0.1/magento/index.php/GSXInternationalCheckout?gsxOption=Checkout">
|
91 |
-
|
92 |
-
-->
|
93 |
|
94 |
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
95 |
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
1 |
<?php
|
2 |
+
$IsiframeActive = trim(Mage::getStoreConfig('shipping/internationalcheckout/iframe_active'));
|
3 |
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/name_of_company'));
|
4 |
+
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/local_shippingexp'));
|
5 |
+
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/local_shipping'));
|
6 |
+
$GSX_restriction_attribute = trim(Mage::getStoreConfig('shipping/internationalcheckout/restriction_item'));
|
7 |
+
$sslActive = trim(Mage::getStoreConfig('shipping/internationalcheckout/developer_site'));
|
8 |
|
9 |
+
|
10 |
if($merchant_id != ""){
|
11 |
$gc_url = $this->GC_URL;
|
12 |
}else{
|
13 |
$gc_url = "http://globalshopex.com/join_us.html";
|
14 |
}
|
15 |
|
|
|
16 |
?>
|
17 |
|
18 |
<div class="col-main">
|
36 |
$ProductPrice = substr ( $ProductPrice , 0,strrpos($ProductPrice, ".") +3 ) ;
|
37 |
$ProductWeight=$_Product->getWeight();
|
38 |
$ProductWeight = substr ( $ProductWeight , 0,strrpos($ProductWeight, ".") +3 ) ;
|
39 |
+
if($ProductWeight=="") $ProductWeight="0";
|
40 |
+
|
41 |
|
|
|
|
|
|
|
42 |
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$_Product->getSku()."\"/>\n";
|
43 |
+
$output .= "<input type=\"hidden\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
44 |
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
45 |
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
46 |
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$ProductPrice ."\"/>\n";
|
|
|
47 |
$output .= "<input type=\"hidden\" name=\"ProductSize$i\" value=\"".$this->getSize($item)."\"/>\n";
|
48 |
$output .= "<input type=\"hidden\" name=\"ProductColor$i\" value=\"".$this->getColor($item)."\"/>\n";
|
49 |
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$ProductWeight."\"/>\n";
|
50 |
+
if($item->getCountry()!="")
|
51 |
+
$output .= "<input type=\"hidden\" name=\"ProducCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
52 |
+
if($this->getBrand($item)!="")
|
53 |
+
$output .= "<input type=\"hidden\" name=\"ProductBrand$i\" value=\"".$this->getBrand($item)."\"/>\n";
|
54 |
|
55 |
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
56 |
->setEntityTypeFilter($_Product->getResource()->getTypeId())
|
57 |
+
->addFieldToFilter('attribute_code', $GSX_restriction_attribute)
|
58 |
->load(false);
|
59 |
+
|
60 |
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
61 |
$manufac = $attribute->getSource()->getAllOptions(false);
|
62 |
foreach ($manufac as $man) {
|
63 |
$intshiping[$man['value']] = $man['label'];
|
64 |
}
|
65 |
+
|
66 |
+
|
67 |
+
if($_Product->getData($GSX_restriction_attribute) == '1')
|
68 |
+
$output .= "<input type=\"hidden\" name=\"Restricted$i\" value='1'/>\n";
|
69 |
$imgWidth = "";
|
70 |
$imgHeight = "";
|
71 |
|
78 |
|
79 |
echo $output;
|
80 |
|
81 |
+
if($GSX_Localshipping_EXP!="") $gsx_ls_exp = $GSX_Localshipping_EXP; else $gsx_ls_exp = "0";
|
82 |
+
if($GSX_Localshipping!="") $gsx_ls = $GSX_Localshipping; else $gsx_ls = "0";
|
83 |
|
84 |
$GSX_totals = $session->getQuote()->getData();
|
85 |
$coupon_code = $GSX_totals['coupon_code'];
|
87 |
$perc = ($discount * 100) / $GSX_totals['subtotal'];
|
88 |
$perc = round($perc , 2);
|
89 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
92 |
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/contentInvoice.phtml
RENAMED
File without changes
|
app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/contentTracking.phtml
RENAMED
File without changes
|
app/design/frontend/base/default/template/{Internationalcheckout → GSXInternationalcheckout}/international.phtml
RENAMED
@@ -1,39 +1,45 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
<?php
|
5 |
|
6 |
-
$IsiframeActive = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
7 |
-
|
8 |
-
|
9 |
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/name_of_company'));
|
10 |
-
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
11 |
-
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
12 |
-
$
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
if($merchant_id != ""){
|
15 |
$gc_url = $this->GC_URL;
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
-
|
20 |
-
{
|
21 |
-
?>
|
22 |
-
|
23 |
-
<a href="<?php echo Mage::getBaseUrl() ?>GSXInternationalCheckout/Checkout" title="<?php echo $this->__('Global Checkout') ?>" >
|
24 |
-
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?>></button>
|
25 |
-
</a>
|
26 |
|
27 |
<?php
|
28 |
-
|
29 |
-
?>
|
30 |
-
|
31 |
|
32 |
<?php
|
33 |
|
34 |
$session = Mage::getSingleton('checkout/session');
|
35 |
$output = "";
|
36 |
$i = 1;
|
|
|
|
|
|
|
37 |
foreach ($session->getQuote()->getAllVisibleItems() as $item) {
|
38 |
$item_ID = $item->getProductId();
|
39 |
$_Product = Mage::getModel('catalog/product')->load($item_ID);
|
@@ -42,48 +48,38 @@
|
|
42 |
$ProductWeight=$_Product->getWeight();
|
43 |
$ProductWeight = substr ( $ProductWeight , 0,strrpos($ProductWeight, ".") +3 ) ;
|
44 |
|
45 |
-
|
46 |
|
47 |
-
$output .= "<input type=\"hidden\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
48 |
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$_Product->getSku()."\"/>\n";
|
|
|
49 |
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
50 |
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
51 |
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$ProductPrice ."\"/>\n";
|
52 |
-
$output .= "<input type=\"hidden\" name=\"ProductBrand$i\" value=\"".$this->getBrand($item)."\"/>\n";
|
53 |
$output .= "<input type=\"hidden\" name=\"ProductSize$i\" value=\"".$this->getSize($item)."\"/>\n";
|
54 |
$output .= "<input type=\"hidden\" name=\"ProductColor$i\" value=\"".$this->getColor($item)."\"/>\n";
|
55 |
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$ProductWeight."\"/>\n";
|
|
|
|
|
56 |
$output .= "<input type=\"hidden\" name=\"ProductCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
57 |
-
|
|
|
58 |
|
59 |
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
63 |
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
64 |
$manufac = $attribute->getSource()->getAllOptions(false);
|
65 |
foreach ($manufac as $man) {
|
66 |
$intshiping[$man['value']] = $man['label'];
|
67 |
}
|
68 |
-
|
69 |
-
else $output .= "<input type=\"hidden\" name=\"Restricted$i\" value='0'/>\n";
|
70 |
-
|
71 |
-
//
|
72 |
|
73 |
-
$
|
74 |
-
|
75 |
-
|
76 |
-
if ($imgWidth == "" || $imgWidth <=0) {
|
77 |
-
$imgWidth = 75;
|
78 |
-
}
|
79 |
-
if ($imgHeight == "" || $imgHeight <=0) {
|
80 |
-
$imgHeight = 75;
|
81 |
-
}
|
82 |
|
83 |
$output .= "<input type=\"hidden\" name=\"ProductImage$i\" value=\"".$this->getProductThumbnail($item)->resize($imgWidth)."\"/>\n";
|
84 |
-
$output .= "<input type=\"hidden\" name=\"ImgHeight$i\" value=\"".$imgHeight."\"/>\n";
|
85 |
-
$output .= "<input type=\"hidden\" name=\"ImgWidth$i\" value=\"".$imgWidth."\"/>\n";
|
86 |
-
|
87 |
$i++;
|
88 |
}
|
89 |
|
@@ -97,19 +93,25 @@
|
|
97 |
$discount = $GSX_totals['subtotal'] - $GSX_totals['subtotal_with_discount'];
|
98 |
$perc = ($discount * 100) / $GSX_totals['subtotal'];
|
99 |
$perc = round($perc , 2);
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
-
<input type="hidden" name="ODiscount" value="<?php echo $perc; ?>" />
|
103 |
-
<input type="hidden" name="ODiscCode" value="<?php echo $coupon_code; ?>" />
|
104 |
-
<input type="hidden" name="ODiscPerc" value="1" />
|
105 |
-
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
106 |
-
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
107 |
-
<input type="hidden" name="LocalShipping" value="<?php echo $gsx_ls; ?>" />
|
108 |
-
<input type="hidden" name="PrefilledCart" value="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
109 |
-
|
110 |
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?> type="submit"></button>
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
113 |
<?php
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
$IsiframeActive = trim(Mage::getStoreConfig('shipping/internationalcheckout/iframe_active'));
|
|
|
|
|
4 |
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/name_of_company'));
|
5 |
+
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/local_shippingexp'));
|
6 |
+
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/local_shipping'));
|
7 |
+
$GSX_restriction_attribute = trim(Mage::getStoreConfig('shipping/internationalcheckout/restriction_item'));
|
8 |
+
$developer_site = trim(Mage::getStoreConfig('shipping/internationalcheckout/developer_site'));
|
9 |
+
|
10 |
+
$gc_url = "http://globalshopex.com/join_us.html";
|
11 |
+
$showCartToCart=false;
|
12 |
+
|
13 |
if($merchant_id != ""){
|
14 |
$gc_url = $this->GC_URL;
|
15 |
+
if ($IsiframeActive=='true' || $IsiframeActive==''){
|
16 |
+
$urlIFrame=Mage::getBaseUrl();
|
17 |
+
if($developer_site!='true' ){
|
18 |
+
$urlIFrame=str_replace('http:','https:',Mage::getBaseUrl());
|
19 |
+
}
|
20 |
+
$urlIFrame= $urlIFrame."GSXInternationalCheckout/Checkout";
|
21 |
+
}else{
|
22 |
+
$urlIFrame=$gc_url;
|
23 |
+
$showCartToCart=true;
|
24 |
+
}
|
25 |
+
}else{
|
26 |
+
$showCartToCart=true;
|
27 |
}
|
28 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
<?php
|
31 |
+
if($showCartToCart){
|
32 |
+
?>
|
33 |
+
<form name="gcForm" id="gcForm" method="post" action="<?php echo $gc_url;?>">
|
34 |
|
35 |
<?php
|
36 |
|
37 |
$session = Mage::getSingleton('checkout/session');
|
38 |
$output = "";
|
39 |
$i = 1;
|
40 |
+
$imgWidth = 75;
|
41 |
+
$imgHeight = 75;
|
42 |
+
|
43 |
foreach ($session->getQuote()->getAllVisibleItems() as $item) {
|
44 |
$item_ID = $item->getProductId();
|
45 |
$_Product = Mage::getModel('catalog/product')->load($item_ID);
|
48 |
$ProductWeight=$_Product->getWeight();
|
49 |
$ProductWeight = substr ( $ProductWeight , 0,strrpos($ProductWeight, ".") +3 ) ;
|
50 |
|
51 |
+
if($ProductWeight=="") $ProductWeight="0";
|
52 |
|
|
|
53 |
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$_Product->getSku()."\"/>\n";
|
54 |
+
$output .= "<input type=\"hidden\" id=\"ProductDesc$i\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
55 |
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
56 |
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
57 |
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$ProductPrice ."\"/>\n";
|
|
|
58 |
$output .= "<input type=\"hidden\" name=\"ProductSize$i\" value=\"".$this->getSize($item)."\"/>\n";
|
59 |
$output .= "<input type=\"hidden\" name=\"ProductColor$i\" value=\"".$this->getColor($item)."\"/>\n";
|
60 |
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$ProductWeight."\"/>\n";
|
61 |
+
|
62 |
+
if($item->getCountry()!="")
|
63 |
$output .= "<input type=\"hidden\" name=\"ProductCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
64 |
+
if($item->getBrand($item)!="")
|
65 |
+
$output .= "<input type=\"hidden\" name=\"ProductBrand$i\" value=\"".$this->getBrand($item)."\"/>\n";
|
66 |
|
67 |
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
68 |
+
->setEntityTypeFilter($_Product->getResource()->getTypeId())
|
69 |
+
->addFieldToFilter('attribute_code', $GSX_restriction_attribute)
|
70 |
+
->load(false);
|
71 |
+
|
72 |
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
73 |
$manufac = $attribute->getSource()->getAllOptions(false);
|
74 |
foreach ($manufac as $man) {
|
75 |
$intshiping[$man['value']] = $man['label'];
|
76 |
}
|
77 |
+
|
|
|
|
|
|
|
78 |
|
79 |
+
if($_Product->getData($GSX_restriction_attribute) == '1')
|
80 |
+
$output .= "<input type=\"hidden\" name=\"Restricted$i\" value='1'/>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
$output .= "<input type=\"hidden\" name=\"ProductImage$i\" value=\"".$this->getProductThumbnail($item)->resize($imgWidth)."\"/>\n";
|
|
|
|
|
|
|
83 |
$i++;
|
84 |
}
|
85 |
|
93 |
$discount = $GSX_totals['subtotal'] - $GSX_totals['subtotal_with_discount'];
|
94 |
$perc = ($discount * 100) / $GSX_totals['subtotal'];
|
95 |
$perc = round($perc , 2);
|
96 |
+
?>
|
97 |
+
|
98 |
+
<input type="hidden" name="ODiscount" value="<?php echo $perc; ?>" />
|
99 |
+
<input type="hidden" name="ODiscCode" value="<?php echo $coupon_code; ?>" />
|
100 |
+
<input type="hidden" name="ODiscPerc" value="1" />
|
101 |
+
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
102 |
+
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
103 |
+
<input type="hidden" name="LocalShipping" value="<?php echo $gsx_ls; ?>" />
|
104 |
+
<input type="hidden" name="PrefilledCart" value="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?> type="submit"></button>
|
107 |
+
</form>
|
108 |
+
<?php
|
109 |
+
}else{
|
110 |
+
?>
|
111 |
+
<a href="<?php echo $urlIFrame ?>" title="<?php echo $this->__('Global Checkout') ?>" >
|
112 |
+
<div <?php echo $this->buttonImagePath(); ?>> </div>
|
113 |
+
</a>
|
114 |
<?php
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GSXInternationalCheckoutWithIframe</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license">GPL</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Installs International Checkout Button in your cart</description>
|
11 |
<notes>Ths is Stable version</notes>
|
12 |
<authors><author><name>Globalshopex</name><user>Globalshopex</user><email>info@globalshopex.com</email></author></authors>
|
13 |
-
<date>2014-06-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="GSX"><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="c79b41303e600072021220e101608d2a"/></dir><dir name="Helper"><file name="Data.php" hash="d8a7158a95e55c8258d3f9ce50765417"/></dir><dir name="Model"><file name="International.php" hash="d14d71c1c7ca9b1cd0ead5d8dca339b6"/><file name="Servers.php" hash="2460f3985e80eddad55e08c6c15c947c"/><file name="Shippingmethods.php" hash="fa7dd994638cddb5c7c54abca859cbd3"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.0.1</min><max>5.5.13</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GSXInternationalCheckoutWithIframe</name>
|
4 |
+
<version>1.2.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license">GPL</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Installs International Checkout Button in your cart</description>
|
11 |
<notes>Ths is Stable version</notes>
|
12 |
<authors><author><name>Globalshopex</name><user>Globalshopex</user><email>info@globalshopex.com</email></author></authors>
|
13 |
+
<date>2014-06-09</date>
|
14 |
+
<time>15:01:39</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="GSX"><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="c79b41303e600072021220e101608d2a"/></dir><dir name="Helper"><file name="Data.php" hash="d8a7158a95e55c8258d3f9ce50765417"/></dir><dir name="Model"><file name="International.php" hash="d14d71c1c7ca9b1cd0ead5d8dca339b6"/><file name="Servers.php" hash="2460f3985e80eddad55e08c6c15c947c"/><file name="Shippingmethods.php" hash="fa7dd994638cddb5c7c54abca859cbd3"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="b178d8b47970e80b49eec1955ee8587b"/><file name="InvoiceController.php" hash="131569367ceebcdde25be7f990cb64fd"/><file name="TrackingController.php" hash="23a145284a22a67218142886a1793ea7"/></dir><dir name="etc"><file name="config.xml" hash="15e002c641064169352a8a6743b4a332"/><file name="system.xml" hash="d5aa26ad2339c8177132f781b8e8841e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="GSXInternationalcheckout"><file name="Login.phtml" hash="971f4e9cb3e01bd5dc7206b4470c4159"/><file name="contentCheckout.phtml" hash="ff210113bc548d6fe8117a6f7e15653e"/><file name="contentInvoice.phtml" hash="bc80d5e4fcf76068210bec4487c702a9"/><file name="contentTracking.phtml" hash="bcc63e5de842d1c1f621c1482cf3ebd9"/><file name="international.phtml" hash="ca16d3e1a89d786a78e58595fa93b1fc"/></dir></dir><dir name="layout"><file name="GSXinternationalcheckout.xml" hash="b0eeee710b686b8fec31346c09562c6b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GSX_InternationalCheckout.xml" hash="87aba4b6648f7a0b22855cab679c48a1"/></dir></target><target name="magemedia"><dir name="GSX"><dir name="images"><dir name="default"><file name="Thumbs.db" hash="f835bb8a505fa42d0338f2d427351bb1"/><file name="gc_button.gif" hash="4d53b9fb727fd399486e4c1d7b35170c"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.0.1</min><max>5.5.13</max></php></required></dependencies>
|
18 |
</package>
|