Initial commit: is_shoppingcart out of the box. V3.0.1
This commit is contained in:
34
is_shoppingcart/views/templates/front/index.php
Normal file
34
is_shoppingcart/views/templates/front/index.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@ -0,0 +1,63 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="cart-products">
|
||||
<div class="cart-products__thumb">
|
||||
{images_block webpEnabled=$webpEnabled}
|
||||
<img {if $product.default_image}
|
||||
{generateImagesSources image=$product.default_image size='cart_default' lazyload=false} {else}
|
||||
src="{$urls.no_picture_image.bySize.cart_default.url}" {/if} alt="{$product.name|escape:'quotes'}"
|
||||
class="img-fluid rounded" width="{$product.default_image.bySize.cart_default.width}"
|
||||
height="{$product.default_image.bySize.cart_default.height}">
|
||||
{/images_block}
|
||||
</div>
|
||||
<div class="cart-products__desc">
|
||||
<p class="h6 mb-2 font-sm">
|
||||
{$product.name}
|
||||
</p>
|
||||
|
||||
<ul class="mb-2">
|
||||
<li class="text-muted small">
|
||||
<span>{l s='Quantity' d='Shop.Theme.Catalog'}:</span>
|
||||
<span class="font-weight-bold">{$product.quantity}</span>
|
||||
</li>
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<li class="text-muted small">
|
||||
<span>{$attribute}:</span>
|
||||
<span class="font-weight-bold">{$value}</span>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<span class="price price--sm">
|
||||
{$product.price}
|
||||
</span>
|
||||
</div>
|
||||
<div class="cart-products__remove">
|
||||
<a class="remove-from-cart text-danger" rel="nofollow" href="{$product.remove_from_cart_url}"
|
||||
data-link-action="delete-from-cart" data-id-product="{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute="{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization="{$product.id_customization|escape:'javascript'}">
|
||||
<span class="material-icons font-reset">
|
||||
delete
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
40
is_shoppingcart/views/templates/front/modal-base.tpl
Normal file
40
is_shoppingcart/views/templates/front/modal-base.tpl
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
{block name='blockcart_modal'}
|
||||
|
||||
<div class="modal fade" {block name='blockcart_modal_id'}{/block} tabindex="-1" aria-hidden="true">
|
||||
|
||||
<div class="modal-dialog">
|
||||
{block name='blockcart_modal_content'}
|
||||
<div class="modal-content">
|
||||
|
||||
{block name='blockcart_modal_header'}
|
||||
<div class="modal-header">
|
||||
{block name='blockcart_modal_title'}
|
||||
<h5 class="modal-title">{$smaty.block.child}</h5>
|
||||
{/block}
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='blockcart_modal_body' hide}
|
||||
<div class="modal-body">
|
||||
{$smarty.block.child}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='blockcart_modal_footer' hide}
|
||||
<div class="modal-footer">
|
||||
{$smarty.block.child}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
|
||||
64
is_shoppingcart/views/templates/front/modal-success.tpl
Normal file
64
is_shoppingcart/views/templates/front/modal-success.tpl
Normal file
@ -0,0 +1,64 @@
|
||||
{extends file='components/modal.tpl'}
|
||||
|
||||
{block name='modal_extra_attribues'}id="blockcart-modal"{/block}
|
||||
{block name='modal_title'}{l s='Product added to cart' d='Modules.Isshoppingcart.Modalsuccess'}{/block}
|
||||
|
||||
|
||||
{block name='modal_body'}
|
||||
|
||||
<div class="cart-products p-0 mb-4">
|
||||
<div class="cart-products__thumb">
|
||||
{images_block webpEnabled=$webpEnabled}
|
||||
<img
|
||||
class="img-fluid rounded"
|
||||
{generateImagesSources image=$product.default_image size='cart_default' lazyload=false}
|
||||
alt="{$product.cover.legend}"
|
||||
title="{$product.cover.legend}">
|
||||
{/images_block}
|
||||
</div>
|
||||
<div class="cart-products__desc">
|
||||
<p class="h6 mb-2 font-sm">
|
||||
{$product.name}
|
||||
</p>
|
||||
<div class="price price--sm">{$product.price}</div>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{if !empty($cart.subtotals.products.value)}
|
||||
<div class="cart-summary-line mb-2">
|
||||
<span class="label">{l s='Subtotal:' d='Modules.Isshoppingcart.Modalsuccess'}</span>
|
||||
<span class="value">{$cart.subtotals.products.value}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($cart.subtotals.shipping.value)}
|
||||
<div class="cart-summary-line mb-2">
|
||||
<span class="label">{l s='Shipping:' d='Modules.Isshoppingcart.Modalsuccess'}</span>
|
||||
<span class="value">{$cart.subtotals.shipping.value} {hook h='displayCheckoutSubtotalDetails' subtotal=$cart.subtotals.shipping}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled}
|
||||
<div class="cart-summary-line cart-total mb-2">
|
||||
<span class="label">{$cart.totals.total.label} {$cart.labels.tax_short}</span>
|
||||
<span class="value">{$cart.totals.total.value}</span>
|
||||
</div>
|
||||
<div class="cart-summary-line cart-total mb-0">
|
||||
<span class="label">{$cart.totals.total_including_tax.label}</span>
|
||||
<span class="value">{$cart.totals.total_including_tax.value}</span>
|
||||
</div>
|
||||
{else}
|
||||
<div class="cart-summary-line cart-total mb-0">
|
||||
<span class="label">{$cart.totals.total.label} {if $configuration.taxes_enabled}{$cart.labels.tax_short}{/if}</span>
|
||||
<span class="value">{$cart.totals.total.value}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name='modal_footer'}
|
||||
<a href="{$cart_url}" class="btn btn-primary btn-block">{l s='Proceed to checkout' d='Shop.Theme.Actions'}</a>
|
||||
<button type="button" class="btn btn-text btn-block" data-dismiss="modal">{l s='Continue shopping' d='Shop.Theme.Actions'}</button>
|
||||
{/block}
|
||||
3
is_shoppingcart/views/templates/front/modal.tpl
Normal file
3
is_shoppingcart/views/templates/front/modal.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
{if $product}
|
||||
{include file='module:is_shoppingcart/views/templates/front/modal-success.tpl'}
|
||||
{/if}
|
||||
Reference in New Issue
Block a user