linster Posted January 7, 2013 Share Posted January 7, 2013 (edited) Hi, I hope to get some help here. I have been trying to figure out what is going on with the Featured Products section (homefeatured module). It worked well for the 1.4 version (www.madanayoga.com) but did not work well in the new platform prestashop 1.5 (www.madanayoga.com/home) 1. There are products at the home or the catalog so there should be products appearing. 2. I am not able to generate a .htaccess file because the server does not support friendly URL. (will this affect the generation of the featured products section? 3. I tried using the default prestashop 1.5 homefeatured module and it doesn't work as well. 4. This is a theme that I have designed and all is working well except for this module. Coding for the themed homefeatured coding is this: <!-- MODULE Home Featured Products --> <div id="featured-products_block_center"> <h4>{l s='Featured Products' mod='homefeatured'}</h4> {if isset($products) AND $products} <div class="block_content"> <ul> {foreach from=$products item=product name=homeFeaturedProducts} <li class="ajax_block_product"> <a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.name|escape:html:'UTF-8'}" /></a> <h5><a class="product_link" href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:45:'...'|escape:'htmlall':'UTF-8'}</a></h5> <p class="product_desc"><a class="product_descr" href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:150:'…'}</a></p> <div> <span class="price">{if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}</span> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {/if} {* {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2} <a class="ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {/if} *}</div> </li> {/foreach} </ul> </div> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if} </div> <!-- /MODULE Home Featured Products --> Any help will be appreciated. Edited January 9, 2013 by linster (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted January 7, 2013 Share Posted January 7, 2013 The home Featured module does appear on the page but as if there are no products selected, you are sure that in the product enrty area you selected home as an additional category for the product. You can generate an .htaccess file without friendly URl's just don't enable friendly Url's. I see that there is a lot of code missing and changed I suggest you go back and start over as I think you broke the code. The 1.5 home featured works fine and has the benefit of having a dedicated CSS not found in previous versions. There is to much missing and changed in the code above to point out 1 specific thing. Link to comment Share on other sites More sharing options...
linster Posted January 7, 2013 Author Share Posted January 7, 2013 HI there, thank you for your reply. I get what you mean... I have checked. But I may be wrong at the Products section because I actually imported it from version 1.4, so the placements may be wrong, that's why it is not detecting the products. The featured products worked well in my demo online site. I will look into it again. Thanks! The home Featured module does appear on the page but as if there are no products selected, you are sure that in the product enrty area you selected home as an additional category for the product. You can generate an .htaccess file without friendly URl's just don't enable friendly Url's. I see that there is a lot of code missing and changed I suggest you go back and start over as I think you broke the code. The 1.5 home featured works fine and has the benefit of having a dedicated CSS not found in previous versions. There is to much missing and changed in the code above to point out 1 specific thing. Link to comment Share on other sites More sharing options...
tdr170 Posted January 7, 2013 Share Posted January 7, 2013 Just use the 1.5 version as there are a lot of code changes to 1.5 that may effect the final outcome. Link to comment Share on other sites More sharing options...
linster Posted January 9, 2013 Author Share Posted January 9, 2013 Hi all, I have solved the problem. After importing the products from version 1.4 via Cart2Cart, the products' structure took the hierachy of the previous version. So I need to shift the entire products to make sure it shows correct. Link to comment Share on other sites More sharing options...
Recommended Posts