Jump to content

how to add ..?


Recommended Posts

Go to modules > modules and search for editorial module, open module configuration page.

then in code editor paste this: 

<img src="http://i.imgur.com/AFZOtMg.png"/>

image that you attached will appear on homepage.

 

 

can you specify what you expect?

Link to comment
Share on other sites

Go to modules > modules and search for editorial module, open module configuration page.

then in code editor paste this: 

<img src="http://i.imgur.com/AFZOtMg.png"/>

image that you attached will appear on homepage.

 

 

can you specify what you expect?

i mean how to make page(1,2,3) i dont know how call in english that

Link to comment
Share on other sites

so you mean that you want pagination there? unfortuantely it's not possible by default.

the only way to achieve it is modification.

1) modification of controllers

2) modification of module that you want to extend (you talking about home featured module right?)

Link to comment
Share on other sites

so you mean that you want pagination there? unfortuantely it's not possible by default.

the only way to achieve it is modification.

1) modification of controllers

2) modification of module that you want to extend (you talking about home featured module right?)

yes ..

Link to comment
Share on other sites

2) i haven't got any guide related to that (in fact it's complicated and i don't think that someone will do it for free)

1) check this: category page as homepage - with this guide you can define category page as homepage, it means that your homepage will looks like "home" category page view

modify index.php in root:

 

<?phpinclude(dirname(__FILE__).'/config/config.inc.php');if(intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) $rewrited_url = __PS_BASE_URI__;include(dirname(__FILE__).'/header.php');$smarty->assign('HOOK_HOME', Module::hookExec('home'));$smarty->display(_PS_THEME_DIR_.'index.tpl');include(dirname(__FILE__).'/homefeaturedto.php');include(dirname(__FILE__).'/footer.php');?>

 

Create homefeaturedto.php in the root

<?phpinclude(dirname(__FILE__).'/product-sort.php'); $category = new Category(1); $nbProducts = $category->getProducts(NULL, NULL, NULL, $orderBy, $orderWay, true); include(dirname(__FILE__).'/pagination.php'); $smarty->assign('nb_products', $nbProducts); $cat_products = $category->getProducts(intval($cookie->id_lang), intval($p), intval($n), $orderBy, $orderWay); $smarty->assign(array( 'products' => (isset($cat_products) AND $cat_products) ? $cat_products : NULL, 'id_category' => intval($category->id), 'id_category_parent' => intval($category->id_parent), 'return_category_name' => Tools::safeOutput(Category::hideCategoryPosition($category->name)), 'path' => Tools::getPath(intval($category->id), $category->name) )); $smarty->display(_PS_THEME_DIR_.'homefeaturedto.tpl');?>

 

create homefeaturedto.tpl in your themes:

<!-- MODULE Home Featured Products --><div id="featured-products_block_center" class="block products_block"> <h4>{l s='New arrivals'}</h4> {if isset($products) AND $products} <div class="block_content"> {assign var='liHeight' value=342} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} <ul style="height:{$ulHeight}px;"> {foreach from=$products item=product name=homeFeaturedProducts} <li class="ajax_block_product {if $smarty.foreach.homeFeaturedProducts.first}first_item{elseif $smarty.foreach.homeFeaturedProducts.last}last_item{else}item{/if} {if $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 1}clear{/if} {if $smarty.foreach.homeFeaturedProducts.iteration > ($smarty.foreach.homeFeaturedProducts.total - ($smarty.foreach.homeFeaturedProducts.total % $nbItemsPerLine))}last_line{/if}"> <h5><a href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}</a></h5> <p class="product_desc"><a href="{$product.link}" title="{l s='More'}">{$product.description_short|strip_tags|truncate:130:'...'}</a></p> <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img >getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" /></a> <div> <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> <a class="button" href="{$product.link}" title="{l s='View'}">{l s='View'}</a> {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$base_dir}cart.php?qty=1&id;_product={$product.id_product}&token;={$static_token}&add;" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} </div> </li> {/foreach} </ul> </div> {else} <p>{l s='No new arrivals'}</p> {/if} <!-- Pagination --> {if $products} {include file=$tpl_dir./pagination.tpl} {/if}</div><!-- /MODULE Home Featured Products -->

 

will work that ?

Link to comment
Share on other sites

×
×
  • Create New...