Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add design and html for the productscategory PrestaShop module
- Loading branch information
Showing
4 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
themes/simpleresponsivetheme/css/modules/productscategory/index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/* | ||
* 2007-2012 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (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: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* 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 http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <contact@prestashop.com> | ||
* @copyright 2007-2012 PrestaShop SA | ||
* @version Release: $Revision: 6844 $ | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*/ | ||
|
||
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; |
34 changes: 34 additions & 0 deletions
34
themes/simpleresponsivetheme/css/modules/productscategory/productscategory.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
h2.productscategory_h2 { | ||
margin: 40px 0 15px 0; | ||
padding:10px 0; | ||
border-bottom:1px solid #ccc; | ||
font-size:18px; | ||
color:#333 | ||
} | ||
|
||
#productscategory {overflow:auto} | ||
|
||
#productscategory_list { | ||
overflow: hidden; | ||
} | ||
#productscategory_list li a.lnk_img {display:block} | ||
#productscategory_list li a img { | ||
border: #D0D1D5 solid 1px; | ||
box-shadow: 2px 2px 5px #CECCCC; | ||
-webkit-box-shadow: 2px 2px 5px #CECCCC; | ||
-moz-box-shadow: 2px 2px 5px #CECCCC; | ||
padding: 5px; | ||
} | ||
#productscategory_list li p.product_name {text-align:center} | ||
|
||
#productscategory_scroll_left, #productscategory_scroll_right { | ||
background: url('img/thumbs_left.gif') no-repeat center; | ||
text-indent: -3000px; | ||
display: block; | ||
width: 9px; | ||
height: 18px; | ||
float: left; | ||
margin-top: 30px; | ||
} | ||
|
||
#productscategory_scroll_right { background-image: url('img/thumbs_right.gif'); } |
37 changes: 37 additions & 0 deletions
37
themes/simpleresponsivetheme/modules/productscategory/index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/* | ||
* 2007-2012 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (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: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* 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 http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <contact@prestashop.com> | ||
* @copyright 2007-2012 PrestaShop SA | ||
* @version Release: $Revision: 6844 $ | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*/ | ||
|
||
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; | ||
?> |
59 changes: 59 additions & 0 deletions
59
themes/simpleresponsivetheme/modules/productscategory/productscategory.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{* | ||
* 2007-2012 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (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: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* 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 http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <contact@prestashop.com> | ||
* @copyright 2007-2012 PrestaShop SA | ||
* @version Release: $Revision: 8337 $ | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*} | ||
|
||
{if count($categoryProducts) > 0 && $categoryProducts !== false} | ||
<div class="clearfix blockproductscategory"> | ||
<h2 class="productscategory_h2">{$categoryProducts|@count} {l s='other products in the same category:' mod='productscategory'}</h2> | ||
<div id="{if count($categoryProducts) > 5}productscategory{else}productscategory_noscroll{/if}"> | ||
{if count($categoryProducts) > 5}<a id="productscategory_scroll_left" title="{l s='Previous' mod='productscategory'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='productscategory'}</a>{/if} | ||
<div id="productscategory_list"> | ||
<ul class="block-grid ten-up mobile-two-up"> | ||
{foreach from=$categoryProducts item='categoryProduct' name=categoryProduct} | ||
<li> | ||
<a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)}" class="lnk_img align_center" title="{$categoryProduct.name|htmlspecialchars}"> | ||
<img src="{$link->getImageLink($categoryProduct.link_rewrite, $categoryProduct.id_image, 'home_default')}" alt="{$categoryProduct.name|htmlspecialchars}" /> | ||
</a> | ||
<p class="product_name"> | ||
<a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)}" title="{$categoryProduct.name|htmlspecialchars}">{$categoryProduct.name|truncate:14:'...'|escape:'htmlall':'UTF-8'}</a> | ||
</p> | ||
{if $ProdDisplayPrice AND $categoryProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} | ||
<p class="price_display align_center"> | ||
<span class="price">{convertPrice price=$categoryProduct.displayed_price}</span> | ||
</p> | ||
{else} | ||
<br /> | ||
{/if} | ||
</li> | ||
{/foreach} | ||
</ul> | ||
</div> | ||
{if count($categoryProducts) > 5}<a id="productscategory_scroll_right" title="{l s='Next' mod='productscategory'}" href="javascript:{ldelim}{rdelim}">{l s='Next' mod='productscategory'}</a>{/if} | ||
</div> | ||
<script type="text/javascript"> | ||
$('#productscategory_list').trigger('goto', [{$middlePosition}-3]); | ||
</script> | ||
</div> | ||
{/if} |