<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: A deeper look at Prestashop Hooks</title>
	<atom:link href="http://nemops.com/a-deeper-look-at-prestashop-hooks/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Fri, 10 Mar 2023 23:25:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>By: piotr PL</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46784</link>
		<dc:creator><![CDATA[piotr PL]]></dc:creator>
		<pubDate>Thu, 07 Feb 2019 16:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46784</guid>
		<description><![CDATA[Thanks for your tutorial!]]></description>
		<content:encoded><![CDATA[<p>Thanks for your tutorial!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NemoPS</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46713</link>
		<dc:creator><![CDATA[NemoPS]]></dc:creator>
		<pubDate>Fri, 02 Mar 2018 19:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46713</guid>
		<description><![CDATA[Hi! This is inevitable, the only proper way to do it is by using overrides:  http://nemops.com/override-prestashop-modules-core/#.WpmsEGpubIU]]></description>
		<content:encoded><![CDATA[<p>Hi! This is inevitable, the only proper way to do it is by using overrides:  <a href="http://nemops.com/override-prestashop-modules-core/#.WpmsEGpubIU" rel="nofollow">http://nemops.com/override-prestashop-modules-core/#.WpmsEGpubIU</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Ion</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46515</link>
		<dc:creator><![CDATA[Ivan Ion]]></dc:creator>
		<pubDate>Fri, 03 Feb 2017 19:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46515</guid>
		<description><![CDATA[Hi,
I bought your module development tutorial for ps1.6. You have done a great job. What about ps 1.7? I am waiting it.]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
I bought your module development tutorial for ps1.6. You have done a great job. What about ps 1.7? I am waiting it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rubens</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46153</link>
		<dc:creator><![CDATA[Rubens]]></dc:creator>
		<pubDate>Sun, 04 Oct 2015 19:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46153</guid>
		<description><![CDATA[So, I had a look to &quot;getHookModuleExecList&quot; in Hook.php file, and now is more than clear that those Payment hooks I was trying handle will never run unless I have a Payment Module. Specially because they are front-end Hooks.

I&#039;d love to follow your suggestion - and I bet it should work out - doing some modifications directly to the OrderConfirmationController, but unfortunately modifying directly this module or even through any overriding, my module would become automatically ineligible for Prestashop as we can see here:

http://doc.prestashop.com/display/PS16/Overriding+default+behaviors

&quot;It is not recommended to use an override in a module that you intend to distribute (for instance through the PrestaShop Addons marketplace), and they are forbidden in partner modules.&quot;



I really appreciate every efforts you did answering my questions and trying to help me. It&#039;s been very rare to get answers from any Prestashop communities we have.


I&#039;m stuck dude :(]]></description>
		<content:encoded><![CDATA[<p>So, I had a look to &#8220;getHookModuleExecList&#8221; in Hook.php file, and now is more than clear that those Payment hooks I was trying handle will never run unless I have a Payment Module. Specially because they are front-end Hooks.</p>
<p>I&#8217;d love to follow your suggestion &#8211; and I bet it should work out &#8211; doing some modifications directly to the OrderConfirmationController, but unfortunately modifying directly this module or even through any overriding, my module would become automatically ineligible for Prestashop as we can see here:</p>
<p><a href="http://doc.prestashop.com/display/PS16/Overriding+default+behaviors" rel="nofollow">http://doc.prestashop.com/display/PS16/Overriding+default+behaviors</a></p>
<p>&#8220;It is not recommended to use an override in a module that you intend to distribute (for instance through the PrestaShop Addons marketplace), and they are forbidden in partner modules.&#8221;</p>
<p>I really appreciate every efforts you did answering my questions and trying to help me. It&#8217;s been very rare to get answers from any Prestashop communities we have.</p>
<p>I&#8217;m stuck dude <img src="http://nemops.com/wp-includes/images/smilies/icon_sad.gif" alt=":(" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NemoPS</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46152</link>
		<dc:creator><![CDATA[NemoPS]]></dc:creator>
		<pubDate>Sat, 03 Oct 2015 19:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46152</guid>
		<description><![CDATA[Ok, I got what you mean. Hooks are not generate by modules, but ran from prestashop directly. Each of them just runs modules functions with the same name. Now, getting to your point, I think what you are looking for is something similar to a wordpress filter. What I&#039;d do is again modify that controller and run your own method. Since you need to grab get and post variables, it&#039;s the best way. If yo uhook the current payment module to paymentReturn, and your own module to orderconfirmation, you might even get away without mods, as they both run on the page, without conflicting]]></description>
		<content:encoded><![CDATA[<p>Ok, I got what you mean. Hooks are not generate by modules, but ran from prestashop directly. Each of them just runs modules functions with the same name. Now, getting to your point, I think what you are looking for is something similar to a wordpress filter. What I&#8217;d do is again modify that controller and run your own method. Since you need to grab get and post variables, it&#8217;s the best way. If yo uhook the current payment module to paymentReturn, and your own module to orderconfirmation, you might even get away without mods, as they both run on the page, without conflicting</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NemoPS</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46150</link>
		<dc:creator><![CDATA[NemoPS]]></dc:creator>
		<pubDate>Thu, 01 Oct 2015 08:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46150</guid>
		<description><![CDATA[Not exactly, no. It displays on the order confirmation page, as long as the user reaches it. And these are the only parameters sent over

				$params[&#039;total_to_pay&#039;] = $order-&gt;getOrdersTotalPaid();
				$params[&#039;currency&#039;] = $currency-&gt;sign;
				$params[&#039;objOrder&#039;] = $order;
				$params[&#039;currencyObj&#039;] = $currency;

In any case, if you want to do that, you need to modify the OrderConfirmationController, and append your hook execution right after its displayPaymentReturn]]></description>
		<content:encoded><![CDATA[<p>Not exactly, no. It displays on the order confirmation page, as long as the user reaches it. And these are the only parameters sent over</p>
<p>				$params[&#8216;total_to_pay&#8217;] = $order-&gt;getOrdersTotalPaid();<br />
				$params[&#8216;currency&#8217;] = $currency-&gt;sign;<br />
				$params[&#8216;objOrder&#8217;] = $order;<br />
				$params[&#8216;currencyObj&#8217;] = $currency;</p>
<p>In any case, if you want to do that, you need to modify the OrderConfirmationController, and append your hook execution right after its displayPaymentReturn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rubens</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46149</link>
		<dc:creator><![CDATA[Rubens]]></dc:creator>
		<pubDate>Thu, 01 Oct 2015 00:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46149</guid>
		<description><![CDATA[Hi Nemo,

Thanks for your reply.

The hookDisplayPaymentReturn is being normmally executed by the payment module when the orderis confirmed. Anyway I created another hookDisplayPaymentReturn in my own module (its not a payment module) in order to handle the params and get some specific values that are useful to my module and store these values on my way.

In other words, I want to execute MY CUSTOM hookDisplayPaymentReturn right after ANY OTHER module has executed yours. That&#039;s all.

And.... Sorry if it sounds clueless but if the hooks are only executed once, what&#039;s the reason for their positions for each module?]]></description>
		<content:encoded><![CDATA[<p>Hi Nemo,</p>
<p>Thanks for your reply.</p>
<p>The hookDisplayPaymentReturn is being normmally executed by the payment module when the orderis confirmed. Anyway I created another hookDisplayPaymentReturn in my own module (its not a payment module) in order to handle the params and get some specific values that are useful to my module and store these values on my way.</p>
<p>In other words, I want to execute MY CUSTOM hookDisplayPaymentReturn right after ANY OTHER module has executed yours. That&#8217;s all.</p>
<p>And&#8230;. Sorry if it sounds clueless but if the hooks are only executed once, what&#8217;s the reason for their positions for each module?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NemoPS</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46148</link>
		<dc:creator><![CDATA[NemoPS]]></dc:creator>
		<pubDate>Wed, 30 Sep 2015 19:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46148</guid>
		<description><![CDATA[As far as I know it&#039;s executed once. However, it&#039;s ran when you reach the order confirmation page only, is this what you were looking for?]]></description>
		<content:encoded><![CDATA[<p>As far as I know it&#8217;s executed once. However, it&#8217;s ran when you reach the order confirmation page only, is this what you were looking for?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rubens</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-46147</link>
		<dc:creator><![CDATA[Rubens]]></dc:creator>
		<pubDate>Wed, 30 Sep 2015 18:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-46147</guid>
		<description><![CDATA[Hi Nemo,

A Big thanks for your posts. They are so helpful ;)

I&#039;m trying to install a &quot;hookPaymentReturn&quot; on my module in order to get some specifics parameter values returned by any other payment module that could be executed.

I can see my module hook in &quot;ps_hook_module&quot; table at 2nd position, the activated payment module executes its own &quot;hookDisplayPaymentReturn&quot;, but the one I&#039;ve installed is not being executed.

The hooks are not only executed once right? What I&#039;m doing wrong?

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Nemo,</p>
<p>A Big thanks for your posts. They are so helpful <img src="http://nemops.com/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /></p>
<p>I&#8217;m trying to install a &#8220;hookPaymentReturn&#8221; on my module in order to get some specifics parameter values returned by any other payment module that could be executed.</p>
<p>I can see my module hook in &#8220;ps_hook_module&#8221; table at 2nd position, the activated payment module executes its own &#8220;hookDisplayPaymentReturn&#8221;, but the one I&#8217;ve installed is not being executed.</p>
<p>The hooks are not only executed once right? What I&#8217;m doing wrong?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shoulders</title>
		<link>http://nemops.com/a-deeper-look-at-prestashop-hooks/comment-page-1/#comment-20333</link>
		<dc:creator><![CDATA[shoulders]]></dc:creator>
		<pubDate>Mon, 15 Apr 2013 14:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=173#comment-20333</guid>
		<description><![CDATA[there is also a new method of creating hooks i am messing with. here is the forum thread i am reading:

{hook h=&#039;displayMyNewHook&#039;}

http://www.prestashop.com/forums/topic/173027-solved-how-to-create-a-new-hook-in-15-am-i-doing-it-wrong/page__hl__load%20products__st__20

thanks]]></description>
		<content:encoded><![CDATA[<p>there is also a new method of creating hooks i am messing with. here is the forum thread i am reading:</p>
<p>{hook h=&#8217;displayMyNewHook&#8217;}</p>
<p><a href="http://www.prestashop.com/forums/topic/173027-solved-how-to-create-a-new-hook-in-15-am-i-doing-it-wrong/page__hl__load%20products__st__20" rel="nofollow">http://www.prestashop.com/forums/topic/173027-solved-how-to-create-a-new-hook-in-15-am-i-doing-it-wrong/page__hl__load%20products__st__20</a></p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
