Version Notes
This is Stable version
Download this release
Release Info
Developer | Srikanth |
Extension | GSXInternationalCheckout |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- app/code/community/GSX/InternationalCheckout/Block/International.php +1 -1
- app/code/community/GSX/InternationalCheckout/etc/config.xml +1 -0
- app/code/community/GSX/InternationalCheckout/etc/system.xml +14 -0
- app/code/community/GSX/InternationalCheckout/etc/system33.xml +0 -19
- app/code/community/GSX/InternationalCheckout/etc/system_old.xml +0 -61
- app/design/frontend/base/default/template/internationalcheckout/international.phtml +39 -20
- package.xml +5 -5
app/code/community/GSX/InternationalCheckout/Block/International.php
CHANGED
@@ -43,7 +43,7 @@ class GSX_InternationalCheckout_Block_International extends Mage_Core_Block_Temp
|
|
43 |
function buttonImagePath() {
|
44 |
|
45 |
$style = "";
|
46 |
-
$style= "style=\"background-image:url('".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."GSX/images/default/gc_button.gif"."'); background-repeat:no-repeat; width:182px; height:34px; outline:none; border:none; cursor:pointer
|
47 |
return $style;
|
48 |
}
|
49 |
|
43 |
function buttonImagePath() {
|
44 |
|
45 |
$style = "";
|
46 |
+
$style= "style=\"background-image:url('".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."GSX/images/default/gc_button.gif"."'); background-repeat:no-repeat; width:182px; height:34px; outline:none; border:none; cursor:pointer;\"";
|
47 |
return $style;
|
48 |
}
|
49 |
|
app/code/community/GSX/InternationalCheckout/etc/config.xml
CHANGED
@@ -33,6 +33,7 @@
|
|
33 |
<internationalcheckout>
|
34 |
<image_width>0</image_width>
|
35 |
<image_height>0</image_height>
|
|
|
36 |
</internationalcheckout>
|
37 |
</checkout>
|
38 |
</default>
|
33 |
<internationalcheckout>
|
34 |
<image_width>0</image_width>
|
35 |
<image_height>0</image_height>
|
36 |
+
<attrib_code>international_shipping</attrib_code>
|
37 |
</internationalcheckout>
|
38 |
</checkout>
|
39 |
</default>
|
app/code/community/GSX/InternationalCheckout/etc/system.xml
CHANGED
@@ -53,6 +53,20 @@
|
|
53 |
]]>
|
54 |
</comment>
|
55 |
</image_height>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
</fields>
|
57 |
</internationalcheckout>
|
58 |
</groups>
|
53 |
]]>
|
54 |
</comment>
|
55 |
</image_height>
|
56 |
+
<attrib_code translate="label">
|
57 |
+
<label>International Shipping Restriction Attribute Code</label>
|
58 |
+
<frontend_type>text</frontend_type>
|
59 |
+
<sort_order>4</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
<validate></validate>
|
64 |
+
<comment>
|
65 |
+
<![CDATA[
|
66 |
+
<span> * Value Required for Restricting International Shipping</span>
|
67 |
+
]]>
|
68 |
+
</comment>
|
69 |
+
</attrib_code>
|
70 |
</fields>
|
71 |
</internationalcheckout>
|
72 |
</groups>
|
app/code/community/GSX/InternationalCheckout/etc/system33.xml
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<sections>
|
4 |
-
<checkout>
|
5 |
-
<groups>
|
6 |
-
<internationalcheckout translate="label" module="checkout">
|
7 |
-
<label>GSX International Checkout</label>
|
8 |
-
<frontend_type>text</frontend_type>
|
9 |
-
<sort_order>13</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<fields>
|
14 |
-
</fields>
|
15 |
-
</internationalcheckout>
|
16 |
-
</groups>
|
17 |
-
</checkout>
|
18 |
-
</sections>
|
19 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/GSX/InternationalCheckout/etc/system_old.xml
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<sections>
|
4 |
-
<checkout>
|
5 |
-
<groups>
|
6 |
-
<internationalcheckout translate="label" module="checkout">
|
7 |
-
<label>GSX International Checkout</label>
|
8 |
-
<frontend_type>text</frontend_type>
|
9 |
-
<sort_order>13</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<fields>
|
14 |
-
<name_of_company translate="label">
|
15 |
-
<label>Merchant ID</label>
|
16 |
-
<frontend_type>text</frontend_type>
|
17 |
-
<sort_order>1</sort_order>
|
18 |
-
<show_in_default>1</show_in_default>
|
19 |
-
<show_in_website>1</show_in_website>
|
20 |
-
<show_in_store>1</show_in_store>
|
21 |
-
<validate>required-entry</validate>
|
22 |
-
<comment>
|
23 |
-
<![CDATA[
|
24 |
-
<span>Please click the link below to obtain the Merchant ID required for successful integration.<br/><a href="http://globalshopex.com/join_us.html" target="_newtab">http://globalshopex.com/join_us.html</a></span>
|
25 |
-
]]>
|
26 |
-
</comment>
|
27 |
-
</name_of_company>
|
28 |
-
<image_width translate="label">
|
29 |
-
<label>Local Shipping</label>
|
30 |
-
<frontend_type>text</frontend_type>
|
31 |
-
<sort_order>2</sort_order>
|
32 |
-
<show_in_default>1</show_in_default>
|
33 |
-
<show_in_website>1</show_in_website>
|
34 |
-
<show_in_store>1</show_in_store>
|
35 |
-
<validate>validate-number</validate>
|
36 |
-
<comment>
|
37 |
-
<![CDATA[
|
38 |
-
<span>Example: 0</span>
|
39 |
-
]]>
|
40 |
-
</comment>
|
41 |
-
</image_width>
|
42 |
-
<image_height translate="label">
|
43 |
-
<label>Local Shipping EXP</label>
|
44 |
-
<frontend_type>text</frontend_type>
|
45 |
-
<sort_order>3</sort_order>
|
46 |
-
<show_in_default>1</show_in_default>
|
47 |
-
<show_in_website>1</show_in_website>
|
48 |
-
<show_in_store>1</show_in_store>
|
49 |
-
<validate>validate-number</validate>
|
50 |
-
<comment>
|
51 |
-
<![CDATA[
|
52 |
-
<span>Example: 0</span>
|
53 |
-
]]>
|
54 |
-
</comment>
|
55 |
-
</image_height>
|
56 |
-
</fields>
|
57 |
-
</internationalcheckout>
|
58 |
-
</groups>
|
59 |
-
</checkout>
|
60 |
-
</sections>
|
61 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/internationalcheckout/international.phtml
CHANGED
@@ -1,18 +1,17 @@
|
|
1 |
<?php
|
2 |
-
$merchant_id = Mage::
|
3 |
-
$GSX_Localshipping_EXP = Mage::
|
4 |
-
$GSX_Localshipping = Mage::
|
|
|
5 |
|
6 |
if($merchant_id != ""){
|
7 |
$gc_url = $this->GC_URL;
|
8 |
}else{
|
9 |
-
$gc_url = "http://globalshopex.com/
|
10 |
}
|
11 |
?>
|
12 |
-
|
13 |
<form name="gcForm" id="gcForm" method="post" action="<?php echo $gc_url;?>">
|
14 |
-
|
15 |
-
<?php
|
16 |
|
17 |
$session = Mage::getSingleton('checkout/session');
|
18 |
|
@@ -22,7 +21,7 @@
|
|
22 |
$item_ID = $item->getProductId();
|
23 |
$_Product = Mage::getModel('catalog/product')->load($item_ID);
|
24 |
$output .= "<input type=\"hidden\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
25 |
-
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$
|
26 |
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
27 |
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
28 |
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$item->getPrice()."\"/>\n";
|
@@ -32,9 +31,25 @@
|
|
32 |
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$_Product->getWeight()."\"/>\n";
|
33 |
$output .= "<input type=\"hidden\" name=\"ProductVolWeight$i\" value=\"1\"/>\n";
|
34 |
$output .= "<input type=\"hidden\" name=\"ProductCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
-
|
|
|
|
|
38 |
|
39 |
if ($imgWidth == "" || $imgWidth <=0) {
|
40 |
$imgWidth = 75;
|
@@ -44,8 +59,6 @@
|
|
44 |
}
|
45 |
|
46 |
$output .= "<input type=\"hidden\" name=\"ProductImage$i\" value=\"".$this->getProductThumbnail($item)->resize($imgWidth)."\"/>\n";
|
47 |
-
|
48 |
-
|
49 |
$output .= "<input type=\"hidden\" name=\"ImgHeight$i\" value=\"".$imgHeight."\"/>\n";
|
50 |
$output .= "<input type=\"hidden\" name=\"ImgWidth$i\" value=\"".$imgWidth."\"/>\n";
|
51 |
|
@@ -54,15 +67,21 @@
|
|
54 |
|
55 |
echo $output;
|
56 |
|
57 |
-
if(isset($GSX_Localshipping_EXP)) $gsx_ls_exp = $GSX_Localshipping_EXP; else $gsx_ls_exp = "
|
58 |
-
if(isset($GSX_Localshipping)) $gsx_ls = $GSX_Localshipping; else $gsx_ls = "
|
|
|
|
|
|
|
|
|
59 |
?>
|
|
|
|
|
|
|
60 |
|
61 |
-
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
62 |
-
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
63 |
-
<input type="hidden" name="LocalShipping" value="<?php echo $gsx_ls; ?>" />
|
64 |
-
<input type="hidden" name="PrefilledCart" value="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
65 |
|
66 |
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?> style="background-color:none;height:42px;" type="submit"><span></span></button>
|
67 |
-
|
68 |
-
</form>
|
1 |
<?php
|
2 |
+
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/name_of_company'));
|
3 |
+
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/image_width'));
|
4 |
+
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/image_height'));
|
5 |
+
$GSX_shipping_restriction_attribute_code = trim(Mage::getStoreConfig('shipping/internationalcheckout/attrib_code'));
|
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 |
<form name="gcForm" id="gcForm" method="post" action="<?php echo $gc_url;?>">
|
14 |
+
<?php
|
|
|
15 |
|
16 |
$session = Mage::getSingleton('checkout/session');
|
17 |
|
21 |
$item_ID = $item->getProductId();
|
22 |
$_Product = Mage::getModel('catalog/product')->load($item_ID);
|
23 |
$output .= "<input type=\"hidden\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
24 |
+
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$_Product->getSku()."\"/>\n";
|
25 |
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
26 |
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
27 |
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$item->getPrice()."\"/>\n";
|
31 |
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$_Product->getWeight()."\"/>\n";
|
32 |
$output .= "<input type=\"hidden\" name=\"ProductVolWeight$i\" value=\"1\"/>\n";
|
33 |
$output .= "<input type=\"hidden\" name=\"ProductCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
34 |
+
|
35 |
+
// International Shipping Restriction Check
|
36 |
+
|
37 |
+
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
38 |
+
->setEntityTypeFilter($_Product->getResource()->getTypeId())
|
39 |
+
->addFieldToFilter('attribute_code', $GSX_shipping_restriction_attribute_code)
|
40 |
+
->load(false);
|
41 |
+
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
42 |
+
$manufac = $attribute->getSource()->getAllOptions(false);
|
43 |
+
foreach ($manufac as $man) {
|
44 |
+
$intshiping[$man['value']] = $man['label'];
|
45 |
+
}
|
46 |
+
if($intshiping[$_Product->getData($GSX_shipping_restriction_attribute_code)] == 'No') $output .= "<input type=\"hidden\" name=\"Restricted$i\" value='1'/>\n";
|
47 |
+
else $output .= "<input type=\"hidden\" name=\"Restricted$i\" value='0'/>\n";
|
48 |
|
49 |
+
//
|
50 |
+
|
51 |
+
$imgWidth = "";
|
52 |
+
$imgHeight = "";
|
53 |
|
54 |
if ($imgWidth == "" || $imgWidth <=0) {
|
55 |
$imgWidth = 75;
|
59 |
}
|
60 |
|
61 |
$output .= "<input type=\"hidden\" name=\"ProductImage$i\" value=\"".$this->getProductThumbnail($item)->resize($imgWidth)."\"/>\n";
|
|
|
|
|
62 |
$output .= "<input type=\"hidden\" name=\"ImgHeight$i\" value=\"".$imgHeight."\"/>\n";
|
63 |
$output .= "<input type=\"hidden\" name=\"ImgWidth$i\" value=\"".$imgWidth."\"/>\n";
|
64 |
|
67 |
|
68 |
echo $output;
|
69 |
|
70 |
+
if(isset($GSX_Localshipping_EXP)) $gsx_ls_exp = $GSX_Localshipping_EXP; else $gsx_ls_exp = "0";
|
71 |
+
if(isset($GSX_Localshipping)) $gsx_ls = $GSX_Localshipping; else $gsx_ls = "0";
|
72 |
+
|
73 |
+
$GSX_totals = $session->getQuote()->getData();
|
74 |
+
$coupon_code = $GSX_totals['coupon_code'];
|
75 |
+
$discount = $GSX_totals['subtotal'] - $GSX_totals['subtotal_with_discount'];
|
76 |
?>
|
77 |
+
<input type="hidden" name="ODiscount" value="<?php echo $discount; ?>" />
|
78 |
+
<input type="hidden" name="ODiscCode" value="<?php echo $coupon_code; ?>" />
|
79 |
+
<input type="hidden" name="ODiscPerc" value="0" />
|
80 |
|
81 |
+
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
82 |
+
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
83 |
+
<input type="hidden" name="LocalShipping" value="<?php echo $gsx_ls; ?>" />
|
84 |
+
<input type="hidden" name="PrefilledCart" value="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
85 |
|
86 |
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?> style="background-color:none;height:42px;" type="submit"><span></span></button>
|
87 |
+
</form>
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GSXInternationalCheckout</name>
|
4 |
-
<version>1.1.
|
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>This is Stable version</notes>
|
12 |
<authors><author><name>Srikanth</name><user>skyalekara</user><email>sky8973@gmail.com</email></author></authors>
|
13 |
-
<date>2012-
|
14 |
-
<time>
|
15 |
-
<contents><target name="mageetc"><dir><dir name="modules"><file name="GSX_InternationalCheckout.xml" hash="87aba4b6648f7a0b22855cab679c48a1"/></dir></dir></target><target name="magecommunity"><dir><dir name="GSX"><dir><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>4.0.1</min><max>5.3.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GSXInternationalCheckout</name>
|
4 |
+
<version>1.1.5</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>This is Stable version</notes>
|
12 |
<authors><author><name>Srikanth</name><user>skyalekara</user><email>sky8973@gmail.com</email></author></authors>
|
13 |
+
<date>2012-09-16</date>
|
14 |
+
<time>21:34:17</time>
|
15 |
+
<contents><target name="mageetc"><dir><dir name="modules"><file name="GSX_InternationalCheckout.xml" hash="87aba4b6648f7a0b22855cab679c48a1"/></dir></dir></target><target name="magecommunity"><dir><dir name="GSX"><dir><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="7a62ce1448b826477d89c43ad995e8e9"/></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="etc"><file name="config.xml" hash="2c58b53c8ef3027af45ce2f77d4bbc65"/><file name="system.xml" hash="f14f022b760ceaa541f7f499abbeab55"/></dir></dir></dir><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="7a62ce1448b826477d89c43ad995e8e9"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="internationalcheckout"><file name="international.phtml" hash="bc6515db2e8306243d9b01f887d71835"/><file name="international.phtml" hash="bc6515db2e8306243d9b01f887d71835"/></dir></dir><dir name="layout"><file name="internationalcheckout.xml" hash="53ddc41716851ef5b7b1dd4af937f1a4"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir><dir name="GSX"><dir name="images"><dir name="default"><file name="gc_button.gif" hash="5bf110e37bef7098754c13bb392894b5"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>4.0.1</min><max>5.3.5</max></php></required></dependencies>
|
18 |
</package>
|