Version Notes
Ths is Stable version
Download this release
Release Info
Developer | Globalshopex |
Extension | GSXInternationalCheckout |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- app/code/community/GSX/InternationalCheckout/Block/International.php +6 -4
- app/code/community/GSX/InternationalCheckout/controllers/CheckoutController.php +21 -0
- app/code/community/GSX/InternationalCheckout/etc/config.xml +22 -13
- app/code/community/GSX/InternationalCheckout/etc/system.xml +8 -8
- app/design/frontend/base/default/layout/internationalcheckout.xml +10 -9
- app/design/frontend/base/default/template/Internationalcheckout/Login.phtml +17 -0
- app/design/frontend/base/default/template/Internationalcheckout/international.phtml +85 -78
- media/GSX/images/default/Thumbs.db +0 -0
- media/GSX/images/default/gc_button.gif +0 -0
- package.xml +7 -7
app/code/community/GSX/InternationalCheckout/Block/International.php
CHANGED
@@ -4,16 +4,18 @@ class GSX_InternationalCheckout_Block_International extends Mage_Core_Block_Temp
|
|
4 |
public $GC_URL = "http://globalshopex.com/shoppingCart.asp";
|
5 |
|
6 |
/**
|
7 |
-
* Returns true only if
|
8 |
*
|
9 |
*/
|
10 |
|
|
|
|
|
11 |
function isEnabled() {
|
12 |
|
13 |
$isValid = false;
|
14 |
$sm_config = trim(Mage::getStoreConfig("checkout/internationalcheckout/shipping_method"));
|
15 |
|
16 |
-
if ((trim(Mage::getStoreConfig("checkout/internationalcheckout/
|
17 |
|
18 |
$sm = explode("_",$sm_config);
|
19 |
if ( Mage::getStoreConfig('carriers/'.$sm[0].'/active') || $sm[0] == 'freedomesticshippingtogsx' ) {
|
@@ -25,7 +27,7 @@ class GSX_InternationalCheckout_Block_International extends Mage_Core_Block_Temp
|
|
25 |
|
26 |
|
27 |
/**
|
28 |
-
* Returns
|
29 |
*
|
30 |
*/
|
31 |
|
@@ -43,7 +45,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; background-color:transparent; height:
|
47 |
return $style;
|
48 |
}
|
49 |
|
4 |
public $GC_URL = "http://globalshopex.com/shoppingCart.asp";
|
5 |
|
6 |
/**
|
7 |
+
* Returns true only if merchant_id and shipping_method have been defined and Enabled is set to Yes.
|
8 |
*
|
9 |
*/
|
10 |
|
11 |
+
|
12 |
+
|
13 |
function isEnabled() {
|
14 |
|
15 |
$isValid = false;
|
16 |
$sm_config = trim(Mage::getStoreConfig("checkout/internationalcheckout/shipping_method"));
|
17 |
|
18 |
+
if ((trim(Mage::getStoreConfig("checkout/internationalcheckout/merchant_id")) != "") && ($sm_config != "") && Mage::getStoreConfig("checkout/internationalcheckout/active") ) {
|
19 |
|
20 |
$sm = explode("_",$sm_config);
|
21 |
if ( Mage::getStoreConfig('carriers/'.$sm[0].'/active') || $sm[0] == 'freedomesticshippingtogsx' ) {
|
27 |
|
28 |
|
29 |
/**
|
30 |
+
* Returns merchant_id after removing spaces and converting to lower case.
|
31 |
*
|
32 |
*/
|
33 |
|
45 |
function buttonImagePath() {
|
46 |
|
47 |
$style = "";
|
48 |
+
$style= "style=\"background-image:url('".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."GSX/images/default/gc_button.gif"."'); background-repeat:no-repeat; background-color:transparent; height:27px; width:232px; outline:none; border:none; cursor:pointer;\"";
|
49 |
return $style;
|
50 |
}
|
51 |
|
app/code/community/GSX/InternationalCheckout/controllers/CheckoutController.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class GSX_InternationalCheckout_CheckoutController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$templateFile='InternationalCheckout/contentCheckout.phtml';
|
8 |
+
|
9 |
+
$block = $this->getLayout()->createBlock(
|
10 |
+
'internationalcheckout/international',
|
11 |
+
'internationalcheckout.international',
|
12 |
+
array('template' => $templateFile)
|
13 |
+
);
|
14 |
+
$this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
|
15 |
+
$this->getLayout()->getBlock('content')->append($block);
|
16 |
+
$this->_initLayoutMessages('core/session');
|
17 |
+
$this->renderLayout();
|
18 |
+
|
19 |
+
}
|
20 |
+
}
|
21 |
+
?>
|
app/code/community/GSX/InternationalCheckout/etc/config.xml
CHANGED
@@ -9,31 +9,40 @@
|
|
9 |
<blocks>
|
10 |
<internationalcheckout>
|
11 |
<class>GSX_InternationalCheckout_Block</class>
|
12 |
-
|
13 |
-
|
14 |
<helpers>
|
15 |
<internationalcheckout>
|
16 |
<class>GSX_InternationalCheckout_Helper</class>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
<frontend>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<layout>
|
23 |
<updates>
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
</layout>
|
29 |
</frontend>
|
30 |
|
31 |
<default>
|
32 |
<checkout>
|
33 |
<internationalcheckout>
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
</internationalcheckout>
|
38 |
</checkout>
|
39 |
</default>
|
9 |
<blocks>
|
10 |
<internationalcheckout>
|
11 |
<class>GSX_InternationalCheckout_Block</class>
|
12 |
+
</internationalcheckout>
|
13 |
+
</blocks>
|
14 |
<helpers>
|
15 |
<internationalcheckout>
|
16 |
<class>GSX_InternationalCheckout_Helper</class>
|
17 |
+
</internationalcheckout>
|
18 |
+
</helpers>
|
19 |
+
</global>
|
20 |
|
21 |
+
<frontend>
|
22 |
+
<routers>
|
23 |
+
<GSX_InternationalCheckout>
|
24 |
+
<use>standard</use>
|
25 |
+
<args>
|
26 |
+
<module>GSX_InternationalCheckout</module>
|
27 |
+
<frontName>GSXInternationalCheckout</frontName>
|
28 |
+
</args>
|
29 |
+
</GSX_InternationalCheckout>
|
30 |
+
</routers>
|
31 |
<layout>
|
32 |
<updates>
|
33 |
+
<internationalcheckout>
|
34 |
+
<file>internationalcheckout.xml</file>
|
35 |
+
</internationalcheckout>
|
36 |
+
</updates>
|
37 |
</layout>
|
38 |
</frontend>
|
39 |
|
40 |
<default>
|
41 |
<checkout>
|
42 |
<internationalcheckout>
|
43 |
+
<local_shipping>0</local_shipping>
|
44 |
+
<local_shipping_exp>0</local_shipping_exp>
|
45 |
+
<restriction_attrib_code>international_shipping</restriction_attrib_code>
|
46 |
</internationalcheckout>
|
47 |
</checkout>
|
48 |
</default>
|
app/code/community/GSX/InternationalCheckout/etc/system.xml
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<show_in_website>1</show_in_website>
|
12 |
<show_in_store>1</show_in_store>
|
13 |
<fields>
|
14 |
-
<
|
15 |
<label>Merchant ID</label>
|
16 |
<frontend_type>text</frontend_type>
|
17 |
<sort_order>1</sort_order>
|
@@ -24,8 +24,8 @@
|
|
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 |
-
</
|
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,7 +66,7 @@
|
|
66 |
<span> * Value Required for Restricting International Shipping</span>
|
67 |
]]>
|
68 |
</comment>
|
69 |
-
</
|
70 |
</fields>
|
71 |
</internationalcheckout>
|
72 |
</groups>
|
11 |
<show_in_website>1</show_in_website>
|
12 |
<show_in_store>1</show_in_store>
|
13 |
<fields>
|
14 |
+
<merchant_id translate="label">
|
15 |
<label>Merchant ID</label>
|
16 |
<frontend_type>text</frontend_type>
|
17 |
<sort_order>1</sort_order>
|
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 |
+
</merchant_id>
|
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_shipping_exp 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_shipping_exp>
|
56 |
+
<restriction_attrib_code 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_attrib_code>
|
70 |
</fields>
|
71 |
</internationalcheckout>
|
72 |
</groups>
|
app/design/frontend/base/default/layout/internationalcheckout.xml
CHANGED
@@ -1,17 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.0.1">
|
3 |
-
|
4 |
-
|
5 |
-
<reference name="content">
|
6 |
<reference name="checkout.cart">
|
7 |
<reference name="checkout.cart.methods">
|
8 |
-
|
9 |
-
|
10 |
<block type="internationalcheckout/international" name="internationalcheckout.international" template="internationalcheckout/international.phtml"/>
|
11 |
|
12 |
</reference>
|
13 |
-
|
14 |
-
|
15 |
-
</checkout_cart_index>
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.0.1">
|
3 |
+
<checkout_cart_index>
|
4 |
+
<reference name="content">
|
|
|
5 |
<reference name="checkout.cart">
|
6 |
<reference name="checkout.cart.methods">
|
|
|
|
|
7 |
<block type="internationalcheckout/international" name="internationalcheckout.international" template="internationalcheckout/international.phtml"/>
|
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="internationalcheckout/login.phtml" />
|
16 |
+
</reference>
|
17 |
+
</customer_account_login>
|
18 |
</layout>
|
app/design/frontend/base/default/template/Internationalcheckout/Login.phtml
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<br>
|
3 |
+
<div class="account-login" >
|
4 |
+
<div class="col2-set">
|
5 |
+
<div class="col-1 new-users">
|
6 |
+
<div class="content" style="min-height: 45px">
|
7 |
+
<h2>International Checkout</h2>
|
8 |
+
<p>Tracking Globalshopex.com click</p>
|
9 |
+
</div>
|
10 |
+
<div class="buttons-set">
|
11 |
+
<form action="<?php echo Mage::getBaseUrl() ?>GSXInternationalCheckout/Tracking" method="post" id="GSXLogin-form">
|
12 |
+
<button type="submit" type="button" title="Tracking Globalshopex.com click here" class="button"><span><span>here</span></span></button>
|
13 |
+
</form>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
</div>
|
app/design/frontend/base/default/template/Internationalcheckout/international.phtml
CHANGED
@@ -1,89 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
3 |
-
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
4 |
-
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
5 |
-
$GSX_shipping_restriction_attribute_code = trim(Mage::getStoreConfig('shipping/internationalcheckout/
|
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 |
|
18 |
-
|
19 |
-
$i = 1;
|
20 |
-
foreach ($session->getQuote()->getAllVisibleItems() as $item) {
|
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";
|
28 |
-
$output .= "<input type=\"hidden\" name=\"ProductBrand$i\" value=\"".$this->getBrand($item)."\"/>\n";
|
29 |
-
$output .= "<input type=\"hidden\" name=\"ProductSize$i\" value=\"\"/>\n";
|
30 |
-
$output .= "<input type=\"hidden\" name=\"ProductColor$i\" value=\"\"/>\n";
|
31 |
-
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$_Product->getWeight()."\"/>\n";
|
32 |
-
$output .= "<input type=\"hidden\" name=\"ProductCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
33 |
-
|
34 |
-
// International Shipping Restriction Check
|
35 |
-
|
36 |
-
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
37 |
-
->setEntityTypeFilter($_Product->getResource()->getTypeId())
|
38 |
-
->addFieldToFilter('attribute_code', $GSX_shipping_restriction_attribute_code)
|
39 |
-
->load(false);
|
40 |
-
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
41 |
-
$manufac = $attribute->getSource()->getAllOptions(false);
|
42 |
-
$intshiping = "";
|
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='0'/>\n";
|
47 |
-
else $output .= "<input type=\"hidden\" name=\"Restricted$i\" value='0'/>\n";
|
48 |
-
|
49 |
-
//
|
50 |
-
|
51 |
-
$imgWidth = "";
|
52 |
-
$imgHeight = "";
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
$
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
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 |
-
//$perc = ($discount * 100) / $GSX_totals['subtotal'];
|
77 |
-
//$perc = round($perc , 2);
|
78 |
-
?>
|
79 |
-
<input type="hidden" name="ODiscount" value="<?php echo $discount; ?>" />
|
80 |
-
<input type="hidden" name="ODiscCode" value="<?php echo $coupon_code; ?>" />
|
81 |
-
<input type="hidden" name="ODiscPerc" value="0" />
|
82 |
-
|
83 |
-
<input type="hidden" name="MerchantID" value="<?php echo $merchant_id; ?>" />
|
84 |
-
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
85 |
-
<input type="hidden" name="LocalShipping" value="<?php echo $gsx_ls; ?>" />
|
86 |
-
<input type="hidden" name="PrefilledCart" value="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
87 |
|
88 |
-
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?> type="submit"></button>
|
89 |
-
</form>
|
1 |
+
<?php
|
2 |
+
$merchant_id = trim(Mage::getStoreConfig('shipping/internationalcheckout/merchant_id'));
|
3 |
+
$GSX_Localshipping_EXP = trim(Mage::getStoreConfig('shipping/internationalcheckout/local_shipping_exp'));
|
4 |
+
$GSX_Localshipping = trim(Mage::getStoreConfig('shipping/internationalcheckout/local_shipping'));
|
5 |
+
$GSX_shipping_restriction_attribute_code = trim(Mage::getStoreConfig('shipping/internationalcheckout/restriction_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 |
?>
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
<form name="gcForm" id="gcForm" method="post" action="<?php echo $gc_url;?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
<?php
|
18 |
+
|
19 |
+
$session = Mage::getSingleton('checkout/session');
|
20 |
+
$output = "";
|
21 |
+
$i = 1;
|
22 |
+
foreach ($session->getQuote()->getAllVisibleItems() as $item) {
|
23 |
+
$item_ID = $item->getProductId();
|
24 |
+
$_Product = Mage::getModel('catalog/product')->load($item_ID);
|
25 |
+
$ProductPrice=$item->getPrice();
|
26 |
+
$ProductPrice = substr ( $ProductPrice , 0,strrpos($ProductPrice, ".") +3 ) ;
|
27 |
+
$ProductWeight=$_Product->getWeight();
|
28 |
+
$ProductWeight = substr ( $ProductWeight , 0,strrpos($ProductWeight, ".") +3 ) ;
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
$output .= "<input type=\"hidden\" name=\"ProductDesc$i\" value=\"".$this->buildItemDescription($item)."\"/>\n";
|
33 |
+
$output .= "<input type=\"hidden\" name=\"ProductSKU$i\" value=\"".$_Product->getSku()."\"/>\n";
|
34 |
+
$output .= "<input type=\"hidden\" name=\"ProductLink$i\" value=\"".$this->getProductUrl($item)."\"/>\n";
|
35 |
+
$output .= "<input type=\"hidden\" name=\"ProductQty$i\" value=\"".$item->getQty()."\"/>\n";
|
36 |
+
$output .= "<input type=\"hidden\" name=\"ProductPrice$i\" value=\"".$ProductPrice ."\"/>\n";
|
37 |
+
$output .= "<input type=\"hidden\" name=\"ProductBrand$i\" value=\"".$this->getBrand($item)."\"/>\n";
|
38 |
+
$output .= "<input type=\"hidden\" name=\"ProductSize$i\" value=\"".$this->getSize($item)."\"/>\n";
|
39 |
+
$output .= "<input type=\"hidden\" name=\"ProductColor$i\" value=\"".$this->getColor($item)."\"/>\n";
|
40 |
+
$output .= "<input type=\"hidden\" name=\"ProductWeight$i\" value=\"".$ProductWeight."\"/>\n";
|
41 |
+
$output .= "<input type=\"hidden\" name=\"ProductCountry$i\" value=\"".$item->getCountry()."\"/>\n";
|
42 |
+
// International Shipping Restriction Check
|
43 |
+
|
44 |
+
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
45 |
+
->setEntityTypeFilter($_Product->getResource()->getTypeId())
|
46 |
+
->addFieldToFilter('attribute_code', $GSX_shipping_restriction_attribute_code)
|
47 |
+
->load(false);
|
48 |
+
$attribute = $attributes->getFirstItem()->setEntity($_Product->getResource());
|
49 |
+
$manufac = $attribute->getSource()->getAllOptions(false);
|
50 |
+
|
51 |
+
foreach ($manufac as $man) {
|
52 |
+
$intshiping[$man['value']] = $man['label'];
|
53 |
+
}
|
54 |
+
if($intshiping[$_Product->getData($GSX_shipping_restriction_attribute_code)] == 'Yes') $output .= "<input type=\"hidden\" name=\"Restricted$i\" value='1'/>\n";
|
55 |
+
|
56 |
+
//
|
57 |
+
|
58 |
+
$imgWidth = "";
|
59 |
+
$imgHeight = "";
|
60 |
+
|
61 |
+
if ($imgWidth == "" || $imgWidth <=0) {
|
62 |
+
$imgWidth = 75;
|
63 |
+
}
|
64 |
+
if ($imgHeight == "" || $imgHeight <=0) {
|
65 |
+
$imgHeight = 75;
|
66 |
+
}
|
67 |
+
|
68 |
+
$output .= "<input type=\"hidden\" name=\"ProductImage$i\" value=\"".$this->getProductThumbnail($item)->resize($imgWidth)."\"/>\n";
|
69 |
+
$output .= "<input type=\"hidden\" name=\"ImgHeight$i\" value=\"".$imgHeight."\"/>\n";
|
70 |
+
$output .= "<input type=\"hidden\" name=\"ImgWidth$i\" value=\"".$imgWidth."\"/>\n";
|
71 |
+
|
72 |
+
$i++;
|
73 |
+
}
|
74 |
+
|
75 |
+
echo $output;
|
76 |
+
|
77 |
+
if(isset($GSX_Localshipping_EXP)) $gsx_ls_exp = $GSX_Localshipping_EXP; else $gsx_ls_exp = "0";
|
78 |
+
if(isset($GSX_Localshipping)) $gsx_ls = $GSX_Localshipping; else $gsx_ls = "0";
|
79 |
+
|
80 |
+
$GSX_totals = $session->getQuote()->getData();
|
81 |
+
$coupon_code = $GSX_totals['coupon_code'];
|
82 |
+
$discount = $GSX_totals['subtotal'] - $GSX_totals['subtotal_with_discount'];
|
83 |
+
$perc = ($discount * 100) / $GSX_totals['subtotal'];
|
84 |
+
$perc = round($perc , 2);
|
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="MerchantID" value="<?php echo $merchant_id; ?>" />
|
91 |
+
<input type="hidden" name="LocalShippingEXP" value="<?php echo $gsx_ls_exp; ?>" />
|
92 |
+
<input type="hidden" name="LocalShipping" value="<?php echo $gsx_ls; ?>" />
|
93 |
+
<input type="hidden" name="PrefilledCart" value="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
+
<button title="<?php echo $this->__('Global Checkout') ?>" class="" <?php echo $this->buttonImagePath(); ?> type="submit"></button>
|
96 |
+
</form>
|
media/GSX/images/default/Thumbs.db
ADDED
Binary file
|
media/GSX/images/default/gc_button.gif
CHANGED
Binary file
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GSXInternationalCheckout</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license">GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Installs International Checkout Button in your cart</summary>
|
10 |
<description>Installs International Checkout Button in your cart</description>
|
11 |
-
<notes>
|
12 |
-
<authors><author><name>Globalshopex</name><user>
|
13 |
-
<date>2014-
|
14 |
-
<time>16:
|
15 |
-
<contents><target name="magecommunity"><dir name="GSX"><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>4.0.1</min><max>5.5.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>GSXInternationalCheckout</name>
|
4 |
+
<version>1.2.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license">GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Installs International Checkout Button in your cart</summary>
|
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-05</date>
|
14 |
+
<time>16:01:30</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="GSX"><dir name="InternationalCheckout"><dir name="Block"><file name="International.php" hash="82d907ce78e48ccfe92ab0b363c4d908"/></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="33cd5395068517f179849e2b1e0cbc3e"/></dir><dir name="etc"><file name="config.xml" hash="e75fc8bd8e0296f724d6d22d029b6fc0"/><file name="system.xml" hash="7de1bb34ef630cc0f11d84787a35db8f"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="Internationalcheckout"><file name="Login.phtml" hash="971f4e9cb3e01bd5dc7206b4470c4159"/><file name="international.phtml" hash="f1f6829d8492f6ca81c7b5cf7d3ab4cc"/></dir></dir><dir name="layout"><file name="internationalcheckout.xml" hash="9cc53141430cb01172557996e4f43a69"/></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>
|