Hi, I have added the Sale Block to the Mega Menu under the heading ALL PATTERNS and it sometimes shows items onsale and sometimes just show random items? I only want it to show sale items.
The block onsale is setup according to the kidsland doc.
{{block type="joomlart_jmproducts/list" name="mega.jmproducts.list" template="joomlart/jmproducts/oneproduct.phtml" quanlity="2" title=""}}
Is there something missing in the code to limit the items to OnSale items only?
Thanks
8 answers
You can do it by creating new category "sale" and set all products which you want to show on mega menu. To show it you just set ID for category like this
Code:
{{block type="joomlart_jmproducts/list" name="mega.jmproducts.list" template="joomlart/jmproducts/oneproduct.phtml" quanlity="2" title="" catsid="1"}}
Note: catsid="your category sale’s ID "
For your detail you can refer to documentation of JM products list here:
http://www.joomlart.com/documentatio…ct-list#config
Does not make a difference. I have another post where the catsid was not working for the Product Tabs and featured Products all were the same for each category (Tab). The tech said i had an old version of Jm ProductSlider extension. Could that be a similar problem here? Here is the post. http://www.joomlart.com/forums/showt…737#post446737 I have sent him the access info plus asked if this issue was the same. Thanks
You can PM me the FTP credentials of your site.
I will check further & resolve this issue for you.
I have sent you a PM. Please check it.
The issue of Sale items on your website was resolved.
Have a look & let me know if you need more helps.
I have the same problem
Can you please post solution once you find out
thanks
This issue occurs on your site because it’s using old version of Jm Products.
To resolve this issue, please open the file at: /app/code/local/joomlArt/JmProducts/Block/List.php
and find to the block code bellow:
PHP Code:
function addCategoryIdsFilter($products_collection){
$categories_to_filter = explode(",", $this->_config['catsid']);
$ctf = array();
foreach ($categories_to_filter as $k => $cat) {
$ctf[]['finset'] = $cat;
}
$products_collection->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
->addAttributeToFilter('category_id',array($ctf))->groupByAttribute('entity_id');
}
then replace it with block code bellow:
PHP Code:
public function addCategoryIdsFilter(&$collection)
{
$categoryIds = explode(",", $this->_config['catsid']);
if(count($categoryIds) == 1)
{
foreach ($categoryIds as $catId) {
$categoryModel = Mage::getModel('catalog/category')->load($catId);
$collection->addCategoryFilter($categoryModel); //category filter
}
}
else{
$ctf = array();
foreach ($categoryIds as $catId) {
$ctf[]['finset'] = $catId;
}
$collection->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
->addAttributeToFilter('category_id',array($ctf))->groupByAttribute('entity_id');
}
}
Let do it to resolve the issue of your site.
Thanks for fixing it for me. Working now.
Thanks for fixing this
This question is now closed