Version Notes
Stable release
Download this release
Release Info
| Developer | Développeurs EnvoiMoinsCher.com |
| Extension | orange_latestproducts |
| Version | 0.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.0 to 0.1.1
- app/code/community/Orange/LatestProducts/Model/Latestproducts.php +12 -0
- app/code/community/Orange/LatestProducts/etc/config.xml +5 -3
- app/code/community/Orange/LatestProducts/etc/system.xml +18 -0
- app/design/frontend/base/default/layout/orange_latestproducts.xml +2 -2
- app/design/frontend/base/default/template/orange/latestproducts/latestproducts.phtml +4 -2
- package.xml +4 -4
app/code/community/Orange/LatestProducts/Model/Latestproducts.php
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
class Orange_Latestproducts_Model_Latestproducts extends Mage_Core_Model_Abstract
|
| 3 |
{
|
| 4 |
function getStoreData($item)
|
|
@@ -21,6 +25,14 @@ class Orange_Latestproducts_Model_Latestproducts extends Mage_Core_Model_Abstrac
|
|
| 21 |
{
|
| 22 |
return $this->getStoreData('addtocart');
|
| 23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
public function data()
|
| 25 |
{
|
| 26 |
$_limit = $this->getStoreData('display_products');
|
| 1 |
<?php
|
| 2 |
+
/*
|
| 3 |
+
author: SB
|
| 4 |
+
support: mage.ext@gmail.com
|
| 5 |
+
*/
|
| 6 |
class Orange_Latestproducts_Model_Latestproducts extends Mage_Core_Model_Abstract
|
| 7 |
{
|
| 8 |
function getStoreData($item)
|
| 25 |
{
|
| 26 |
return $this->getStoreData('addtocart');
|
| 27 |
}
|
| 28 |
+
public function wishlistLink()
|
| 29 |
+
{
|
| 30 |
+
return $this->getStoreData('wishlist_link');
|
| 31 |
+
}
|
| 32 |
+
public function compareLink()
|
| 33 |
+
{
|
| 34 |
+
return $this->getStoreData('compare_link');
|
| 35 |
+
}
|
| 36 |
public function data()
|
| 37 |
{
|
| 38 |
$_limit = $this->getStoreData('display_products');
|
app/code/community/Orange/LatestProducts/etc/config.xml
CHANGED
|
@@ -2,15 +2,15 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Orange_LatestProducts>
|
| 5 |
-
<version>0.1.
|
| 6 |
</Orange_LatestProducts>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 9 |
<layout>
|
| 10 |
<updates>
|
| 11 |
-
<
|
| 12 |
<file>orange_latestproducts.xml</file>
|
| 13 |
-
</
|
| 14 |
</updates>
|
| 15 |
</layout>
|
| 16 |
</frontend>
|
|
@@ -48,6 +48,8 @@
|
|
| 48 |
<block_title>Latest Products</block_title>
|
| 49 |
<display_products>3</display_products>
|
| 50 |
<addtocart>1</addtocart>
|
|
|
|
|
|
|
| 51 |
</settings>
|
| 52 |
</orange_latestproducts>
|
| 53 |
</default>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Orange_LatestProducts>
|
| 5 |
+
<version>0.1.1</version>
|
| 6 |
</Orange_LatestProducts>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 9 |
<layout>
|
| 10 |
<updates>
|
| 11 |
+
<orange_latestproducts>
|
| 12 |
<file>orange_latestproducts.xml</file>
|
| 13 |
+
</orange_latestproducts>
|
| 14 |
</updates>
|
| 15 |
</layout>
|
| 16 |
</frontend>
|
| 48 |
<block_title>Latest Products</block_title>
|
| 49 |
<display_products>3</display_products>
|
| 50 |
<addtocart>1</addtocart>
|
| 51 |
+
<wishlist_link>1</wishlist_link>
|
| 52 |
+
<compare_link>1</compare_link>
|
| 53 |
</settings>
|
| 54 |
</orange_latestproducts>
|
| 55 |
</default>
|
app/code/community/Orange/LatestProducts/etc/system.xml
CHANGED
|
@@ -73,6 +73,24 @@
|
|
| 73 |
<show_in_website>1</show_in_website>
|
| 74 |
<show_in_store>1</show_in_store>
|
| 75 |
</addtocart>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
</fields>
|
| 77 |
</settings>
|
| 78 |
</groups>
|
| 73 |
<show_in_website>1</show_in_website>
|
| 74 |
<show_in_store>1</show_in_store>
|
| 75 |
</addtocart>
|
| 76 |
+
<wishlist_link translate="label">
|
| 77 |
+
<label>Wishlist link</label>
|
| 78 |
+
<frontend_type>select</frontend_type>
|
| 79 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 80 |
+
<sort_order>6</sort_order>
|
| 81 |
+
<show_in_default>1</show_in_default>
|
| 82 |
+
<show_in_website>1</show_in_website>
|
| 83 |
+
<show_in_store>1</show_in_store>
|
| 84 |
+
</wishlist_link>
|
| 85 |
+
<compare_link translate="label">
|
| 86 |
+
<label>Compare link</label>
|
| 87 |
+
<frontend_type>select</frontend_type>
|
| 88 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 89 |
+
<sort_order>7</sort_order>
|
| 90 |
+
<show_in_default>1</show_in_default>
|
| 91 |
+
<show_in_website>1</show_in_website>
|
| 92 |
+
<show_in_store>1</show_in_store>
|
| 93 |
+
</compare_link>
|
| 94 |
</fields>
|
| 95 |
</settings>
|
| 96 |
</groups>
|
app/design/frontend/base/default/layout/orange_latestproducts.xml
CHANGED
|
@@ -2,10 +2,10 @@
|
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<default>
|
| 4 |
<reference name="right">
|
| 5 |
-
<block type="catalog/product_send" name="
|
| 6 |
</reference>
|
| 7 |
<reference name="left">
|
| 8 |
-
<block type="catalog/product_send" name="
|
| 9 |
</reference>
|
| 10 |
</default>
|
| 11 |
</layout>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<default>
|
| 4 |
<reference name="right">
|
| 5 |
+
<block type="catalog/product_send" name="orange_latestproducts" template="orange/latestproducts/latestproducts.phtml"/>
|
| 6 |
</reference>
|
| 7 |
<reference name="left">
|
| 8 |
+
<block type="catalog/product_send" name="orange_latestproducts" template="orange/latestproducts/latestproducts.phtml"/>
|
| 9 |
</reference>
|
| 10 |
</default>
|
| 11 |
</layout>
|
app/design/frontend/base/default/template/orange/latestproducts/latestproducts.phtml
CHANGED
|
@@ -29,14 +29,16 @@
|
|
| 29 |
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
| 30 |
<?php endif; ?>
|
| 31 |
<?php endif ?>
|
|
|
|
| 32 |
<ul class="add-to-links">
|
| 33 |
-
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 34 |
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 35 |
<?php endif; ?>
|
| 36 |
-
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
| 37 |
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
| 38 |
<?php endif; ?>
|
| 39 |
</ul>
|
|
|
|
| 40 |
</div>
|
| 41 |
</div>
|
| 42 |
</li>
|
| 29 |
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
| 30 |
<?php endif; ?>
|
| 31 |
<?php endif ?>
|
| 32 |
+
<?php if($_latestproducts->wishlistLink() || $_latestproducts->compareLink()): ?>
|
| 33 |
<ul class="add-to-links">
|
| 34 |
+
<?php if ($this->helper('wishlist')->isAllow() && $_latestproducts->wishlistLink()) : ?>
|
| 35 |
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 36 |
<?php endif; ?>
|
| 37 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product) && $_latestproducts->compareLink()): ?>
|
| 38 |
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
| 39 |
<?php endif; ?>
|
| 40 |
</ul>
|
| 41 |
+
<?php endif ?>
|
| 42 |
</div>
|
| 43 |
</div>
|
| 44 |
</li>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>orange_latestproducts</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>Magento Latest products module automatically generates the list of your latest products.</description>
|
| 11 |
<notes>Stable release</notes>
|
| 12 |
<authors><author><name>Mage</name><user>Dev</user><email>mage.ext@gmail.com</email></author></authors>
|
| 13 |
-
<date>2013-01-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Orange"><dir name="LatestProducts"><dir name="Model"><file name="Latestproducts.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>orange_latestproducts</name>
|
| 4 |
+
<version>0.1.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>Magento Latest products module automatically generates the list of your latest products.</description>
|
| 11 |
<notes>Stable release</notes>
|
| 12 |
<authors><author><name>Mage</name><user>Dev</user><email>mage.ext@gmail.com</email></author></authors>
|
| 13 |
+
<date>2013-01-15</date>
|
| 14 |
+
<time>19:27:12</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Orange"><dir name="LatestProducts"><dir name="Model"><file name="Latestproducts.php" hash="5a38b5dc4078f13a192071941c591e9c"/></dir><dir name="etc"><file name="config.xml" hash="6698c6700337a46df220bc622bb4b7c0"/><file name="system.xml" hash="bbdd39f26f786cd51fca86d2efb200c1"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="orange"><dir name="latestproducts"><file name="latestproducts.phtml" hash="de17b89a12efccfaa81976ee3a634dc7"/></dir></dir></dir><dir name="layout"><file name="orange_latestproducts.xml" hash="ff69f36dc0a06e473e771d53b0ee10d8"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orange_LatestProducts.xml" hash="58322bbf143b1edf902a0b444f59da28"/></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
