Jump to content

roz

Members
  • Posts

    141
  • Joined

  • Last visited

Posts posted by roz

  1.  

    Hi,

     

    "No template found for module blockspecials" : you have to create a "blockspecials" folder in your theme/modules/ and create a "tab.tpl".

    {counter name=active_li assign=active_li}
    <li{if $active_li == 1} class="active"{/if}><a data-toggle="tab" href="#blockspecials" class="blockspecials">{l s='Specials' mod='blockspecials'}</a></li>

     

    hey weelh1! i received an email notification of your reply but i see nothing here? :) did you deleted it or something? :)

  2.  

    Hi,

     

    "No template found for module blockspecials" : you have to create a "blockspecials" folder in your theme/modules/ and create a "tab.tpl".

    {counter name=active_li assign=active_li}
    <li{if $active_li == 1} class="active"{/if}><a data-toggle="tab" href="#blockspecials" class="blockspecials">{l s='Specials' mod='blockspecials'}</a></li>

     

    hi weelh1! 

    thanks! i had the tab name sorted out. 

    now i think i only need to know how to display the products the way featured, and new arrivals are presented.

    any idea how? :) 

  3.  

    remove whole funciton:

     

    public function _cacheProducts()
    	{
    		if (!isset(BlockSpecials::$cache_products))
    		{
    			$category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
    			$nb = (int)Configuration::get('BLOCKSPECIALS_NB_CACHES');
    			BlockSpecials::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'position');
    		}
    
    		if (BlockSpecials::$cache_products === false || empty(BlockSpecials::$cache_products))
    			return false;
    	}
    

    change:

    return $this->display(__FILE__, 'blockspecials.tpl', (Configuration::get('BLOCKSPECIALS_NB_CACHES') ? $this->getCacheId('blockspecials|'.$random) : null));
    
    

    to:

     

    return $this->display(__FILE__, 'blockspecials.tpl');
    
    

    change:

     

    	public function hookDisplayHomeTab($params)
    	{
    		if (!$this->isCached('tab.tpl', $this->getCacheId('specialproducts-tab')))
    			$this->_cacheProducts();
    
    		return $this->display(__FILE__, 'tab.tpl', $this->getCacheId('specialproducts-tab'));
    	}
    

    to:

    	public function hookDisplayHomeTab($params)
    	{
    
    
    		return $this->display(__FILE__, 'tab.tpl');
    	}
    

    change:

    		return $this->display(__FILE__, 'blockspecials.tpl', (Configuration::get('BLOCKSPECIALS_NB_CACHES') ? $this->getCacheId('blockspecials|'.$random) : null));
    
    

    to:

    		return $this->display(__FILE__, 'blockspecials.tpl');
    
    

     

    hi Vekia! 

     

    okay i finally got rid of the error but this message is appearing on the tabs area 

    No template found for module blockspecials

    oxDsq.jpg

    and then this block appears below

     

    GbgB1.jpg

     

    what did i do wrong this time?  :D   :rolleyes:  sorry for the trouble   :rolleyes:

  4. I see. Sorry I exchanged attributes for features. You must patch code as well as PDF template to display features.

     

    See HOW TO article for M4PDF at http://www.prestashop.com/forums/topic/270613-module-m4-pdf-extensions-with-online-editor/page-6?do=findComment&comment=1668332

     

    hey tuk66!

    i added the code in the invoice.tpl file and i get this error..

    Fatal error: Cannot use object of type Order as array in /var/www/prestaPOL/cache/smarty/compile/0a/91/88/0a91888840fb207b1dfcd292f779d2279e109643.file.invoice.tpl.php on line 272
    

    and this is where i injected the code..

    <!-- PRODUCTS -->
    				{foreach $order_details as $order_detail}
    				{cycle values='#FFF,#DDD' assign=bgcolor}
    				{assign var="features" value=Product::getFrontFeaturesStatic($conf.pdf_id_lang, $order[orders].order_detail[detail].product_id)}
    				{* {$features|@debug_print_var} *}
    				{section name=feature loop=$features}
    				    {* use the first or second style *}
    				    {$features[feature].value}{if !$smarty.section.feature.last} x {/if}
    				    {* {$features[feature].name}: {$features[feature].value}{if !$smarty.section.feature.last}, {/if} *}
    				{/section}
    				<tr style="line-height:4px;background-color:{$bgcolor};">
    					<td style="text-align: left; width: {if !$tax_excluded_display}75%{else}71%{/if}" colspan=2>{$order_detail.product_name}</td>
    					<!--<td style="text-align: left; width: {if !$tax_excluded_display}61%{else}71%{/if}">{$order_detail.product_name}{if isset($order_detail.product_reference) && !empty($order_detail.product_reference)} ({l s='SKU:' pdf='true'} {$order_detail.product_reference}){/if}</td>-->
    					<td style="text-align: right; width: 10%; white-space: nowrap;">
    					{if $tax_excluded_display}
    						{displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl}
    					{else}
    						{displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl}
    					{/if}
    					</td>
    					<td style="text-align: center; width: 5%">{$order_detail.product_quantity}</td>
    					<td style="text-align: right;  width: {if !$tax_excluded_display}10%{else}20%{/if}; white-space: nowrap;">
    					{if $tax_excluded_display}
    						{displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_excl}
    					{else}
    						{displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_incl}
    					{/if}
    					</td>
    				</tr>
    
  5. Product features should be combined and stored in the order. Or I'm wrong or you want it otherwise. How exactly?

     

    hi tuk66!

    what do you mean by combined and stored in the order? :)

    but what i meant is, see image below. 

    vRNkj.jpg

    the weight and pack size, i want them to include at the end of the product description in Invoice and Delivery Slip pdf. i want it to show like

     

    "TRIPLE-M GIANT SHEET SEAWEED (ORIGINAL) 6Gx10S"

  6.  

    hi Nemo1! i wanted to follow your tutorial with adding a field in Customer fields. however, i'm not quite sure what to change in identity.tpl and authentication.tpl, as well as order-opc-new-account.tpl

     

    a little help will be very much appreciated :)

    thank you

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More