private function getOrderItemType($item)
{
$types = [1 => 'Rent', 2 => 'Buy', 0 => 'Tryon'];
$index = 0;
/** @var Vow_Rentals_Helper_Data $helper */
$helper = Mage::helper('vow_rentals');
$_options = $item->getProductOptionByCode('info_buyRequest');
$_override = array_key_exists('override_tryon', $_options) ? $_options['override_tryon'] : false;
if ($helper->isBuyoutOrderItem($item)) {
$index = max($index, 2);
} else if (($helper->isRentWithoutTryOnItem($item) || $helper->isRentWithTryOnItem($item)) && !$_override) {
$index = max($index, 1);
} else if ($helper->isTryonOrderItem($item)) {
$index = max($index, 0);
}
return $types[$index];
}
initJs: function () {
if (!Potato.Fraud.GoogleCharts._isJsInited) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.defer = true;
s.src = '//www.gstatic.com/charts/loader.js';
Event.observe(s, 'load', function () {
google.charts.load('41', {packages: ['corechart']});
Potato.Fraud.GoogleCharts._isJsLoaded = true;
});
document.getElementsByTagName('head')[0].appendChild(s);
Potato.Fraud.GoogleCharts._isJsInited = true;
}
}
{
"extension_url": "https://potatocommerce.com/checkout-address-autocomplete.html",
"title": "Checkout Address Autocomplete",
"last_version": "1.1.0",
"readme_url": "https://potatocommerce.com/checkout-address-autocomplete.html#documentation",
"review_url": "https://potatocommerce.com/checkout-address-autocomplete.html#reviews"
}