Version Notes
Notes
Download this release
Release Info
| Developer | Bobby Burden |
| Extension | iparcel_carthandoff |
| Version | 1.3.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.2.0 to 1.3.0
- app/code/community/Iparcel/All/Block/Catalog/Product/List.php +9 -0
- app/code/community/Iparcel/All/Helper/Api.php +7 -6
- app/code/community/Iparcel/CartHandoff/Block/Adminhtml/Checkitems/Button.php +31 -0
- app/code/community/Iparcel/CartHandoff/Helper/Api.php +140 -0
- app/code/community/Iparcel/CartHandoff/Model/Catalog/Layer.php +33 -0
- app/code/community/Iparcel/CartHandoff/Model/Catalog/Product/Type/Configurable/Price.php +26 -0
- app/code/community/Iparcel/CartHandoff/Model/Catalog/Product/Type/Price.php +36 -0
- app/code/community/Iparcel/CartHandoff/Model/Checkitems.php +149 -0
- app/code/community/Iparcel/CartHandoff/Model/Resource/Checkitems.php +18 -0
- app/code/community/Iparcel/CartHandoff/Model/Resource/Checkitems/Collection.php +18 -0
- app/code/community/Iparcel/CartHandoff/Model/Resource/Mysql4/Setup.php +11 -0
- app/code/community/Iparcel/CartHandoff/Model/System/Config/Source/Checkitems/Cache.php +43 -0
- app/code/community/Iparcel/CartHandoff/controllers/Adminhtml/Ipcarthandoff/Checkitems/CacheController.php +25 -0
- app/code/community/Iparcel/CartHandoff/etc/config.xml +43 -1
- app/code/community/Iparcel/CartHandoff/etc/system.xml +39 -0
- app/code/community/Iparcel/CartHandoff/sql/ipcarthandoff_setup/mysql4-upgrade-1.2.0-1.3.0.php +22 -0
- package.xml +4 -4
app/code/community/Iparcel/All/Block/Catalog/Product/List.php
CHANGED
|
@@ -59,6 +59,15 @@ class Iparcel_All_Block_Catalog_Product_List extends Mage_Catalog_Block_Product_
|
|
| 59 |
}
|
| 60 |
}
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
return $this->_productCollection;
|
| 63 |
}
|
| 64 |
|
| 59 |
}
|
| 60 |
}
|
| 61 |
|
| 62 |
+
// If "checkItems" is enabled, call the CartHandoff API model to
|
| 63 |
+
// check the items in the product collection
|
| 64 |
+
if (Mage::getStoreConfig('iparcel/international_customer/checkitems')) {
|
| 65 |
+
$handoffApi = Mage::helper('ipcarthandoff/api');
|
| 66 |
+
if (is_object($handoffApi)) {
|
| 67 |
+
$handoffApi->checkItems($this->_productCollection);
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
return $this->_productCollection;
|
| 72 |
}
|
| 73 |
|
app/code/community/Iparcel/All/Helper/Api.php
CHANGED
|
@@ -384,27 +384,28 @@ class Iparcel_All_Helper_Api
|
|
| 384 |
$itemProduct = Mage::getModel('catalog/product')->load($item->getOrderItem()->getProductId());
|
| 385 |
}
|
| 386 |
//get item price
|
| 387 |
-
$itemPrice = (float)$
|
| 388 |
// if not price and item has parent (is configurable)
|
| 389 |
if (!$itemPrice && ($parent=$item->getParentItem())) {
|
| 390 |
// get parent price
|
| 391 |
-
$itemPrice = (float)$
|
| 392 |
}
|
| 393 |
// if still not price
|
| 394 |
if (!$itemPrice) {
|
| 395 |
// get product price
|
| 396 |
$itemPrice = (float)$this->_getProductAttribute($item->getProduct(), 'price');
|
| 397 |
}
|
|
|
|
| 398 |
// if product isn't virtual and is configurable or downloadable
|
| 399 |
if ($item["is_virtual"] == false && !in_array($itemProduct->getTypeId(), array('configurable','downloadable'))) {
|
| 400 |
// add line item node
|
| 401 |
$lineItem = array();
|
| 402 |
$lineItem['SKU'] = $item->getSku();
|
| 403 |
$lineItem['ValueUSD'] = $itemPrice;
|
| 404 |
-
$lineItem['
|
| 405 |
-
$lineItem['
|
| 406 |
-
$lineItem['CustWidthInches'] = (float)$
|
| 407 |
-
$lineItem['
|
| 408 |
$lineItem['Quantity'] = (float)$item->getQty();
|
| 409 |
$lineItem['ValueShopperCurrency'] = $itemPrice;
|
| 410 |
$lineItem['ShopperCurrency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
|
| 384 |
$itemProduct = Mage::getModel('catalog/product')->load($item->getOrderItem()->getProductId());
|
| 385 |
}
|
| 386 |
//get item price
|
| 387 |
+
$itemPrice = (float)$item->getFinalPrice() ?: (float)$item->getPrice();
|
| 388 |
// if not price and item has parent (is configurable)
|
| 389 |
if (!$itemPrice && ($parent=$item->getParentItem())) {
|
| 390 |
// get parent price
|
| 391 |
+
$itemPrice = (float)$parent->getFinalPrice() ?: (float)$parent->getPrice();
|
| 392 |
}
|
| 393 |
// if still not price
|
| 394 |
if (!$itemPrice) {
|
| 395 |
// get product price
|
| 396 |
$itemPrice = (float)$this->_getProductAttribute($item->getProduct(), 'price');
|
| 397 |
}
|
| 398 |
+
|
| 399 |
// if product isn't virtual and is configurable or downloadable
|
| 400 |
if ($item["is_virtual"] == false && !in_array($itemProduct->getTypeId(), array('configurable','downloadable'))) {
|
| 401 |
// add line item node
|
| 402 |
$lineItem = array();
|
| 403 |
$lineItem['SKU'] = $item->getSku();
|
| 404 |
$lineItem['ValueUSD'] = $itemPrice;
|
| 405 |
+
$lineItem['CustWeightLbs'] = (float)$item->getWeight();
|
| 406 |
+
$lineItem['CustLengthInches'] = (float)$item->getLength();
|
| 407 |
+
$lineItem['CustWidthInches'] = (float)$item->getWidth();
|
| 408 |
+
$lineItem['CustHeightInches'] = (float)$item->getHeight();
|
| 409 |
$lineItem['Quantity'] = (float)$item->getQty();
|
| 410 |
$lineItem['ValueShopperCurrency'] = $itemPrice;
|
| 411 |
$lineItem['ShopperCurrency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
|
app/code/community/Iparcel/CartHandoff/Block/Adminhtml/Checkitems/Button.php
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Frontend Model Class for checkitems_clear_cache button
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Block_Adminhtml_Checkitems_Button extends Mage_Adminhtml_Block_System_Config_Form_Field
|
| 10 |
+
{
|
| 11 |
+
/**
|
| 12 |
+
* Get Button Html
|
| 13 |
+
*
|
| 14 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
| 15 |
+
* @return string
|
| 16 |
+
*/
|
| 17 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
| 18 |
+
{
|
| 19 |
+
$url = Mage::helper('adminhtml')->getUrl("adminhtml/ipcarthandoff_checkitems_cache/clear");
|
| 20 |
+
$js = "new Ajax.Request('" . $url . "', { onSuccess: function() { alert('Cache Cleared'); }, onFailure: function() { alert('Unable to clear cache'); }});";
|
| 21 |
+
|
| 22 |
+
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
| 23 |
+
->setType('button')
|
| 24 |
+
->setClass('scalable')
|
| 25 |
+
->setLabel('Clear Cache Now')
|
| 26 |
+
->setOnClick($js)
|
| 27 |
+
->toHtml();
|
| 28 |
+
|
| 29 |
+
return $html;
|
| 30 |
+
}
|
| 31 |
+
}
|
app/code/community/Iparcel/CartHandoff/Helper/Api.php
CHANGED
|
@@ -17,6 +17,9 @@ class Iparcel_CartHandoff_Helper_Api extends Iparcel_All_Helper_Api
|
|
| 17 |
/** @var string URL for CancelPayment API Method */
|
| 18 |
protected $_cancelPayment = 'https://pay.i-parcel.com/v1/api/Cancel';
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
/**
|
| 21 |
* Sets up customer's checkout information in UPS i-parcel
|
| 22 |
*
|
|
@@ -256,6 +259,143 @@ class Iparcel_CartHandoff_Helper_Api extends Iparcel_All_Helper_Api
|
|
| 256 |
return false;
|
| 257 |
}
|
| 258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
/**
|
| 260 |
* Builds an address for setCheckout with the given Address Object
|
| 261 |
*
|
| 17 |
/** @var string URL for CancelPayment API Method */
|
| 18 |
protected $_cancelPayment = 'https://pay.i-parcel.com/v1/api/Cancel';
|
| 19 |
|
| 20 |
+
/** @var string URL for CheckItems API Method */
|
| 21 |
+
protected $_checkItems = 'https://webservices.i-parcel.com/api/CheckItems';
|
| 22 |
+
|
| 23 |
/**
|
| 24 |
* Sets up customer's checkout information in UPS i-parcel
|
| 25 |
*
|
| 259 |
return false;
|
| 260 |
}
|
| 261 |
|
| 262 |
+
/**
|
| 263 |
+
* Filters a product collection and removes products that are not eligible
|
| 264 |
+
* for international customers.
|
| 265 |
+
*
|
| 266 |
+
* If a product is passed in instead of a collection, the price from the
|
| 267 |
+
* CheckItems call is used for the product -- no other changes are made.
|
| 268 |
+
*
|
| 269 |
+
* @param object $collection
|
| 270 |
+
* @return object
|
| 271 |
+
*/
|
| 272 |
+
public function checkItems($collection)
|
| 273 |
+
{
|
| 274 |
+
$singleProduct = false;
|
| 275 |
+
$remove = true;
|
| 276 |
+
if (in_array('Varien_Data_Collection', class_parents($collection)) == false) {
|
| 277 |
+
$singleProduct = true;
|
| 278 |
+
$collection = Mage::getModel('catalog/product')
|
| 279 |
+
->getCollection()
|
| 280 |
+
->addAttributeToFilter('sku', $collection->getSku());
|
| 281 |
+
$remove = false;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
$storeId = Mage::app()->getStore()->getId();
|
| 285 |
+
|
| 286 |
+
// Get iparcel cookie
|
| 287 |
+
$cookie = Mage::getModel('core/cookie')->get('ipar_iparcelSession');
|
| 288 |
+
$cookie = json_decode($cookie);
|
| 289 |
+
|
| 290 |
+
// Get iparcel session ID
|
| 291 |
+
$sessID = Mage::getModel('core/cookie')->get('ipar_sess_id');
|
| 292 |
+
|
| 293 |
+
if (!isset($cookie->locale) || $cookie->locale == 'US') {
|
| 294 |
+
return $collection;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
// Pass the product collection into the CheckItems class to check the
|
| 298 |
+
// previously cached results
|
| 299 |
+
$checkItemsModel = Mage::getModel('ipcarthandoff/checkitems');
|
| 300 |
+
$cache = $checkItemsModel->getCache($collection, $cookie->locale, $storeId);
|
| 301 |
+
|
| 302 |
+
$eligibleSKUs = array();
|
| 303 |
+
// If the cache count matches the collection, skip sending the request
|
| 304 |
+
if (count($cache) != count($collection)) {
|
| 305 |
+
$request = array(
|
| 306 |
+
'Key' => Mage::helper('iparcel')->getGuid(),
|
| 307 |
+
'ItemDetailsList' => $this->_prepareCollectionForCheckItems($collection),
|
| 308 |
+
'AddressInfo' => array(
|
| 309 |
+
'Billing' => array(),
|
| 310 |
+
'Shipping' => array(
|
| 311 |
+
'CountryCode' => $cookie->locale,
|
| 312 |
+
'PostalCode' => 'A1A1A1'
|
| 313 |
+
),
|
| 314 |
+
),
|
| 315 |
+
'CurrencyCode' => $cookie->currency,
|
| 316 |
+
'DDP' => true,
|
| 317 |
+
'Insurance' => false,
|
| 318 |
+
'SessionID' => $sessID,
|
| 319 |
+
'ServiceLevel' => 115
|
| 320 |
+
);
|
| 321 |
+
|
| 322 |
+
$response = $this->_restJSON($request, $this->_checkItems);
|
| 323 |
+
|
| 324 |
+
Mage::getModel('iparcel/log')
|
| 325 |
+
->setController('CheckItems')
|
| 326 |
+
->setRequest(json_encode($request))
|
| 327 |
+
->setResponse($response)
|
| 328 |
+
->save();
|
| 329 |
+
|
| 330 |
+
$items = json_decode($response, true);
|
| 331 |
+
$items = $items['ItemDetailsList'];
|
| 332 |
+
|
| 333 |
+
// Cache response from the web service
|
| 334 |
+
$checkItemsModel->cacheResponse($items, $collection, $cookie->locale, $storeId);
|
| 335 |
+
|
| 336 |
+
// Load eligible SKUs into the array
|
| 337 |
+
foreach ($items as $item) {
|
| 338 |
+
if ($item['HTSCode'] != '' && $item['HTSCode'] != 'NONE') {
|
| 339 |
+
$eligibleSKUs[$item['SKU']] = $item['ValueCompanyCurrency'];
|
| 340 |
+
}
|
| 341 |
+
}
|
| 342 |
+
} else {
|
| 343 |
+
// Build the $eligibleSKUs array from the cache
|
| 344 |
+
foreach ($cache as $sku => $price) {
|
| 345 |
+
$eligibleSKUs[$sku] = $price;
|
| 346 |
+
}
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// Strip products from the collection that are not in the array
|
| 350 |
+
$itemIds = array();
|
| 351 |
+
foreach ($collection->getItems() as $key => &$item) {
|
| 352 |
+
if (in_array($item->getSku(), array_keys($eligibleSKUs))) {
|
| 353 |
+
$itemIds[] = $key;
|
| 354 |
+
} else {
|
| 355 |
+
$collection->removeItemByKey($key);
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
// Add filter for items remaining, and reload
|
| 360 |
+
if ($remove){
|
| 361 |
+
$collection->addFieldToFilter('entity_id',
|
| 362 |
+
array(
|
| 363 |
+
'in' => $itemIds
|
| 364 |
+
)
|
| 365 |
+
);
|
| 366 |
+
$collection->load();
|
| 367 |
+
}
|
| 368 |
+
|
| 369 |
+
if ($singleProduct) {
|
| 370 |
+
return $collection->getFirstItem();
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
return $collection;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
/**
|
| 377 |
+
* Formats the products from the collection for the ItemDetailsList of Checkitems
|
| 378 |
+
*
|
| 379 |
+
* @param object $collection
|
| 380 |
+
* @return array Product array formatted for CheckItems
|
| 381 |
+
*/
|
| 382 |
+
private function _prepareCollectionForCheckItems($collection)
|
| 383 |
+
{
|
| 384 |
+
$productArray = array();
|
| 385 |
+
|
| 386 |
+
foreach ($collection as $product) {
|
| 387 |
+
$item = array(
|
| 388 |
+
'SKU' => $product->getSku(),
|
| 389 |
+
'Quantity' => 1,
|
| 390 |
+
'itemStyle' => null,
|
| 391 |
+
);
|
| 392 |
+
|
| 393 |
+
$productArray[] = $item;
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
return $productArray;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
/**
|
| 400 |
* Builds an address for setCheckout with the given Address Object
|
| 401 |
*
|
app/code/community/Iparcel/CartHandoff/Model/Catalog/Layer.php
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Perform CheckItems call on layered navigation collection
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
|
| 10 |
+
{
|
| 11 |
+
public function getProductCollection()
|
| 12 |
+
{
|
| 13 |
+
if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
|
| 14 |
+
$collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
|
| 15 |
+
} else {
|
| 16 |
+
$collection = $this->getCurrentCategory()->getProductCollection();
|
| 17 |
+
$this->prepareProductCollection($collection);
|
| 18 |
+
|
| 19 |
+
// If "checkItems" is enabled, call the CartHandoff API model to
|
| 20 |
+
// check the items in the product collection
|
| 21 |
+
if (Mage::getStoreConfig('iparcel/international_customer/checkitems')) {
|
| 22 |
+
$handoffApi = Mage::helper('ipcarthandoff/api');
|
| 23 |
+
if (is_object($handoffApi)) {
|
| 24 |
+
$handoffApi->checkItems($collection);
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
$this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
return $collection;
|
| 32 |
+
}
|
| 33 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/Catalog/Product/Type/Configurable/Price.php
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Product Type Price Model for Configurable Products
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_Catalog_Product_Type_Configurable_Price extends Mage_Catalog_Model_Product_Type_Configurable_Price
|
| 10 |
+
{
|
| 11 |
+
private $_priceModel = null;
|
| 12 |
+
|
| 13 |
+
private function _getPriceModel()
|
| 14 |
+
{
|
| 15 |
+
if (is_null($this->_priceModel)) {
|
| 16 |
+
$this->_priceModel = Mage::getModel('ipcarthandoff/catalog_product_type_price');
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
return $this->_priceModel;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
public function getPrice($product)
|
| 23 |
+
{
|
| 24 |
+
return $this->_getPriceModel()->getPrice($product, $this);
|
| 25 |
+
}
|
| 26 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/Catalog/Product/Type/Price.php
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Product Type Price Model
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_Catalog_Product_Type_Price extends Mage_Catalog_Model_Product_Type_Price
|
| 10 |
+
{
|
| 11 |
+
public function getPrice($product, $model = null)
|
| 12 |
+
{
|
| 13 |
+
if (is_null($model)) {
|
| 14 |
+
$model = $this;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
if (Mage::getStoreConfig('iparcel/international_customer/checkitems_price')) {
|
| 18 |
+
$checkItemsPrice = $this->getCheckItemsPrice($product);
|
| 19 |
+
if (!is_null($checkItemsPrice)) {
|
| 20 |
+
return $checkItemsPrice;
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
// Load the parent class based on the class passed to this method.
|
| 25 |
+
// This is used so that this method doesn't have to be re-implemented
|
| 26 |
+
// in the Configurable/Price class
|
| 27 |
+
$parentClass = get_parent_class($model);
|
| 28 |
+
$parent = new $parentClass;
|
| 29 |
+
return $parent->getPrice($product);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public function getCheckItemsPrice($product)
|
| 33 |
+
{
|
| 34 |
+
return Mage::getModel('ipcarthandoff/checkitems')->getCachedPrice($product);
|
| 35 |
+
}
|
| 36 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/Checkitems.php
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Provides an interface to the CheckItems cache
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_Checkitems extends Mage_Core_Model_Abstract
|
| 10 |
+
{
|
| 11 |
+
/**
|
| 12 |
+
* Initialize resource model
|
| 13 |
+
*/
|
| 14 |
+
protected function _construct()
|
| 15 |
+
{
|
| 16 |
+
$this->_init('ipcarthandoff/checkitems');
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Caches the response from the CheckItems web service
|
| 21 |
+
*
|
| 22 |
+
* @param array $items
|
| 23 |
+
* @param Mage_Catalog_Model_Product_Collection $collection
|
| 24 |
+
* @param string $country
|
| 25 |
+
* @param integer $storeId
|
| 26 |
+
* @return $this
|
| 27 |
+
*/
|
| 28 |
+
public function cacheResponse($items, $collection, $country, $storeId)
|
| 29 |
+
{
|
| 30 |
+
// Find just the list of SKUs
|
| 31 |
+
foreach ($items as $key => $item) {
|
| 32 |
+
$items[$item['SKU']] = $item['ValueCompanyCurrency'];
|
| 33 |
+
unset($items[$key]);
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// Save eligibility of each SKU
|
| 37 |
+
foreach ($collection as $product) {
|
| 38 |
+
if (in_array($product->getSku(), array_keys($items))) {
|
| 39 |
+
$eligibile = true;
|
| 40 |
+
$price = $items[$product->getSku()];
|
| 41 |
+
} else {
|
| 42 |
+
$eligibile = false;
|
| 43 |
+
$price = null;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
$checkItems = Mage::getModel('ipcarthandoff/checkitems')
|
| 47 |
+
->getCollection()
|
| 48 |
+
->addFieldToFilter('sku', $product->getSku())
|
| 49 |
+
->addFieldToFilter('country', $country)
|
| 50 |
+
->addFieldToFilter('store_id', $storeId)
|
| 51 |
+
->getFirstItem();
|
| 52 |
+
|
| 53 |
+
$checkItems->setSku($product->getSku());
|
| 54 |
+
$checkItems->setCountry($country);
|
| 55 |
+
$checkItems->setUpdatedAt(0);
|
| 56 |
+
$checkItems->setStoreId($storeId);
|
| 57 |
+
$checkItems->setPrice($price);
|
| 58 |
+
$checkItems->setEligible($eligibile);
|
| 59 |
+
$checkItems->save();
|
| 60 |
+
|
| 61 |
+
unset($checkItems);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
return $this;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Retrieves cache from database
|
| 69 |
+
*
|
| 70 |
+
* @param Mage_Catalog_Product_Collection $collection
|
| 71 |
+
* @param string $country
|
| 72 |
+
* @return array
|
| 73 |
+
*/
|
| 74 |
+
public function getCache($collection, $country, $storeId)
|
| 75 |
+
{
|
| 76 |
+
$results = array();
|
| 77 |
+
|
| 78 |
+
// Pull skus from the collection
|
| 79 |
+
$skus = array();
|
| 80 |
+
foreach ($collection as $product) {
|
| 81 |
+
$skus[] = $product->getSku();
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
$pastDate = $this->_getCacheExpirationFromDate();
|
| 85 |
+
$now = Mage::getModel('core/date')
|
| 86 |
+
->date('Y-m-d H:i:s', strtotime('now'));
|
| 87 |
+
|
| 88 |
+
// Query the cached results from the database
|
| 89 |
+
$cache = $this->getCollection()
|
| 90 |
+
->addFieldToFilter('sku', array('in' => $skus))
|
| 91 |
+
->addFieldToFilter('country', $country)
|
| 92 |
+
->addFieldToFilter('store_id', $storeId)
|
| 93 |
+
->addFieldToFilter('updated_at', array(
|
| 94 |
+
'from' => $pastDate,
|
| 95 |
+
'to' => $now,
|
| 96 |
+
'date' => true
|
| 97 |
+
));
|
| 98 |
+
|
| 99 |
+
foreach ($cache as $item) {
|
| 100 |
+
// Only return eligible items
|
| 101 |
+
if ($item->getEligible()) {
|
| 102 |
+
$results[$item->getSku()] = $item->getPrice();
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
return $results;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
public function getCachedPrice($product)
|
| 110 |
+
{
|
| 111 |
+
$storeId = Mage::app()->getStore()->getId();
|
| 112 |
+
|
| 113 |
+
// Get iparcel cookie
|
| 114 |
+
$cookie = Mage::getModel('core/cookie')->get('ipar_iparcelSession');
|
| 115 |
+
$cookie = json_decode($cookie);
|
| 116 |
+
|
| 117 |
+
if (!isset($cookie->locale) || $cookie->locale == 'US') {
|
| 118 |
+
return null;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
// Make checkItems call for the product
|
| 122 |
+
$apiHelper = Mage::helper('ipcarthandoff/api');
|
| 123 |
+
$product = $apiHelper->checkItems($product);
|
| 124 |
+
|
| 125 |
+
$checkItem = $this->getCollection()
|
| 126 |
+
->addFieldToFilter('sku', $product->getSku())
|
| 127 |
+
->addFieldToFilter('country', $cookie->locale)
|
| 128 |
+
->addFieldToFilter('store_id', $storeId)
|
| 129 |
+
->getFirstItem();
|
| 130 |
+
|
| 131 |
+
return $checkItem->getPrice();
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
/**
|
| 135 |
+
* Finds the "From" date that matches the cache expiration setting
|
| 136 |
+
*
|
| 137 |
+
* @return object
|
| 138 |
+
*/
|
| 139 |
+
private function _getCacheExpirationFromDate()
|
| 140 |
+
{
|
| 141 |
+
$value = Mage::getStoreConfig('iparcel/international_customer/checkitems_cache_lifetime');
|
| 142 |
+
$sourceModel = Mage::getModel('ipcarthandoff/system_config_source_checkitems_cache');
|
| 143 |
+
$sourceArray = $sourceModel->toArray();
|
| 144 |
+
$value = $sourceArray[$value];
|
| 145 |
+
|
| 146 |
+
return Mage::getModel('core/date')
|
| 147 |
+
->date('Y-m-d H:i:s ', strtotime('-1 ' . $value));
|
| 148 |
+
}
|
| 149 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/Resource/Checkitems.php
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Resource Model for Iparcel_CartHandoff_Model_Checkitems class
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_Carthandoff_Model_Resource_Checkitems extends Mage_Core_Model_Resource_Db_Abstract
|
| 10 |
+
{
|
| 11 |
+
/**
|
| 12 |
+
* Initializing Resource
|
| 13 |
+
*/
|
| 14 |
+
protected function _construct()
|
| 15 |
+
{
|
| 16 |
+
$this->_init('ipcarthandoff/checkitems', 'id');
|
| 17 |
+
}
|
| 18 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/Resource/Checkitems/Collection.php
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Resource Collection Model for Iparcel_CartHandoff_Model_Checkitems class
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_Resource_Checkitems_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
| 10 |
+
{
|
| 11 |
+
/**
|
| 12 |
+
* Initializing Resource Collection
|
| 13 |
+
*/
|
| 14 |
+
public function _construct()
|
| 15 |
+
{
|
| 16 |
+
$this->_init('ipcarthandoff/checkitems');
|
| 17 |
+
}
|
| 18 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/Resource/Mysql4/Setup.php
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Setup Resource class
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup
|
| 10 |
+
{
|
| 11 |
+
}
|
app/code/community/Iparcel/CartHandoff/Model/System/Config/Source/Checkitems/Cache.php
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Source model for CheckItems cache lifetime option
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Model_System_Config_Source_Checkitems_Cache
|
| 10 |
+
{
|
| 11 |
+
const DAY = "0";
|
| 12 |
+
const WEEK = "1";
|
| 13 |
+
const MONTH = "2";
|
| 14 |
+
|
| 15 |
+
/**
|
| 16 |
+
* Options list
|
| 17 |
+
*
|
| 18 |
+
* @return array
|
| 19 |
+
*/
|
| 20 |
+
public function toOptionArray()
|
| 21 |
+
{
|
| 22 |
+
return array(
|
| 23 |
+
array('value' => self::DAY, 'label' => Mage::helper('ipcarthandoff')->__('One day')),
|
| 24 |
+
array('value' => self::WEEK, 'label' => Mage::helper('ipcarthandoff')->__('One week')),
|
| 25 |
+
array('value' => self::MONTH, 'label' => Mage::helper('ipcarthandoff')->__('One month')),
|
| 26 |
+
);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
/**
|
| 30 |
+
* Returns array of option values
|
| 31 |
+
*
|
| 32 |
+
* @return array
|
| 33 |
+
*/
|
| 34 |
+
public function toArray()
|
| 35 |
+
{
|
| 36 |
+
return array(
|
| 37 |
+
self::DAY => 'day',
|
| 38 |
+
self::WEEK => 'week',
|
| 39 |
+
self::MONTH => 'month'
|
| 40 |
+
);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
}
|
app/code/community/Iparcel/CartHandoff/controllers/Adminhtml/Ipcarthandoff/Checkitems/CacheController.php
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* CartHandoff CheckItems Cache Controller
|
| 4 |
+
*
|
| 5 |
+
* @category Iparcel
|
| 6 |
+
* @package Iparcel_CartHandoff
|
| 7 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
| 8 |
+
*/
|
| 9 |
+
class Iparcel_CartHandoff_Adminhtml_Ipcarthandoff_Checkitems_CacheController extends Mage_Adminhtml_Controller_Action
|
| 10 |
+
{
|
| 11 |
+
/**
|
| 12 |
+
* Clears CheckItems cache
|
| 13 |
+
*/
|
| 14 |
+
public function clearAction()
|
| 15 |
+
{
|
| 16 |
+
$cache = Mage::getModel('ipcarthandoff/checkitems')
|
| 17 |
+
->getCollection()
|
| 18 |
+
->addFieldToFilter('id', array('gt' => 0))
|
| 19 |
+
->load();
|
| 20 |
+
|
| 21 |
+
foreach($cache as $item) {
|
| 22 |
+
$item->delete();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
app/code/community/Iparcel/CartHandoff/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Iparcel_CartHandoff>
|
| 5 |
-
<version>1.
|
| 6 |
</Iparcel_CartHandoff>
|
| 7 |
</modules>
|
| 8 |
<global>
|
|
@@ -11,11 +11,27 @@
|
|
| 11 |
<class>Iparcel_CartHandoff_Model</class>
|
| 12 |
<resourceModel>ipcarthandoff_resource</resourceModel>
|
| 13 |
</ipcarthandoff>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
<sales>
|
| 15 |
<rewrite>
|
| 16 |
<order>Iparcel_CartHandoff_Model_Sales_Order</order>
|
| 17 |
</rewrite>
|
| 18 |
</sales>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</models>
|
| 20 |
<helpers>
|
| 21 |
<ipcarthandoff>
|
|
@@ -27,6 +43,17 @@
|
|
| 27 |
<class>Iparcel_CartHandoff_Block</class>
|
| 28 |
</ipcarthandoff>
|
| 29 |
</blocks>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
<events>
|
| 31 |
<core_block_abstract_prepare_layout_after>
|
| 32 |
<observers>
|
|
@@ -57,6 +84,17 @@
|
|
| 57 |
</ipcarthandoff>
|
| 58 |
</routers>
|
| 59 |
</frontend>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
<default>
|
| 61 |
<payment>
|
| 62 |
<ipcarthandoff>
|
|
@@ -80,6 +118,10 @@
|
|
| 80 |
<tax>
|
| 81 |
<mode>2</mode>
|
| 82 |
</tax>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
</iparcel>
|
| 84 |
</default>
|
| 85 |
</config>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Iparcel_CartHandoff>
|
| 5 |
+
<version>1.3.0</version>
|
| 6 |
</Iparcel_CartHandoff>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 11 |
<class>Iparcel_CartHandoff_Model</class>
|
| 12 |
<resourceModel>ipcarthandoff_resource</resourceModel>
|
| 13 |
</ipcarthandoff>
|
| 14 |
+
<ipcarthandoff_resource>
|
| 15 |
+
<class>Iparcel_CartHandoff_Model_Resource</class>
|
| 16 |
+
<entities>
|
| 17 |
+
<checkitems>
|
| 18 |
+
<table>iparcel_carthandoff_checkitems_cache</table>
|
| 19 |
+
</checkitems>
|
| 20 |
+
</entities>
|
| 21 |
+
</ipcarthandoff_resource>
|
| 22 |
<sales>
|
| 23 |
<rewrite>
|
| 24 |
<order>Iparcel_CartHandoff_Model_Sales_Order</order>
|
| 25 |
</rewrite>
|
| 26 |
</sales>
|
| 27 |
+
<catalog>
|
| 28 |
+
<rewrite>
|
| 29 |
+
<product_type_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Price</product_type_price>
|
| 30 |
+
<product_type_configurable_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Configurable_Price</product_type_configurable_price>
|
| 31 |
+
<product_type_grouped_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Grouped_Price</product_type_grouped_price>
|
| 32 |
+
<layer>Iparcel_CartHandoff_Model_Catalog_Layer</layer>
|
| 33 |
+
</rewrite>
|
| 34 |
+
</catalog>
|
| 35 |
</models>
|
| 36 |
<helpers>
|
| 37 |
<ipcarthandoff>
|
| 43 |
<class>Iparcel_CartHandoff_Block</class>
|
| 44 |
</ipcarthandoff>
|
| 45 |
</blocks>
|
| 46 |
+
<resources>
|
| 47 |
+
<ipcarthandoff_setup>
|
| 48 |
+
<setup>
|
| 49 |
+
<module>Iparcel_CartHandoff</module>
|
| 50 |
+
<class>Iparcel_CartHandoff_Model_Resource_Mysql4_Setup</class>
|
| 51 |
+
</setup>
|
| 52 |
+
<connection>
|
| 53 |
+
<use>core_setup</use>
|
| 54 |
+
</connection>
|
| 55 |
+
</ipcarthandoff_setup>
|
| 56 |
+
</resources>
|
| 57 |
<events>
|
| 58 |
<core_block_abstract_prepare_layout_after>
|
| 59 |
<observers>
|
| 84 |
</ipcarthandoff>
|
| 85 |
</routers>
|
| 86 |
</frontend>
|
| 87 |
+
<admin>
|
| 88 |
+
<routers>
|
| 89 |
+
<adminhtml>
|
| 90 |
+
<args>
|
| 91 |
+
<modules>
|
| 92 |
+
<ipcarthandoff after="Mage_Adminhtml">Iparcel_CartHandoff_Adminhtml</ipcarthandoff>
|
| 93 |
+
</modules>
|
| 94 |
+
</args>
|
| 95 |
+
</adminhtml>
|
| 96 |
+
</routers>
|
| 97 |
+
</admin>
|
| 98 |
<default>
|
| 99 |
<payment>
|
| 100 |
<ipcarthandoff>
|
| 118 |
<tax>
|
| 119 |
<mode>2</mode>
|
| 120 |
</tax>
|
| 121 |
+
<international_customer>
|
| 122 |
+
<checkitems_price>0</checkitems_price>
|
| 123 |
+
<checkitems_cache_lifetime>0</checkitems_cache_lifetime>
|
| 124 |
+
</international_customer>
|
| 125 |
</iparcel>
|
| 126 |
</default>
|
| 127 |
</config>
|
app/code/community/Iparcel/CartHandoff/etc/system.xml
CHANGED
|
@@ -113,6 +113,45 @@
|
|
| 113 |
<show_in_default>1</show_in_default>
|
| 114 |
<show_in_website>1</show_in_website>
|
| 115 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
</international_customer>
|
| 117 |
</groups>
|
| 118 |
</iparcel>
|
| 113 |
<show_in_default>1</show_in_default>
|
| 114 |
<show_in_website>1</show_in_website>
|
| 115 |
<show_in_store>1</show_in_store>
|
| 116 |
+
<fields>
|
| 117 |
+
<checkitems translate="label">
|
| 118 |
+
<label>Check i-parcel Catalog for Product Eligibility?</label>
|
| 119 |
+
<frontend_type>select</frontend_type>
|
| 120 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 121 |
+
<sort_order>5</sort_order>
|
| 122 |
+
<show_in_default>1</show_in_default>
|
| 123 |
+
<show_in_website>1</show_in_website>
|
| 124 |
+
<show_in_store>1</show_in_store>
|
| 125 |
+
<tooltip>When enabled, category page product collections are checked against the UPS i-parcel catalog for product eligibility.</tooltip>
|
| 126 |
+
</checkitems>
|
| 127 |
+
<checkitems_price translate="label">
|
| 128 |
+
<label>Use prices from the UPS i-parcel Catalog?</label>
|
| 129 |
+
<frontend_type>select</frontend_type>
|
| 130 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 131 |
+
<sort_order>7</sort_order>
|
| 132 |
+
<show_in_default>1</show_in_default>
|
| 133 |
+
<show_in_website>1</show_in_website>
|
| 134 |
+
<show_in_store>1</show_in_store>
|
| 135 |
+
</checkitems_price>
|
| 136 |
+
<checkitems_cache_lifetime>
|
| 137 |
+
<label>Lifetime of Product Eligibility Cache</label>
|
| 138 |
+
<frontend_type>select</frontend_type>
|
| 139 |
+
<source_model>ipcarthandoff/system_config_source_checkitems_cache</source_model>
|
| 140 |
+
<sort_order>10</sort_order>
|
| 141 |
+
<show_in_default>1</show_in_default>
|
| 142 |
+
<show_in_website>1</show_in_website>
|
| 143 |
+
<show_in_store>1</show_in_store>
|
| 144 |
+
</checkitems_cache_lifetime>
|
| 145 |
+
<checkitems_clear_cache>
|
| 146 |
+
<label>Clear Product Eligibility Cache</label>
|
| 147 |
+
<frontend_type>button</frontend_type>
|
| 148 |
+
<frontend_model>ipcarthandoff/adminhtml_checkitems_button</frontend_model>
|
| 149 |
+
<sort_order>115</sort_order>
|
| 150 |
+
<show_in_default>1</show_in_default>
|
| 151 |
+
<show_in_website>1</show_in_website>
|
| 152 |
+
<show_in_store>1</show_in_store>
|
| 153 |
+
</checkitems_clear_cache>
|
| 154 |
+
</fields>
|
| 155 |
</international_customer>
|
| 156 |
</groups>
|
| 157 |
</iparcel>
|
app/code/community/Iparcel/CartHandoff/sql/ipcarthandoff_setup/mysql4-upgrade-1.2.0-1.3.0.php
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$installer = $this;
|
| 4 |
+
$installer->startSetup();
|
| 5 |
+
|
| 6 |
+
// Create table to store check items cache
|
| 7 |
+
$installer->run("
|
| 8 |
+
DROP TABLE IF EXISTS {$this->getTable('ipcarthandoff/checkitems')};
|
| 9 |
+
CREATE TABLE {$this->getTable('ipcarthandoff/checkitems')} (
|
| 10 |
+
`id` int(11) unsigned NOT NULL auto_increment,
|
| 11 |
+
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 12 |
+
`updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
| 13 |
+
`sku` varchar(255) NOT NULL,
|
| 14 |
+
`country` varchar(3) NOT NULL,
|
| 15 |
+
`store_id` int(11) unsigned NOT NULL,
|
| 16 |
+
`price` DECIMAL(12,4) unsigned DEFAULT NULL,
|
| 17 |
+
`eligible` boolean NOT NULL,
|
| 18 |
+
PRIMARY KEY (`id`)
|
| 19 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| 20 |
+
");
|
| 21 |
+
|
| 22 |
+
$installer->endSetup();
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>iparcel_carthandoff</name>
|
| 4 |
-
<version>1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -16,9 +16,9 @@
|
|
| 16 |
<email>bburden@i-parcel.com</email>
|
| 17 |
</author>
|
| 18 |
</authors>
|
| 19 |
-
<date>2016-
|
| 20 |
-
<time>
|
| 21 |
-
<contents><target name="mageweb"><dir name="app"><dir name="etc"><dir name="modules"><file name="Iparcel_CartHandoff.xml" hash="ffb746b30fb5ff90dd7807211f6a4e9f"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="CartHandoff"><dir name="Block"><file name="Button.php" hash="f0973ed80adca37577c9183d543ffca6"/><file name="Estimate.php" hash="ed76666cb286b1bd36235c7aa23ab098"/><dir name="Form"><file name="Button.php" hash="15c90ba070756ebc2aec36546dd5854b"/></dir></dir><dir name="controllers"><file name="HandoffController.php" hash="f4537926416afe1d689926475b83cce3"/><file name="StatusController.php" hash="511f645fec406059f956aa915c9138b4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e4f3a503dfa55aa0540b87d644cf0631"/><file name="config.xml" hash="823d603e417aa359436168e0868ce8e4"/><file name="system.xml" hash="e579239970b683867b21eeadbd0c9762"/></dir><dir name="Helper"><file name="Api.php" hash="3f60c6dd486b5d19bb7e8eaeef5b744b"/><file name="Data.php" hash="7d31450856880a53e3afa4933acf30ba"/></dir><dir name="Model"><file name="Observer.php" hash="a9e5f4e690008acee3adbef357d1d60f"/><dir name="Payment"><file name="Ipcarthandoff.php" hash="d2339246664d3ad0c793058875187026"/></dir><dir name="Sales"><file name="Order.php" hash="22e4357ef934065b59043fa59e1d88fe"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Buttonplacement.php" hash="7f8a7cfd897ef5a12a082251eb397451"/></dir></dir></dir></dir></dir><dir name="All"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Mapping"><file name="Button.php" hash="dfdaf5a2fbf824a10fccc952fdccf567"/></dir></dir><dir name="Iparcel"><file name="Dashboard.php" hash="ec9dddd10368136f1bdfe79fddd4500c"/><file name="Logs.php" hash="5823bbc2a78666972dd02d5fd3e9d05d"/><dir name="Logs"><file name="Grid.php" hash="9c472c78640c8aecb5de4b638372e6f5"/></dir><dir name="Shipment"><dir name="Split"><file name="Form.php" hash="db44693b1eda47cb1d87b8a69ac9a5a0"/></dir><file name="Split.php" hash="4cb66f91987f842c699bd2d6c42f2249"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Method.php" hash="935a3d4adad09d6c049cd6bb4cefb8db"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="2969af5eed8a1179579fa182e20cd59e"/></dir><file name="Product.php" hash="71a865c01574fd10ee0ffa7475cee378"/></dir><dir name="Catalogsearch"><dir name="Advanced"><file name="Result.php" hash="ad5a157444b80a284e0f9e7a91187b55"/></dir><file name="Result.php" hash="33e4ab0994bde9ba5dd87ade63869bee"/></dir><dir name="Html"><dir name="Head"><file name="Iparcel.php" hash="dd1737d041e9357269fa35b27dbef0bd"/><file name="Jquery.php" hash="3fd23960111c32d5696cc3de63e41b6e"/><file name="Post.php" hash="793d578cf82fb3ba83e1edc87b79ff95"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Abstract.php" hash="71cdfdce9a538b2f78b83b7b5eac8b19"/><file name="Duty.php" hash="f8ae79b70c6b5ba41c7acac9be5d84c0"/><file name="Tax.php" hash="1cfee0fccb1feede23f3cdc22f57c903"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Iparcel"><file name="LogController.php" hash="94e2095979140ad6d7c149080be30d38"/><file name="ShipmentController.php" hash="a9b8896d816b7612e1dc0638a2f8b740"/><file name="SyncController.php" hash="9378f5db27d059bbb36ff1e71bd38d32"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="ceaffb0c652954b95e83426c763a2d0d"/></dir></dir></dir><file name="AjaxController.php" hash="f6b0573eefbb21d7ac863fd029783b3c"/><file name="InfoController.php" hash="6543b1e9803489e507d2470f8e3e408b"/><file name="InternationalController.php" hash="75fc93febe96e328d5927665c33d40d1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="4bd33ca7a2dca415a545f524165ced48"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="d20c7a56fbc922a6bca34ea547aa3092"/><file name="Data.php" hash="0c32ec392ffb3857571f272c21d84faa"/><file name="International.php" hash="7bba0cd23188eaa3f99ed3d32ffccd14"/></dir><dir name="Model"><dir name="Api"><file name="Quote.php" hash="2e938bda13d007e73f8c2238aff76fa1"/></dir><dir name="Carrier"><file name="Iparcel.php" hash="ad65fdc9f7f2264e9704b0f17d89dd34"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="d16d89cea8eea6352a7d9b1193cd9512"/></dir></dir><dir name="Config"><dir name="Script"><file name="Js.php" hash="100822286c5326c82cbc5d4ff3cf4c39"/></dir></dir><file name="Cron.php" hash="670d37cd6cdbe60aa69fad8eb0a0759e"/><file name="Log.php" hash="8c87e5f356f8ca77a186430dda106097"/><file name="Observer.php" hash="ad3c34320671927263e673e18c798a34"/><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Duty.php" hash="33b91a5b8fa32293bfe0eab4460b04f9"/><file name="Tax.php" hash="7cd4046231eb8cb9031ae160720390da"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Duty.php" hash="5a4010994ea502afe88632ddd2699c63"/><file name="Tax.php" hash="c4c95aaaae9662860dd635238150aa46"/></dir></dir></dir><dir name="Payment"><file name="Iparcel.php" hash="30ad607409d5ed225e233638ecbff39c"/></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Abstract.php" hash="a3af320e934f50651e09bfd15b86ffea"/><file name="Collector.php" hash="f99413fe415c342d5c0d582caa767ad1"/><file name="Duty.php" hash="6ef16c8b2038d5c90b4b9c7d00825da2"/><file name="Tax.php" hash="62c9e255562643a967b8c49b9914524d"/></dir></dir></dir><dir name="Resource"><dir name="Api"><file name="Quote.php" hash="84d032b89c5df67ef24a112ad7846302"/></dir><dir name="Log"><file name="Collection.php" hash="7cb78be07207a599eff71c1e18ba0b7a"/></dir><file name="Log.php" hash="d14c2eb8314456a18adadbb52856e0b5"/><dir name="Mysql4"><file name="Setup.php" hash="9f9cf4b5934b70bd00b394beacb245f7"/></dir></dir><dir name="System"><dir name="Config"><dir name="Catalog"><file name="Mapping.php" hash="8895678aa59e49226509d2b4709c5f43"/></dir><dir name="Data"><dir name="Date"><file name="Monthday.php" hash="baec5b8a27c5b037529ba935aae0370a"/><file name="Weekday.php" hash="173edc075325d932f8dad6d4674b8153"/></dir><dir name="Time"><file name="Hour.php" hash="ddad98b85290d9b13ec9f65fbe8a10b3"/><file name="Minute.php" hash="4a76af0057d60e8ff0ff7fedc1d50575"/></dir></dir><file name="Guid.php" hash="311c7f8072f02a6be9e25b6411298c5c"/><dir name="Script"><file name="Js.php" hash="3e3f23b38ecdc361bf6ff6cee1871e92"/></dir><dir name="Source"><dir name="Catalog"><dir name="Mapping"><dir name="Configurable"><file name="Price.php" hash="f9116fd446914467e7fb31bed5a6dd0b"/></dir><file name="Mode.php" hash="36140a050ea65ff23d45264fa67e1a2b"/></dir><dir name="Product"><dir name="Attribute"><file name="Boolean.php" hash="ca1883122659f1b48890ecd46a1590ee"/></dir><file name="Attribute.php" hash="8ca9c929cda497400865751ffba991e6"/></dir></dir><dir name="Date"><file name="Weekday.php" hash="143c26f9661e5dc995ff064e333a2018"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="f1e414c08c43ebb2fcc6ccf5b41a2ff2"/></dir></dir><dir name="Tax"><file name="Mode.php" hash="fb09f17b54ef8ffa22580741cc66ac14"/></dir></dir></dir></dir><dir name="Tax"><dir name="Quote"><file name="Shipping.php" hash="5d76b072c657035cf3d7713fa6672f1f"/><file name="Subtotal.php" hash="cbd2e41f3bdc74134590a675d93d4bfb"/><file name="Tax.php" hash="ffc8d78a8d0442690c49b60f909c8e48"/></dir></dir></dir><dir name="sql"><dir name="iparcel_setup"><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4df6e3a3f2adf96eeb6ccdac213e3f1e"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="cfb9fbc137e7e551dfaece00ac6bb2f4"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="1f04c5c71a6a79aaf74810e87670d998"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="de1c9caa713dd194595aa2dd15a829ac"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ipcarthandoff.xml" hash="ed7faf180d54254f9bd4bfde21cdec1d"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir><dir name="template"><dir name="iparcel"><dir name="carthandoff"><file name="button.phtml" hash="2af5a49d42e702e723bc083c8af661e1"/><file name="estimate.phtml" hash="4613986760ea91bbfe607336008da870"/><dir name="form"><file name="button.phtml" hash="603683fdeb5153c8ce4649f72967180a"/></dir></dir><dir name="html"><dir name="head"><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/></dir></dir><dir name="post"><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/></dir><file name="post.phtml" hash="3827cab2dba981556aeb8ec915ab03cc"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iparcel.xml" hash="c6be54da5875c9356bba8988fa8c264c"/></dir><dir name="template"><dir name="iparcel"><dir name="order"><dir name="totals"><file name="duty.phtml" hash="7af41c6d47dafeb890a520d8e6e39910"/><file name="tax.phtml" hash="25bffd2b58554cf28e5f4abe4b4e1e7c"/></dir></dir><dir name="sync"><dir name="ajax"><file name="catalog.phtml" hash="64da446db5c1bfe892951c9b3c7f1e7d"/><file name="checkitems.phtml" hash="c19b0e4fd0feddedbc2cef3b2f4ce79b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="js"><dir name="iparcel"><file name="cart-buttons.js" hash="a52eb58ce49540c4d206f5e7bbd98ab8"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><dir name="adminhtml"><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><file name="ajaxSync.css" hash="c622b9e4b77589bc0f3c0555124d2751"/></dir></dir></dir></dir></dir></target></contents>
|
| 22 |
<compatible/>
|
| 23 |
<dependencies>
|
| 24 |
<required>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>iparcel_carthandoff</name>
|
| 4 |
+
<version>1.3.0</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 16 |
<email>bburden@i-parcel.com</email>
|
| 17 |
</author>
|
| 18 |
</authors>
|
| 19 |
+
<date>2016-06-27</date>
|
| 20 |
+
<time>19:39:06</time>
|
| 21 |
+
<contents><target name="mageweb"><dir name="app"><dir name="etc"><dir name="modules"><file name="Iparcel_CartHandoff.xml" hash="ffb746b30fb5ff90dd7807211f6a4e9f"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="CartHandoff"><dir name="Block"><dir name="Adminhtml"><dir name="Checkitems"><file name="Button.php" hash="996c59c0e070bfe0abcfbc75c33d9181"/></dir></dir><file name="Button.php" hash="f0973ed80adca37577c9183d543ffca6"/><file name="Estimate.php" hash="ed76666cb286b1bd36235c7aa23ab098"/><dir name="Form"><file name="Button.php" hash="15c90ba070756ebc2aec36546dd5854b"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Ipcarthandoff"><dir name="Checkitems"><file name="CacheController.php" hash="8d73c7c25b536538d4e5a1d603f34f12"/></dir></dir></dir><file name="HandoffController.php" hash="f4537926416afe1d689926475b83cce3"/><file name="StatusController.php" hash="511f645fec406059f956aa915c9138b4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e4f3a503dfa55aa0540b87d644cf0631"/><file name="config.xml" hash="2e14440edbe2e995b8fd1e447ebce86c"/><file name="system.xml" hash="4bd0897a82572a7ef4cb5b10b0800353"/></dir><dir name="Helper"><file name="Api.php" hash="c7f3fc77ef24d3f7d18133355fcf06fb"/><file name="Data.php" hash="7d31450856880a53e3afa4933acf30ba"/></dir><dir name="Model"><dir name="Catalog"><file name="Layer.php" hash="b7410cb6b76bcf6282d0de45fcfd4214"/><dir name="Product"><dir name="Type"><dir name="Configurable"><file name="Price.php" hash="9757c4a3a06ab09e20f505b83197a864"/></dir><file name="Price.php" hash="0b5b030df7a614b880a07642d9166888"/></dir></dir></dir><file name="Checkitems.php" hash="4cd85d69b947817ad4d806b6fff4083b"/><file name="Observer.php" hash="a9e5f4e690008acee3adbef357d1d60f"/><dir name="Payment"><file name="Ipcarthandoff.php" hash="d2339246664d3ad0c793058875187026"/></dir><dir name="Resource"><dir name="Checkitems"><file name="Collection.php" hash="9a488c5a6c0b3d16f63817afd691ae80"/></dir><file name="Checkitems.php" hash="03ba687675e6eef24e6fed32c4767e55"/><dir name="Mysql4"><file name="Setup.php" hash="c7609fb203ba82fa7e1a39457f1edb3b"/></dir></dir><dir name="Sales"><file name="Order.php" hash="22e4357ef934065b59043fa59e1d88fe"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Buttonplacement.php" hash="7f8a7cfd897ef5a12a082251eb397451"/><dir name="Checkitems"><file name="Cache.php" hash="ea4566851a70fee0473a283a7bfa0a2c"/></dir></dir></dir></dir></dir><dir name="sql"><dir name="ipcarthandoff_setup"><file name="mysql4-upgrade-1.2.0-1.3.0.php" hash="7ca0cb70401d337c7462d0f72108613b"/></dir></dir></dir><dir name="All"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Mapping"><file name="Button.php" hash="dfdaf5a2fbf824a10fccc952fdccf567"/></dir></dir><dir name="Iparcel"><file name="Dashboard.php" hash="ec9dddd10368136f1bdfe79fddd4500c"/><file name="Logs.php" hash="5823bbc2a78666972dd02d5fd3e9d05d"/><dir name="Logs"><file name="Grid.php" hash="9c472c78640c8aecb5de4b638372e6f5"/></dir><dir name="Shipment"><dir name="Split"><file name="Form.php" hash="db44693b1eda47cb1d87b8a69ac9a5a0"/></dir><file name="Split.php" hash="4cb66f91987f842c699bd2d6c42f2249"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Method.php" hash="935a3d4adad09d6c049cd6bb4cefb8db"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="5de6102a56f4a9301f1b81004da39ef8"/></dir><file name="Product.php" hash="71a865c01574fd10ee0ffa7475cee378"/></dir><dir name="Catalogsearch"><dir name="Advanced"><file name="Result.php" hash="ad5a157444b80a284e0f9e7a91187b55"/></dir><file name="Result.php" hash="33e4ab0994bde9ba5dd87ade63869bee"/></dir><dir name="Html"><dir name="Head"><file name="Iparcel.php" hash="dd1737d041e9357269fa35b27dbef0bd"/><file name="Jquery.php" hash="3fd23960111c32d5696cc3de63e41b6e"/><file name="Post.php" hash="793d578cf82fb3ba83e1edc87b79ff95"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Abstract.php" hash="71cdfdce9a538b2f78b83b7b5eac8b19"/><file name="Duty.php" hash="f8ae79b70c6b5ba41c7acac9be5d84c0"/><file name="Tax.php" hash="1cfee0fccb1feede23f3cdc22f57c903"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Iparcel"><file name="LogController.php" hash="94e2095979140ad6d7c149080be30d38"/><file name="ShipmentController.php" hash="a9b8896d816b7612e1dc0638a2f8b740"/><file name="SyncController.php" hash="9378f5db27d059bbb36ff1e71bd38d32"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="ceaffb0c652954b95e83426c763a2d0d"/></dir></dir></dir><file name="AjaxController.php" hash="f6b0573eefbb21d7ac863fd029783b3c"/><file name="InfoController.php" hash="6543b1e9803489e507d2470f8e3e408b"/><file name="InternationalController.php" hash="75fc93febe96e328d5927665c33d40d1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="4bd33ca7a2dca415a545f524165ced48"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="bc0872952d20a9a4c7b2a91a644a0017"/><file name="Data.php" hash="0c32ec392ffb3857571f272c21d84faa"/><file name="International.php" hash="7bba0cd23188eaa3f99ed3d32ffccd14"/></dir><dir name="Model"><dir name="Api"><file name="Quote.php" hash="2e938bda13d007e73f8c2238aff76fa1"/></dir><dir name="Carrier"><file name="Iparcel.php" hash="ad65fdc9f7f2264e9704b0f17d89dd34"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="d16d89cea8eea6352a7d9b1193cd9512"/></dir></dir><dir name="Config"><dir name="Script"><file name="Js.php" hash="100822286c5326c82cbc5d4ff3cf4c39"/></dir></dir><file name="Cron.php" hash="670d37cd6cdbe60aa69fad8eb0a0759e"/><file name="Log.php" hash="8c87e5f356f8ca77a186430dda106097"/><file name="Observer.php" hash="ad3c34320671927263e673e18c798a34"/><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Duty.php" hash="33b91a5b8fa32293bfe0eab4460b04f9"/><file name="Tax.php" hash="7cd4046231eb8cb9031ae160720390da"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Duty.php" hash="5a4010994ea502afe88632ddd2699c63"/><file name="Tax.php" hash="c4c95aaaae9662860dd635238150aa46"/></dir></dir></dir><dir name="Payment"><file name="Iparcel.php" hash="30ad607409d5ed225e233638ecbff39c"/></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Abstract.php" hash="a3af320e934f50651e09bfd15b86ffea"/><file name="Collector.php" hash="f99413fe415c342d5c0d582caa767ad1"/><file name="Duty.php" hash="6ef16c8b2038d5c90b4b9c7d00825da2"/><file name="Tax.php" hash="62c9e255562643a967b8c49b9914524d"/></dir></dir></dir><dir name="Resource"><dir name="Api"><file name="Quote.php" hash="84d032b89c5df67ef24a112ad7846302"/></dir><dir name="Log"><file name="Collection.php" hash="7cb78be07207a599eff71c1e18ba0b7a"/></dir><file name="Log.php" hash="d14c2eb8314456a18adadbb52856e0b5"/><dir name="Mysql4"><file name="Setup.php" hash="9f9cf4b5934b70bd00b394beacb245f7"/></dir></dir><dir name="System"><dir name="Config"><dir name="Catalog"><file name="Mapping.php" hash="8895678aa59e49226509d2b4709c5f43"/></dir><dir name="Data"><dir name="Date"><file name="Monthday.php" hash="baec5b8a27c5b037529ba935aae0370a"/><file name="Weekday.php" hash="173edc075325d932f8dad6d4674b8153"/></dir><dir name="Time"><file name="Hour.php" hash="ddad98b85290d9b13ec9f65fbe8a10b3"/><file name="Minute.php" hash="4a76af0057d60e8ff0ff7fedc1d50575"/></dir></dir><file name="Guid.php" hash="311c7f8072f02a6be9e25b6411298c5c"/><dir name="Script"><file name="Js.php" hash="3e3f23b38ecdc361bf6ff6cee1871e92"/></dir><dir name="Source"><dir name="Catalog"><dir name="Mapping"><dir name="Configurable"><file name="Price.php" hash="f9116fd446914467e7fb31bed5a6dd0b"/></dir><file name="Mode.php" hash="36140a050ea65ff23d45264fa67e1a2b"/></dir><dir name="Product"><dir name="Attribute"><file name="Boolean.php" hash="ca1883122659f1b48890ecd46a1590ee"/></dir><file name="Attribute.php" hash="8ca9c929cda497400865751ffba991e6"/></dir></dir><dir name="Date"><file name="Weekday.php" hash="143c26f9661e5dc995ff064e333a2018"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="f1e414c08c43ebb2fcc6ccf5b41a2ff2"/></dir></dir><dir name="Tax"><file name="Mode.php" hash="fb09f17b54ef8ffa22580741cc66ac14"/></dir></dir></dir></dir><dir name="Tax"><dir name="Quote"><file name="Shipping.php" hash="5d76b072c657035cf3d7713fa6672f1f"/><file name="Subtotal.php" hash="cbd2e41f3bdc74134590a675d93d4bfb"/><file name="Tax.php" hash="ffc8d78a8d0442690c49b60f909c8e48"/></dir></dir></dir><dir name="sql"><dir name="iparcel_setup"><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4df6e3a3f2adf96eeb6ccdac213e3f1e"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="cfb9fbc137e7e551dfaece00ac6bb2f4"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="1f04c5c71a6a79aaf74810e87670d998"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="de1c9caa713dd194595aa2dd15a829ac"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ipcarthandoff.xml" hash="ed7faf180d54254f9bd4bfde21cdec1d"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir><dir name="template"><dir name="iparcel"><dir name="carthandoff"><file name="button.phtml" hash="2af5a49d42e702e723bc083c8af661e1"/><file name="estimate.phtml" hash="4613986760ea91bbfe607336008da870"/><dir name="form"><file name="button.phtml" hash="603683fdeb5153c8ce4649f72967180a"/></dir></dir><dir name="html"><dir name="head"><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/></dir></dir><dir name="post"><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/></dir><file name="post.phtml" hash="3827cab2dba981556aeb8ec915ab03cc"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iparcel.xml" hash="c6be54da5875c9356bba8988fa8c264c"/></dir><dir name="template"><dir name="iparcel"><dir name="order"><dir name="totals"><file name="duty.phtml" hash="7af41c6d47dafeb890a520d8e6e39910"/><file name="tax.phtml" hash="25bffd2b58554cf28e5f4abe4b4e1e7c"/></dir></dir><dir name="sync"><dir name="ajax"><file name="catalog.phtml" hash="64da446db5c1bfe892951c9b3c7f1e7d"/><file name="checkitems.phtml" hash="c19b0e4fd0feddedbc2cef3b2f4ce79b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="js"><dir name="iparcel"><file name="cart-buttons.js" hash="a52eb58ce49540c4d206f5e7bbd98ab8"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><dir name="adminhtml"><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><file name="ajaxSync.css" hash="c622b9e4b77589bc0f3c0555124d2751"/></dir></dir></dir></dir></dir></target></contents>
|
| 22 |
<compatible/>
|
| 23 |
<dependencies>
|
| 24 |
<required>
|
