wyświetlenie ikony producenta na podstroniw produktu, prestachop

 <!--BASIA wyświetlenie producenta--!>
 {assign var="manpic" value="img/m/{$product_manufacturer->id_manufacturer}.jpg"}
 {if file_exists($manpic)}
 <div class="product_manufacturer" style="margin-bottom:15px;">
 <a href="{$link->getManufacturerLink($product->id_manufacturer)}" title="{l s='View all products'}"> 
 <img src="{$content_dir}img/m/{$product_manufacturer->id_manufacturer}.jpg" style="height:40px;"/></a>
 {/if}

Kod konwersji e-commerce prestashop 1.6. gdzie dodać

https://www.prestashop.com/forums/topic/253582-google-adwords-conversion-tracking-code-placement/page-2

Why did you set up google_conversion_value to 0 ?

Google’s suggested php implementation looks like this:

<!-- Kod Google na stronę konwersji zakupowej -->
	 type="text/javascript">
	/* 
	var google_conversion_id = 1234567890;
	var google_conversion_language = "pl_PL";
	var google_conversion_format = "1";
	var google_conversion_color = "666666";
	var google_conversion_label = "xxx-XXx1xXXX123X1xX";
	var google_conversion_value = 10;                                 //strike through!
	if ( echo $totalValue ?>) {                                     //bold!
		var google_conversion_value =  echo $totalValue ?>      //bold!
		var google_conversion_currency =  echo $currency ?>     //bold!
	}                                                                 //bold!
	var google_conversion_currency = "PLN";                           //strike through!
	/* ]]> */ 
	
	 type="text/javascript"
	src="//www.googleadservices.com/pagead/conversion.js">
	
	<noscript>
	<img height=1 width=1 border=0
	src="//www.googleadservices.com/pagead/
	conversion/1234567890/?value=
	<? echo $totalValue ?>&conversion_currency=<? echo $currency ?>
	&label=Zakup&script=0">
	</noscript>
	</body>

but everyone should base on code given to them by google adwords, and then cut out lines which are struck through, and implement proper variables in places which are bold.

EDIT: Sorry, I realised that strike-through and bold formatting doesn’t work inside code field. It is hard to repair this, so i commented lines :<<

 

On prestashop 1.6 modifications should look like this (for example; works for me):

 

1. In controllers/front/OrderConfirmationController find:

public function initContent()
	{
		parent::initContent();

		$this->context->smarty->assign(array(
			'is_guest' => $this->context->customer->is_guest,
			'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(),
			'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn()
		));

and change to:

public function initContent()
	{
		parent::initContent();

        $order = new Order($this->id_order);
        $currency = new Currency($order->id_currency);

		$this->context->smarty->assign(array(
			'is_guest' => $this->context->customer->is_guest,
			'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(),
			'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn(),
                        'name_of_cart_value_variable' => $order->getOrdersTotalPaid(),   // name_of_cart_value_variable
                        'name_of_currency_variable' => $currency->sign                   // name_of_currency_variable
		));

2. Then navigate to themes/YOUR_THEME/order-confirmation.tpl, and after the last {/if} add:

 type="text/javascript">
    /* 
    {literal}
    var google_conversion_id = 1234567890;     //your conversion id given by google!
    var google_conversion_language = "pl_PL";  //for example. You could put your language sign, or create another variable responsible for this.
    var google_conversion_format = "1";        //for example
    var google_conversion_color = "666666";    //example as well
    var google_conversion_label = "xxx-XXx1xXXX123X1xX"; //your label given by google!
    if ( {/literal}{$name_of_cart_value_variable}{literal} ) {
        var google_conversion_value =  "{/literal}{$name_of_cart_value_variable}{literal}"
        var google_conversion_currency =  "{/literal}{$name_of_currency_variable}{literal}"
    }                                          //careful in above lines 
    var google_remarketing_only = false;       //for example
    {/literal}
    /* ]]> */

 type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">

<noscript>
    
style=display:inline;> height=„1” width=„1” style=borderstyle:none; alt=„” src=„//www.googleadservices.com/pagead/conversion/953948678/?value={$name_of_cart_value_variable}&conversion_currency={$name_of_currency_variable}&label=Zakup&script=0”/> //the last two variables here

 


</noscript>

You could customize other values send to google adwords, then you should retrieve them in controller. You got the vibe.

 

EDIT: Sorry for poor formatting, it’s hard to get rid of code blocks once they had been added.

Warunki prestashop, smarty

{if $page_name ==’index’ || $page_name ==’category’}
{if $lang_iso == en }
<div class=”banner”>
<div class=”container”>
<div class=”row”>
{hook h=”displayBanner”}
</div>
</div>
</div>
{else}
<div id=”slider_row” class=”row”>
<div id=”top_column” class=”center_column col-xs-12 col-sm-12″>{hook h=”displayTopColumn”}</div>
</div>
{/if}
{/if}

Pretashop zmiana pozycji modułu po komunikacie ‚This module cannot be transplanted to this hook.’

Pobrane ze strony http://docs.promokit.eu/doku.php/prestashophelp:hookmodule

Hook module to another position

If you want to add/move the module to another position but see the message ‚This module cannot be transplanted to this hook.’ you can modificate the module and add it to the position you need.
1) Back-office>Modules>Positions
Find the hook of the module that you need to move. Example:
displayHome
displayFooter
displayTop

2) Copy the name of the hook where the module is located.
Remember! displayHeader is a system hook(for scripts and css). Don’t copy it
3) Go to the module folder your_site/modules/some_module
and there in the end of the file some_module.php before the last ‚}’ paste the code:

public function hookTargetHook($params) {
   return $this->hookSourceHook('targetHook');
}

hook – system name. It should be always there
targetHook – Hook where you want to move the module.
sourceHook – The module hook where it’s located by default.


Here is an example (block newsletter to the footer) of how you can do that:

With this help http://englove.blogspot.com/2012/01/prestashop-this-module-cannot-be.html I corrected the file \modules\blocknewsletter\blocknewsletter.php Added the code there:

  public function hookDisplayFooter($params) 
    { return $this->hookDisplayLeftColumn('displayFooter');   }

hookDisplayLeftColumn – this is source hook
displayFooter – this is target hook

Now I can add it to the footer.


Jak stworzyć nowy „hook” w szablonie prestashop

1) Stworzyć nowy rząd w tabeli „ps_hook”
Nadać nazwę, np displayTop2
Wystarczy wypełnić pola „nazwa” i „tytuł”, reszta może zostać pusta
2) W pliku modułu w katalogu modułów wyedytować plik o nazwie
moduł.php i wywołać tam dany moduł

public function hookdisplayTop2()
{
echo „HELLO WORLD”;

}

3) Następnie w szablonie strony, na której ma się pojawić moduł (np w footer.tpl) wyświetlić go:

{hook::exec(‚displayTop2’)}

Zablokowanie wysyłania niektórych maili, prestashop

albo dodawanie warunków, w pliku:

In Classes/PaymentModule.Php

You need to add the condition above these lines. (Line number around 791). This part sends confirmation email to the customer.

 
if (Validate::isEmail($this->context->customer->email))
    Mail::Send(
    (int)$order->id_lang,
    'order_conf',
    Mail::l('Order confirmation', (int)$order->id_lang),
    $data,
    $this->context->customer->email,
    $this->context->customer->firstname.' '.$this->context->customer->lastname,
    null,
    null,
    $file_attachement,
    null, _PS_MAIL_DIR_, false, (int)$order->id_shop
);

Condition can be like

if($order->total_paid>0) 

Hope it helps !!