Version Notes
Release 0.1.5, Add Product quick View and update Qty
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Sinabs_Directcheckout |
| Version | 0.1.5 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.4 to 0.1.5
- app/code/community/Sinabs/Directcheckout/Block/Product/View.php +6 -0
- app/code/community/Sinabs/Directcheckout/Helper/Data.php +37 -0
- app/code/community/Sinabs/Directcheckout/controllers/AjaxController.php +42 -0
- app/code/community/Sinabs/Directcheckout/etc/config.xml +1 -1
- app/code/community/Sinabs/Directcheckout/etc/system.xml +29 -0
- app/design/frontend/default/default/layout/directcheckout.xml +3 -0
- app/design/frontend/default/default/template/directcheckout/checkout.phtml +1 -0
- app/design/frontend/default/default/template/directcheckout/checkout/summary.phtml +14 -3
- app/design/frontend/default/default/template/directcheckout/product/view.phtml +80 -0
- js/directcheckout/directcheckout.js +35 -0
- package.xml +6 -6
- skin/frontend/default/default/directcheckout/css/styles.css +16 -0
app/code/community/Sinabs/Directcheckout/Block/Product/View.php
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Sinabs_Directcheckout_Block_Product_View extends Mage_Core_Block_Template
|
| 4 |
+
{
|
| 5 |
+
|
| 6 |
+
}
|
app/code/community/Sinabs/Directcheckout/Helper/Data.php
CHANGED
|
@@ -25,8 +25,25 @@ class Sinabs_Directcheckout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 25 |
*/
|
| 26 |
const XML_PATH_CHECKOUT_OPTIONS_GUEST_CHECKOUT = 'checkout/options/guest_checkout';
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
const XML_PATH_DIRECTCHECKOUT_GENERAL_ENABLED = 'directcheckout/general/enabled';
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
/**
|
| 31 |
* Is Enabled
|
| 32 |
*
|
|
@@ -84,4 +101,24 @@ class Sinabs_Directcheckout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 84 |
{
|
| 85 |
return Mage::getStoreConfig(self::XML_PATH_CHECKOUT_OPTIONS_GUEST_CHECKOUT);
|
| 86 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
}
|
| 25 |
*/
|
| 26 |
const XML_PATH_CHECKOUT_OPTIONS_GUEST_CHECKOUT = 'checkout/options/guest_checkout';
|
| 27 |
|
| 28 |
+
/**
|
| 29 |
+
* XML path order enable Directcheckout
|
| 30 |
+
*
|
| 31 |
+
*/
|
| 32 |
const XML_PATH_DIRECTCHECKOUT_GENERAL_ENABLED = 'directcheckout/general/enabled';
|
| 33 |
|
| 34 |
+
/**
|
| 35 |
+
* XML path enable product quick view
|
| 36 |
+
*
|
| 37 |
+
*/
|
| 38 |
+
const XML_PATH_DIRECTCHECKOUT_OPTIONS_QUICKVIEW = 'directcheckout/options/quickview';
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* XML path enable update product qty
|
| 43 |
+
*
|
| 44 |
+
*/
|
| 45 |
+
const XML_PATH_DIRECTCHECKOUT_OPTIONS_UPDATE_QTY = 'directcheckout/options/update_qty';
|
| 46 |
+
|
| 47 |
/**
|
| 48 |
* Is Enabled
|
| 49 |
*
|
| 101 |
{
|
| 102 |
return Mage::getStoreConfig(self::XML_PATH_CHECKOUT_OPTIONS_GUEST_CHECKOUT);
|
| 103 |
}
|
| 104 |
+
|
| 105 |
+
/**
|
| 106 |
+
* Is Quickview Enable
|
| 107 |
+
*
|
| 108 |
+
* @return boolean
|
| 109 |
+
*/
|
| 110 |
+
public function isQuickviewEnabled()
|
| 111 |
+
{
|
| 112 |
+
return Mage::getStoreConfig(self::XML_PATH_DIRECTCHECKOUT_OPTIONS_QUICKVIEW);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
/**
|
| 116 |
+
* Is update product qty enabled
|
| 117 |
+
*
|
| 118 |
+
* @return boolean
|
| 119 |
+
*/
|
| 120 |
+
public function isUpdateQtyEnabled()
|
| 121 |
+
{
|
| 122 |
+
return Mage::getStoreConfig(self::XML_PATH_DIRECTCHECKOUT_OPTIONS_UPDATE_QTY);
|
| 123 |
+
}
|
| 124 |
}
|
app/code/community/Sinabs/Directcheckout/controllers/AjaxController.php
CHANGED
|
@@ -250,4 +250,46 @@ class Sinabs_Directcheckout_AjaxController extends Mage_Core_Controller_Front_Ac
|
|
| 250 |
return;
|
| 251 |
}
|
| 252 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
}
|
| 250 |
return;
|
| 251 |
}
|
| 252 |
}
|
| 253 |
+
|
| 254 |
+
/**
|
| 255 |
+
* Update product qty
|
| 256 |
+
*
|
| 257 |
+
* @return void
|
| 258 |
+
*/
|
| 259 |
+
public function update_qtyAction()
|
| 260 |
+
{
|
| 261 |
+
$response = array();
|
| 262 |
+
$qty = (int)$this->getRequest()->getParam('qty');
|
| 263 |
+
$itemId = (int)$this->getRequest()->getParam('itemId');
|
| 264 |
+
|
| 265 |
+
try {
|
| 266 |
+
$cart = $this->_getCart()->updateItem($itemId, array(
|
| 267 |
+
'qty' => $qty
|
| 268 |
+
));
|
| 269 |
+
$cart->save();
|
| 270 |
+
$response['success'] = true;
|
| 271 |
+
$this->getResponse()->setBody(Zend_Json::encode($response));
|
| 272 |
+
return;
|
| 273 |
+
} catch (Exception $e) {
|
| 274 |
+
$response['success'] = false;
|
| 275 |
+
$response['error'] = true;
|
| 276 |
+
$response['message'] = $e->getMessage();
|
| 277 |
+
$response['ddd'] = get_class($this->_getCart());
|
| 278 |
+
$this->getResponse()->setBody(Zend_Json::encode($response));
|
| 279 |
+
return;
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
/**
|
| 284 |
+
* Product view
|
| 285 |
+
*
|
| 286 |
+
* @return void
|
| 287 |
+
*/
|
| 288 |
+
public function product_viewAction()
|
| 289 |
+
{
|
| 290 |
+
$product = Mage::getModel('catalog/product')->load($this->getRequest()->getParam('id', false));
|
| 291 |
+
$this->loadLayout(false);
|
| 292 |
+
$this->getLayout()->getBlock('directcheckout.product')->setProduct($product);
|
| 293 |
+
$this->renderLayout();
|
| 294 |
+
}
|
| 295 |
}
|
app/code/community/Sinabs/Directcheckout/etc/config.xml
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
<config>
|
| 24 |
<modules>
|
| 25 |
<Sinabs_Directcheckout>
|
| 26 |
-
<version>0.1.
|
| 27 |
</Sinabs_Directcheckout>
|
| 28 |
</modules>
|
| 29 |
<global>
|
| 23 |
<config>
|
| 24 |
<modules>
|
| 25 |
<Sinabs_Directcheckout>
|
| 26 |
+
<version>0.1.5</version>
|
| 27 |
</Sinabs_Directcheckout>
|
| 28 |
</modules>
|
| 29 |
<global>
|
app/code/community/Sinabs/Directcheckout/etc/system.xml
CHANGED
|
@@ -92,6 +92,35 @@
|
|
| 92 |
</enable_coupon>
|
| 93 |
</fields>
|
| 94 |
</extra>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
</groups>
|
| 96 |
</directcheckout>
|
| 97 |
</sections>
|
| 92 |
</enable_coupon>
|
| 93 |
</fields>
|
| 94 |
</extra>
|
| 95 |
+
<options translate="label">
|
| 96 |
+
<label>Options</label>
|
| 97 |
+
<frontend_type>text</frontend_type>
|
| 98 |
+
<sort_order>30</sort_order>
|
| 99 |
+
<show_in_default>1</show_in_default>
|
| 100 |
+
<show_in_website>1</show_in_website>
|
| 101 |
+
<show_in_store>1</show_in_store>
|
| 102 |
+
<fields>
|
| 103 |
+
<quickview translate="label,comment">
|
| 104 |
+
<label>Show Quick View Product</label>
|
| 105 |
+
<comment><![CDATA[Add modalbox product link in order summary table.]]></comment>
|
| 106 |
+
<frontend_type>select</frontend_type>
|
| 107 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 108 |
+
<sort_order>10</sort_order>
|
| 109 |
+
<show_in_default>1</show_in_default>
|
| 110 |
+
<show_in_website>1</show_in_website>
|
| 111 |
+
<show_in_store>1</show_in_store>
|
| 112 |
+
</quickview>
|
| 113 |
+
<update_qty translate="label">
|
| 114 |
+
<label>Enable update product qty</label>
|
| 115 |
+
<frontend_type>select</frontend_type>
|
| 116 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 117 |
+
<sort_order>20</sort_order>
|
| 118 |
+
<show_in_default>1</show_in_default>
|
| 119 |
+
<show_in_website>1</show_in_website>
|
| 120 |
+
<show_in_store>1</show_in_store>
|
| 121 |
+
</update_qty>
|
| 122 |
+
</fields>
|
| 123 |
+
</options>
|
| 124 |
</groups>
|
| 125 |
</directcheckout>
|
| 126 |
</sections>
|
app/design/frontend/default/default/layout/directcheckout.xml
CHANGED
|
@@ -71,4 +71,7 @@
|
|
| 71 |
<directcheckout_index_gift>
|
| 72 |
<block type="simplebuying/checkout_gift" output="toHtml" name="gift.options" template="directcheckout/checkout/gift/options.phtml" />
|
| 73 |
</directcheckout_index_gift>
|
|
|
|
|
|
|
|
|
|
| 74 |
</layout>
|
| 71 |
<directcheckout_index_gift>
|
| 72 |
<block type="simplebuying/checkout_gift" output="toHtml" name="gift.options" template="directcheckout/checkout/gift/options.phtml" />
|
| 73 |
</directcheckout_index_gift>
|
| 74 |
+
<directcheckout_ajax_product_view>
|
| 75 |
+
<block type="core/template" output="toHtml" name="directcheckout.product" template="directcheckout/product/view.phtml" />
|
| 76 |
+
</directcheckout_ajax_product_view>
|
| 77 |
</layout>
|
app/design/frontend/default/default/template/directcheckout/checkout.phtml
CHANGED
|
@@ -84,6 +84,7 @@
|
|
| 84 |
var urlSaveOrder = '<?php echo $this->getUrl('directcheckout/ajax/save_order'); ?>';
|
| 85 |
var urlSpo = '<?php echo $this->getUrl('directcheckout/ajax/update_spo'); ?>';
|
| 86 |
var urlCoupon = '<?php echo $this->getUrl('directcheckout/ajax/update_coupon'); ?>';
|
|
|
|
| 87 |
var listRegionJson = <?php echo $this->helper('directory')->getRegionJson(); ?>;
|
| 88 |
|
| 89 |
document.observe('dom:loaded', function() {
|
| 84 |
var urlSaveOrder = '<?php echo $this->getUrl('directcheckout/ajax/save_order'); ?>';
|
| 85 |
var urlSpo = '<?php echo $this->getUrl('directcheckout/ajax/update_spo'); ?>';
|
| 86 |
var urlCoupon = '<?php echo $this->getUrl('directcheckout/ajax/update_coupon'); ?>';
|
| 87 |
+
var urlQty = '<?php echo $this->getUrl('directcheckout/ajax/update_qty'); ?>';
|
| 88 |
var listRegionJson = <?php echo $this->helper('directory')->getRegionJson(); ?>;
|
| 89 |
|
| 90 |
document.observe('dom:loaded', function() {
|
app/design/frontend/default/default/template/directcheckout/checkout/summary.phtml
CHANGED
|
@@ -34,9 +34,21 @@
|
|
| 34 |
</thead>
|
| 35 |
<?php foreach ($this->getItems() as $item) : ?>
|
| 36 |
<tr>
|
| 37 |
-
<td class="name"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
<td class="qty">
|
| 39 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
</td>
|
| 41 |
<td class="total">
|
| 42 |
<span class="price"><?php echo $this->helper('checkout')->formatPrice($item->getRowTotal()); ?></span>
|
|
@@ -44,7 +56,6 @@
|
|
| 44 |
</tr>
|
| 45 |
<?php endforeach; ?>
|
| 46 |
</table>
|
| 47 |
-
|
| 48 |
<table class="table table-striped">
|
| 49 |
<?php foreach ($this->getTotals() as $total) : ?>
|
| 50 |
<tr>
|
| 34 |
</thead>
|
| 35 |
<?php foreach ($this->getItems() as $item) : ?>
|
| 36 |
<tr>
|
| 37 |
+
<td class="name">
|
| 38 |
+
<?php if ($this->helper('directcheckout')->isQuickviewEnabled()) : ?>
|
| 39 |
+
<a href="<?php echo $this->getUrl('directcheckout/ajax/product_view', array('id' => $item->getProduct()->getId())); ?>" class="modalbox" title="<?php echo $item->getName(); ?>"><?php echo $item->getName(); ?></a>
|
| 40 |
+
<?php else : ?>
|
| 41 |
+
<?php echo $item->getName(); ?>
|
| 42 |
+
<?php endif; ?>
|
| 43 |
+
</td>
|
| 44 |
<td class="qty">
|
| 45 |
+
<?php if ($this->helper('directcheckout')->isUpdateQtyEnabled()) : ?>
|
| 46 |
+
<a href="#" class="directcheckout-button qty-delete" onclick="updateQty('<?php echo $item->getId(); ?>', '<?php echo ($item->getQty() - 1 != 0) ? $item->getQty() - 1 : 1; ?>'); return false;">-</a>
|
| 47 |
+
<span><?php echo $item->getQty(); ?></span>
|
| 48 |
+
<a href="#" class="directcheckout-button qty-add" onclick="updateQty('<?php echo $item->getId(); ?>', '<?php echo $item->getQty() + 1; ?>'); return false;">+</a>
|
| 49 |
+
<?php else : ?>
|
| 50 |
+
<span><?php echo $item->getQty(); ?></span>
|
| 51 |
+
<?php endif; ?>
|
| 52 |
</td>
|
| 53 |
<td class="total">
|
| 54 |
<span class="price"><?php echo $this->helper('checkout')->formatPrice($item->getRowTotal()); ?></span>
|
| 56 |
</tr>
|
| 57 |
<?php endforeach; ?>
|
| 58 |
</table>
|
|
|
|
| 59 |
<table class="table table-striped">
|
| 60 |
<?php foreach ($this->getTotals() as $total) : ?>
|
| 61 |
<tr>
|
app/design/frontend/default/default/template/directcheckout/product/view.phtml
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* DISCLAIMER
|
| 16 |
+
*
|
| 17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
+
* versions in the future. If you wish to customize Magento for your
|
| 19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package Sinabs_Directcheckout
|
| 23 |
+
* @copyright Copyright (c) 2014 Sinabs (http://www.sinabs.fr)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
<?php
|
| 28 |
+
$_product = $this->getProduct();
|
| 29 |
+
$_galleryImages = $_product->getMediaGalleryImages();
|
| 30 |
+
$_helper = $this->helper('catalog/output');
|
| 31 |
+
?>
|
| 32 |
+
<div id="directcheckout-product-view-wrapper">
|
| 33 |
+
<div class="directcheckout-product-title">
|
| 34 |
+
<h2><?php echo $_product->getName(); ?></h2>
|
| 35 |
+
</div>
|
| 36 |
+
<div class="directcheckout-product-medias">
|
| 37 |
+
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
| 38 |
+
<?php
|
| 39 |
+
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(200) . '" alt="' . $this->htmlEscape($this->getImageLabel()) . '" title="' . $this->htmlEscape($this->getImageLabel()) . '" />';
|
| 40 |
+
echo $_helper->productAttribute($_product, $_img, 'image');
|
| 41 |
+
?>
|
| 42 |
+
<?php endif; ?>
|
| 43 |
+
<?php if (count($_galleryImages) > 0): ?>
|
| 44 |
+
<div class="more-views">
|
| 45 |
+
<h2><?php echo $this->__('More Views') ?></h2>
|
| 46 |
+
<ul>
|
| 47 |
+
<?php foreach ($_galleryImages as $_image): ?>
|
| 48 |
+
<li>
|
| 49 |
+
<a href="javascript:;" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>">
|
| 50 |
+
<img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" data-src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(200); ?>"/>
|
| 51 |
+
</a>
|
| 52 |
+
</li>
|
| 53 |
+
<?php endforeach; ?>
|
| 54 |
+
</ul>
|
| 55 |
+
<script type="text/javascript">
|
| 56 |
+
updateProductImage();
|
| 57 |
+
</script>
|
| 58 |
+
</div>
|
| 59 |
+
<?php endif; ?>
|
| 60 |
+
</div>
|
| 61 |
+
<div class="directcheckout-product-description">
|
| 62 |
+
<?php if ($_product->getShortDescription()) : ?>
|
| 63 |
+
<div class="directcheckout-product-short">
|
| 64 |
+
<h2><?php echo $this->__('Quick Overview') ; ?></h2>
|
| 65 |
+
<p>
|
| 66 |
+
<?php echo $_product->getShortDescription(); ?>
|
| 67 |
+
</p>
|
| 68 |
+
</div>
|
| 69 |
+
<?php endif; ?>
|
| 70 |
+
<?php if ($_product->getDescription()) : ?>
|
| 71 |
+
<div class="directcheckout-product-long">
|
| 72 |
+
<h2><?php echo $this->__('Details'); ?></h2>
|
| 73 |
+
<p>
|
| 74 |
+
<?php echo $_product->getDescription(); ?>
|
| 75 |
+
</p>
|
| 76 |
+
</div>
|
| 77 |
+
<?php endif; ?>
|
| 78 |
+
</div>
|
| 79 |
+
<div class="spacer"></div>
|
| 80 |
+
</div>
|
js/directcheckout/directcheckout.js
CHANGED
|
@@ -307,4 +307,39 @@ function updateCouponCode(action) {
|
|
| 307 |
});
|
| 308 |
}
|
| 309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
}
|
| 307 |
});
|
| 308 |
}
|
| 309 |
}
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
// Replace image by thumbnail
|
| 313 |
+
function updateProductImage() {
|
| 314 |
+
var container = $$('.directcheckout-product-medias img')[0];
|
| 315 |
+
var images = $$('.more-views ul li a');
|
| 316 |
+
images.each(function(r, i) {
|
| 317 |
+
$(r).observe('click', function(e) {
|
| 318 |
+
var element = e.findElement('img');
|
| 319 |
+
var src = Element.readAttribute($(element), 'data-src');
|
| 320 |
+
container.setAttribute('src', src);
|
| 321 |
+
});
|
| 322 |
+
});
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
// Update Qty
|
| 326 |
+
function updateQty(itemId, qty) {
|
| 327 |
+
new Ajax.Request(urlQty, {
|
| 328 |
+
parameters: {
|
| 329 |
+
itemId: itemId,
|
| 330 |
+
qty: qty
|
| 331 |
+
},
|
| 332 |
+
onLoading: function() {
|
| 333 |
+
showLoader($('review_order'));
|
| 334 |
+
},
|
| 335 |
+
onSuccess: function(t) {
|
| 336 |
+
response = t.responseText.evalJSON();
|
| 337 |
+
if (response.success == true) {
|
| 338 |
+
updateSpo();
|
| 339 |
+
} else {
|
| 340 |
+
updateSpo();
|
| 341 |
+
Modalbox.show('<p>' + response.message + '</p>', {title:(response.title && typeof(response.title) == 'string') ? response.title : 'Error'});
|
| 342 |
+
}
|
| 343 |
+
}
|
| 344 |
+
});
|
| 345 |
}
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Sinabs_Directcheckout</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>Directcheckout Release 0.1.
|
| 10 |
<description>Increase your conversion rate through our one step checkout module.</description>
|
| 11 |
-
<notes>Release 0.1.
|
| 12 |
<authors><author><name>Sinabs</name><user>auto-converted</user><email>tech@sinabs.fr</email></author></authors>
|
| 13 |
-
<date>2014-01-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Sinabs"><dir name="Directcheckout"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Link.php" hash="e2c99a8ad1b2ff0c0e46779e8e781a38"/></dir><file name="Billing.php" hash="3566196fe02cfd6b6302a7c55dc0f4cb"/><file name="Coupon.php" hash="c3ece6a9e8c798034a964e06f021692c"/><file name="Gift.php" hash="bb9fb6d9e99f6e48f8e318ab15d92f27"/><file name="Links.php" hash="0e3348a234cccd82d04f33741b7914f3"/><file name="Newsletter.php" hash="ff4f476b8a62459ada10ada97b072876"/><file name="Shipping.php" hash="222ab5cb49fb254b0b798de4a69b9044"/></dir></dir><dir name="Helper"><file name="Address.php" hash="b8da94d8debe553a12a50368a153475c"/><file name="Data.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Sinabs_Directcheckout</name>
|
| 4 |
+
<version>0.1.5</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Directcheckout Release 0.1.5</summary>
|
| 10 |
<description>Increase your conversion rate through our one step checkout module.</description>
|
| 11 |
+
<notes>Release 0.1.5, Add Product quick View and update Qty</notes>
|
| 12 |
<authors><author><name>Sinabs</name><user>auto-converted</user><email>tech@sinabs.fr</email></author></authors>
|
| 13 |
+
<date>2014-01-27</date>
|
| 14 |
+
<time>14:43:20</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Sinabs"><dir name="Directcheckout"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Link.php" hash="e2c99a8ad1b2ff0c0e46779e8e781a38"/></dir><file name="Billing.php" hash="3566196fe02cfd6b6302a7c55dc0f4cb"/><file name="Coupon.php" hash="c3ece6a9e8c798034a964e06f021692c"/><file name="Gift.php" hash="bb9fb6d9e99f6e48f8e318ab15d92f27"/><file name="Links.php" hash="0e3348a234cccd82d04f33741b7914f3"/><file name="Newsletter.php" hash="ff4f476b8a62459ada10ada97b072876"/><file name="Shipping.php" hash="222ab5cb49fb254b0b798de4a69b9044"/></dir><dir name="Product"><file name="View.php" hash="0b4aa3a055111cd04cf114990844a0f1"/></dir></dir><dir name="Helper"><file name="Address.php" hash="b8da94d8debe553a12a50368a153475c"/><file name="Data.php" hash="7a39b2ba3b64b8d9bd2f1035984d7325"/><file name="Url.php" hash="d7f4da682505d1eed6c06d63458bdb24"/></dir><dir name="controllers"><dir name="Customer"><file name="AjaxController.php" hash="a29445ad4907034af82dbfc736991b0a"/></dir><file name="AjaxController.php" hash="d7e5a5de1f6179859a65e0a04759d818"/><file name="IndexController.php" hash="5e3bb2ef6a37f8d57275587e5fd8b684"/></dir><dir name="etc"><file name="config.xml" hash="33a75de263ab6acf0bf5af2970f1f6fb"/><file name="system.xml" hash="a10f7c3bd6a7a5a2eea72eccb365e508"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="directcheckout"><dir name="checkout"><dir name="additional"><file name="agreements.phtml" hash="d4a63588cb46492263fb1dc934b8b2aa"/><file name="coupon.phtml" hash="708dffbebd44559974e089674dfad28d"/><file name="newsletter.phtml" hash="909a0084e07a83827df47ae04f531ab6"/></dir><dir name="gift"><file name="options.phtml" hash="945c0f916729b864b879a6f5f4a0dad4"/></dir><dir name="payment"><file name="methods.phtml" hash="a764824070152cbfd8965f54de04fbef"/></dir><file name="additional.phtml" hash="0a99c4ce5270b4ec6b0991eb833e93dc"/><file name="billing.phtml" hash="38c0fd17d763e1b30b30067ff6685722"/><file name="gift.phtml" hash="d7ab7ceb3424149f7cb3dae9c00c22b6"/><file name="review.phtml" hash="b834c89a12e1ee5353f5286db796ef55"/><file name="shipping.phtml" hash="c26c65eb137e8cadde1471f90308b159"/><file name="shipping_method.phtml" hash="333b3a89be3454746fe0343f3eafea94"/><file name="spo.phtml" hash="8c17c38c710394e6378926ba8107bb22"/><file name="summary.phtml" hash="269fbd57c14fefdca8ab9115328f6c1c"/></dir><dir name="customer"><dir name="widget"><file name="name.phtml" hash="f87c560944d1dc2cc25be7adfaa9fe6f"/></dir><file name="forget.phtml" hash="a437f709a6e711668a2a2564be96a0ab"/><file name="login.phtml" hash="3585445d31384c5c88f65849ae4219c4"/></dir><dir name="product"><file name="view.phtml" hash="78f575d0c695f69646a38d9483428b44"/></dir><file name="checkout.phtml" hash="d41f857e67cfc3a175e05ff9d68c9762"/></dir></dir><dir name="layout"><file name="directcheckout.xml" hash="36ae51aa97cf91301db4e753bb15a6a3"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="directcheckout"><dir name="css"><file name="modal.css" hash="ff14481d15d473063ccbc1158867cf43"/><file name="styles.css" hash="3119e7f5648b6c2d5d38fbf98a7d3595"/></dir><dir name="images"><file name="button-loader.gif" hash="9a9cfbeae93874aa92295baf21ace29c"/><file name="directcheckout-step1.png" hash="fee760a1d5f3b0ea2b92afb78027a750"/><file name="directcheckout-step2.png" hash="b78af68848930f1be94ef4ed7afd9c9b"/><file name="directcheckout-step3.png" hash="59d0cdcad1de0cdf0141bcd2275f0bc8"/><file name="directcheckout-step4.png" hash="48060ab23605daa5dadd34be3eb35ae6"/><file name="directcheckout-stepfinal.png" hash="b03cf8ea88e987ceb42d966b234d7a1c"/><file name="line-gradient.gif" hash="bef9df2d426124dbe3d496407219190b"/><file name="spinner.gif" hash="add667817f25bce331a213ab3cc9621f"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="directcheckout"><file name="directcheckout.js" hash="4e3b727b73df2a946d42c282596006fb"/><file name="modal.js" hash="c3b77dc52bba63e273e21414df4f0f77"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Sinabs_Directcheckout.csv" hash="3dc933df9000e97269c9b8f420b177cc"/></dir><dir name="fr_FR"><file name="Sinabs_Directcheckout.csv" hash="61f101ff12ff3cc30363ab315c22fbf0"/></dir></target><target name="mageetc"><dir name="modules"><file name="Sinabs_Directcheckout.xml" hash="8dfc7b08d0b331930caf63b6963f0356"/></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
skin/frontend/default/default/directcheckout/css/styles.css
CHANGED
|
@@ -35,6 +35,11 @@
|
|
| 35 |
.phone-fax .fax input { width: 87%; }
|
| 36 |
.different-address { padding: 5px; margin-top: 10px; }
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
/* Agreements */
|
| 39 |
.agreement-content { text-align: left; }
|
| 40 |
|
|
@@ -52,6 +57,12 @@
|
|
| 52 |
.directcheckout-input { border: 1px solid #ececec; width: 100%; background: #fff; height: 22px; padding: 2px; }
|
| 53 |
.directcheckout-input input { border: none; height: 18px; width: 80%; }
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
/* Steps */
|
| 56 |
h3.step1 { height: 35px; background: url('../images/directcheckout-step1.png') no-repeat; padding-left: 29px; }
|
| 57 |
h3.step2 { height: 35px; background: url('../images/directcheckout-step2.png') no-repeat; padding-left: 29px; }
|
|
@@ -59,6 +70,11 @@ h3.step3 { height: 35px; background: url('../images/directcheckout-step3.png') n
|
|
| 59 |
h3.step4 { height: 35px; background: url('../images/directcheckout-step4.png') no-repeat; padding-left: 29px; }
|
| 60 |
h3.stepfinal { height: 35px; background: url('../images/directcheckout-stepfinal.png') no-repeat; padding-left: 29px; }
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
/* Tools */
|
| 63 |
.spacer { clear: both; }
|
| 64 |
.simple-loading-wrapper { width: 100%; height: 100%; }
|
| 35 |
.phone-fax .fax input { width: 87%; }
|
| 36 |
.different-address { padding: 5px; margin-top: 10px; }
|
| 37 |
|
| 38 |
+
/* Summary */
|
| 39 |
+
#review_order .qty { text-align: center; }
|
| 40 |
+
#review_order .qty span {padding: 5px; }
|
| 41 |
+
.qty-add, .qty-delete { width: 10px; }
|
| 42 |
+
|
| 43 |
/* Agreements */
|
| 44 |
.agreement-content { text-align: left; }
|
| 45 |
|
| 57 |
.directcheckout-input { border: 1px solid #ececec; width: 100%; background: #fff; height: 22px; padding: 2px; }
|
| 58 |
.directcheckout-input input { border: none; height: 18px; width: 80%; }
|
| 59 |
|
| 60 |
+
/* Product view */
|
| 61 |
+
#directcheckout-product-view-wrapper { }
|
| 62 |
+
.directcheckout-product-medias { float: left; width: 220px; }
|
| 63 |
+
.directcheckout-product-medias .more-views li a { float: left; margin-right: 5px; border: 2px solid #ddd; widht: 56px; height: 56px; overflow: hidden; }
|
| 64 |
+
.directcheckout-product-description {float:right; width: 260px; }
|
| 65 |
+
|
| 66 |
/* Steps */
|
| 67 |
h3.step1 { height: 35px; background: url('../images/directcheckout-step1.png') no-repeat; padding-left: 29px; }
|
| 68 |
h3.step2 { height: 35px; background: url('../images/directcheckout-step2.png') no-repeat; padding-left: 29px; }
|
| 70 |
h3.step4 { height: 35px; background: url('../images/directcheckout-step4.png') no-repeat; padding-left: 29px; }
|
| 71 |
h3.stepfinal { height: 35px; background: url('../images/directcheckout-stepfinal.png') no-repeat; padding-left: 29px; }
|
| 72 |
|
| 73 |
+
/* Direct checkout Button */
|
| 74 |
+
.directcheckout-button { -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; box-shadow:inset 0px 1px 0px 0px #ffffff; background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9)); background:-moz-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:-webkit-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:-o-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:-ms-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:linear-gradient(to bottom, #f9f9f9 5%, #e9e9e9 100%); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9',GradientType=0); background-color:#f9f9f9; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; border:1px solid #dcdcdc; display:inline-block; cursor:pointer; color:#666666; font-family:arial; font-size:11px; font-weight:bold; padding:1px 6px; text-decoration:none; text-shadow:0px 1px 0px #ffffff; height: 20px; }
|
| 75 |
+
.directcheckout-button:hover { background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9)); background:-moz-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:-webkit-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:-o-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:-ms-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:linear-gradient(to bottom, #e9e9e9 5%, #f9f9f9 100%); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9',GradientType=0); background-color:#e9e9e9; }
|
| 76 |
+
.directcheckout-button:active { position:relative; top:1px; }
|
| 77 |
+
|
| 78 |
/* Tools */
|
| 79 |
.spacer { clear: both; }
|
| 80 |
.simple-loading-wrapper { width: 100%; height: 100%; }
|
