<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NemoPS &#187; prestashop</title>
	<atom:link href="http://nemops.com/tag/prestashop/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Wed, 05 Dec 2018 13:25:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>Blocking spam emails in PrestaShop</title>
		<link>http://nemops.com/blocking-spam-emails-in-prestashop/</link>
		<comments>http://nemops.com/blocking-spam-emails-in-prestashop/#comments</comments>
		<pubDate>Wed, 22 Aug 2018 02:11:43 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3145</guid>
		<description><![CDATA[<p>As you know PrestaShop has been dreaded by a lot of spam issues recently. In this video we will see how to quickly block spam emails coming from the PrestaShop contact form Watch the screencast Let&#8217;s get started! Create a new php file in the override/controllers/front folder, and name it: ContactController.php and add the following [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/blocking-spam-emails-in-prestashop/">Blocking spam emails in PrestaShop</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>As you know PrestaShop has been dreaded by a lot of spam issues recently. In this video we will see how to quickly block spam emails coming from the PrestaShop contact form<br />
<span id="more-3145"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/D3_gvr0Raww" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<p>Let&#8217;s get started! Create a new php file in the <em>override/controllers/front</em> folder, and name it: <strong>ContactController.php</strong> and add the following inside php tags:</p>
<pre class="brush: php; title: ; notranslate">

class ContactController extends ContactControllerCore
{
}

</pre>
<p>We need to latch into the postProcess method, so let&#8217;s extend it:</p>
<pre class="brush: php; title: ; notranslate">
public function postProcess()
{
    if(Tools::isSubmit('submitMessage'))
    {
    }
}
</pre>
<p>We want to save the submitted message to a variable first, and then the email:</p>
<pre class="brush: php; title: ; notranslate">
    	$message = Tools::getValue('message');
        $from = trim(Tools::getValue('from'))
</pre>
<p>Now to keep things tidy we will create two new arrays, one will contain the list of strings to ban from emails, the other the ones to ban from the content:</p>
<pre class="brush: php; title: ; notranslate">

            $banned_in_email = ['.ru', 'qq.com', '.vn'];
            $banned_content = ['email marketing'];
</pre>
<p><strong>Please Note:</strong> make sure you use strings that are related to the spam you are actually getting. I am getting spam from .ru, qq.com and .vn domains, so that&#8217;s what I am blocking. I also get a lot of emails containing &#8220;email marketing&#8221; in the text, and am unlikely to get anything real with that type of content.<br />
Make sure you do not ban real customers!</p>
<p>We want to loop through both and spawn an error if anything is contained in the submitted variables:</p>
<pre class="brush: php; title: ; notranslate">
            foreach ($banned_in_email as $string) {
                if(strstr($from, $string))
                    $this-&gt;errors[] = Tools::displayError('This email address is not allowed');
            }
            foreach ($banned_content as $string) {
                if(strstr($message, $string))
                    $this-&gt;errors[] = Tools::displayError('Invalid content');
            }
</pre>
<p>And that&#8217;s basically it, we just need to call the parent at the very end of the method:</p>
<p>parent::postProcess();</p>
<p>And we are done! Here is the complete override:</p>
<pre class="brush: php; title: ; notranslate">
class ContactController extends ContactControllerCore
{
    public function postProcess()
    {
        if(Tools::isSubmit('submitMessage')) {

            $message = Tools::getValue('message');
            $from = Tools::getValue('from');

            $banned_in_email = ['.ru', 'qq.com', '.vn'];
            $banned_content = ['email marketing'];

            foreach ($banned_in_email as $string) {
                if(strstr($from, $string))
                    $this-&gt;errors[] = Tools::displayError('This email address is not allowed');
            }

            foreach ($banned_content as $string) {
                if(strstr($message, $string))
                    $this-&gt;errors[] = Tools::displayError('Invalid Content');
            }
        }
        parent::postProcess();
    }
}
</pre>
<p>Before you test, make sure you erase cache/class_index.php, so that the new override is loaded in the system.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/blocking-spam-emails-in-prestashop/">Blocking spam emails in PrestaShop</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/blocking-spam-emails-in-prestashop/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Private Orders Shop in PrestaShop and thirty bees part 2: hide shopping options for visitors</title>
		<link>http://nemops.com/private-orders-in-prestashop-thirty-bees-2-hide-shopping-options-for-visitors/</link>
		<comments>http://nemops.com/private-orders-in-prestashop-thirty-bees-2-hide-shopping-options-for-visitors/#comments</comments>
		<pubDate>Mon, 18 Jun 2018 10:54:39 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[shop]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3138</guid>
		<description><![CDATA[<p>In this second tutorial we will see how to prevent orders from non-registered customers, which is also necessary in case you applied the previous tutorial and are currently using a one page checkout. Watch the screencast Text Version METHOD 1 – Selectively enabling catalog mode If we don’t need to display prices to our visitors, [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/private-orders-in-prestashop-thirty-bees-2-hide-shopping-options-for-visitors/">Private Orders Shop in PrestaShop and thirty bees part 2: hide shopping options for visitors</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this second tutorial we will see how to prevent orders from non-registered customers, which is also necessary in case you applied the previous tutorial and are currently using a one page checkout.<br />
<span id="more-3138"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/TQQuckN9HdQ" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>Text Version</h2>
<h3>METHOD 1 – Selectively enabling catalog mode</h3>
<p>If we don’t need to display prices to our visitors, the simplest and quickest way to proceed is by selectively enable catalog mode. Open classes/controller/FrontController.php, and locate the following string, inside the init method:</p>
<pre class="brush: php; title: ; notranslate">
'PS_CATALOG_MODE' =&gt; (bool)Configuration::get('PS_CATALOG_MODE') || (Group::isFeatureActive() &amp;amp;&amp;amp; !(bool)Group::getCurrent()-&gt;show_prices),
</pre>
<p>Replace it with the following:</p>
<pre class="brush: php; title: ; notranslate">
'PS_CATALOG_MODE' =&gt; $catalog_mode || (Group::isFeatureActive() &amp;amp;&amp;amp; !(bool)Group::getCurrent()-&gt;show_prices),
</pre>
<p>We need to create that $catalog_mode variable of course, so let’s add this before the whole assign block:</p>
<pre class="brush: php; title: ; notranslate">
$catalog_mode = (bool)Configuration::get('PS_CATALOG_MODE');
if(!$this-&gt;context-&gt;customer-&gt;id)
    $catalog_mode = true;
</pre>
<p>As you can see, we simply check if the customer id is set (that is, if the user is logged in) and if so, we set catalog mode to true, effectively disabling all cart functionalities. This however left us with a useless cart block, and without prices. Let’s see how to handle it differently then!</p>
<div class="separator"></div>
<h3>METHOD 2 – Selectively disable products</h3>
<p>I will create an override for this one, so in override/classes, let’s create a new file named Product.php.</p>
<p>Let&#8217;s open it up, and copy over the construct method from the core product class. Get rid of everything inside it, and simply add the following:</p>
<pre class="brush: php; title: ; notranslate">
Class Product extends ProductCore
{
    public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null)
    {
        parent::__construct($id_product, $id_lang, $id_shop);

        if(!Context::getContext()-&gt;customer-&gt;id)
            $this-&gt;available_for_order = false;
    }
}
</pre>
<p>This will take care of the product page. Now for the product list, the property is set elsewhere, and specifically in the getProductProperties method (without s). Copy the whole method from the original class again, but this time leave the content, and just append the following code at the end, right before self::$producPropertiesCache[$cache_key] = $row;</p>
<pre class="brush: php; title: ; notranslate">
if(!$context-&gt;customer-&gt;id)
    $row['available_for_order'] = false;
</pre>
<p>And that’s all we need! Since we created a new override, remember it’s necessary to erase cache/class_index.php in order for the changes to take place.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/private-orders-in-prestashop-thirty-bees-2-hide-shopping-options-for-visitors/">Private Orders Shop in PrestaShop and thirty bees part 2: hide shopping options for visitors</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/private-orders-in-prestashop-thirty-bees-2-hide-shopping-options-for-visitors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Private Orders Shop in PrestaShop and thirty bees part 1: manual customer verification</title>
		<link>http://nemops.com/private-orders-shop-in-prestashop-and-thirty-bees-part-1-manual-customer-verification/</link>
		<comments>http://nemops.com/private-orders-shop-in-prestashop-and-thirty-bees-part-1-manual-customer-verification/#comments</comments>
		<pubDate>Wed, 30 May 2018 12:39:37 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[customers]]></category>
		<category><![CDATA[orders]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3133</guid>
		<description><![CDATA[<p>In this 2-part tutorial series, we will see how to create a private orders shop in PrestaShop and thirty bees. In this first part we will see how to add a manual approval for new customers while in the second on we will learn how to prevent orders from people who are not registered and [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/private-orders-shop-in-prestashop-and-thirty-bees-part-1-manual-customer-verification/">Private Orders Shop in PrestaShop and thirty bees part 1: manual customer verification</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this 2-part tutorial series, we will see how to create a private orders shop in PrestaShop and thirty bees.<br />
In this first part we will see how to add a manual approval for new customers while in the second on  we will learn how to prevent orders from people who are not registered and approved by us.<br />
<span id="more-3133"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/CkNh1VEdpbw" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>Text Version</h2>
<p>I will use PrestaShop 1.6 for the demo but the modification works in thirty bees as well. Bear in mind it DOES NOT work in PrestaShop 1.7.</p>
<p>Open up controllers/front/AuthController.php</p>
<p>Look for the following code, around line 455. If it’s not in those whereabouts, just make sure you change every instance</p>
<pre class="brush: php; title: ; notranslate">
$customer-&gt;active = 1;
</pre>
<p>set to 0, so that the user cannot perform any action right away.</p>
<p>Now we also want to give the user some feedback, so let&#8217;s redirect him to a custom page. Scroll down a few lines, and where you see all these redirects:</p>
<pre class="brush: php; title: ; notranslate">
if (($back = Tools::getValue('back')) &amp;&amp; $back == Tools::secureReferrer($back)) {
                            Tools::redirect(html_entity_decode($back));
                        }
</pre>
<p>And add a new one before</p>
<pre class="brush: php; title: ; notranslate">
  Tools::redirect($this-&gt;context-&gt;link-&gt;getPageLink('welcome'));
</pre>
<p>Of course this page does not exist yet but we will create it in a moment.</p>
<p>Before that though, we have to take care of a little issue. Since the user has been created but set to inactive, the system treats it as banned by default. Even if we are to redirect to a page, we would instantly be kicked out of the session and redirected to the login. We want to create an exception so that the welcome page can be displayed. </p>
<p>Let&#8217;s go ahead and open up the customer class, so classes/customer.php<br />
Look for the following method:</p>
<pre class="brush: php; title: ; notranslate">
public static function isBanned($id_customer)
</pre>
<p>And at the very beginning, add:</p>
<pre class="brush: php; title: ; notranslate">
        if(Context::getContext()-&gt;controller-&gt;php_self == 'welcome')
            return false;
</pre>
<p>That’s settled! Now for our welcome page, I will create a new controller and a template file in the theme folder</p>
<p>Let’s head to controllers/front, and create a new PHP file first, named WelcomeController.php:</p>
<pre class="brush: php; title: ; notranslate">
class WelcomeControllerCore extends FrontController
{
    public $php_self = 'welcome';


    public function initContent()
    {
        parent::initContent();
        $this-&gt;setTemplate(_PS_THEME_DIR_.'welcome.tpl');
    }
}
</pre>
<p>Then in the theme folder, create a new file named welcome.tpl, adding the following code inside</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
{capture name=&quot;path&quot;} {l s='Welcome'}{/capture}
&lt;h1&gt;{l s='Welcome to'} {$shop_name}! &lt;/h1&gt;
&lt;hr&gt;
&lt;p&gt;
	{l s='Your account is currently under review, you will receive an email as soon as it is validated'}
&lt;/p&gt;
</pre>
<p>So let&#8217;s go ahead and try it out now&#8230; but before let&#8217;s clear cache by erasing cache/class_index.php, since we added a new controller and the system wouldn’t read it otherwise.</p>
<p>The next step is to send out and email when a status is changed to active for the customer, in the back office.<br />
Open controllers/admin/admincustomerscontroller.php</p>
<p>We will add a new method, which is inherited from the admincontroller class:</p>
<pre class="brush: php; title: ; notranslate">

    public function processStatus()
    {
        if($object = parent::processStatus()) {
            if(get_class($object) == 'Customer' &amp;&amp; $object-&gt;active) // the customer has been activated, send out an email
            {
                Mail::Send($object-&gt;id_lang, 'account_activated', $this-&gt;l('Your account has been activated'),
                    ['name' =&gt; $object-&gt;firstname .' '. $object-&gt;lastname],
                $object-&gt;email,
                $object-&gt;firstname .' '. $object-&gt;lastname,
                Configuration::get('PS_SHOP_EMAIL'),
                Configuration::get('PS_SHOP_NAME'));
            }
        }

       return $object;
    }

</pre>
<p>Of course, there is no such email template so we have to create it. I suggest copying an existing one, like the order confirmation, and adding new text, just to be quicker. The code is different for every template, just bear in mind to add the {name} variable inside it, so that the customer name is displayed!</p>
<p>This is it for part 1, make sure you test the email as well since sometimes they do fail for odd reasons, if you don&#8217;t see it coming, triple check the template names and make sure they are located in the proper path for each language you use.</p>
<p>In part two we will see how to prevent orders in case a customer is not registered, which is fundamental not to break the system if you have a one page checkout, as right now it would display an error.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/private-orders-shop-in-prestashop-and-thirty-bees-part-1-manual-customer-verification/">Private Orders Shop in PrestaShop and thirty bees part 1: manual customer verification</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/private-orders-shop-in-prestashop-and-thirty-bees-part-1-manual-customer-verification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Litespeed module for PrestaShop and thirty bees</title>
		<link>http://nemops.com/litespeed-module-prestashop-thirty-bees/</link>
		<comments>http://nemops.com/litespeed-module-prestashop-thirty-bees/#comments</comments>
		<pubDate>Sun, 11 Feb 2018 23:16:01 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[litespeed]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3119</guid>
		<description><![CDATA[<p>If you are running PrestaShop or thirty bees on a litespeed server, this module helps you take full advantage of it Watch the screencast</p>
<p>The post <a rel="nofollow" href="http://nemops.com/litespeed-module-prestashop-thirty-bees/">Litespeed module for PrestaShop and thirty bees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you are running PrestaShop or thirty bees on a litespeed server, this module helps you take full advantage of it<br />
<span id="more-3119"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/GNg8D5m7Xy4" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<p>The post <a rel="nofollow" href="http://nemops.com/litespeed-module-prestashop-thirty-bees/">Litespeed module for PrestaShop and thirty bees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/litespeed-module-prestashop-thirty-bees/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting up a staging site for PrestaShop and Thirtybees</title>
		<link>http://nemops.com/staging-site-prestashop-thirtybees/</link>
		<comments>http://nemops.com/staging-site-prestashop-thirtybees/#comments</comments>
		<pubDate>Wed, 10 Jan 2018 08:18:49 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[staging]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3116</guid>
		<description><![CDATA[<p>It’s always better not to directly modify your live site, especially when core changes are involved. In this video, we will see how to create a development site for PrestaShop 1.6 and ThirtyBees Watch the screencast</p>
<p>The post <a rel="nofollow" href="http://nemops.com/staging-site-prestashop-thirtybees/">Setting up a staging site for PrestaShop and Thirtybees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>It’s always better not to directly modify your live site, especially when core changes are involved. In this video, we will see how to create a development site for PrestaShop 1.6 and ThirtyBees<br />
<span id="more-3116"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/ATV5K9UpJHs" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<p>The post <a rel="nofollow" href="http://nemops.com/staging-site-prestashop-thirtybees/">Setting up a staging site for PrestaShop and Thirtybees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/staging-site-prestashop-thirtybees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New module: &#8220;Address Fields&#8221; just released!</title>
		<link>http://nemops.com/new-module-prestashop-address-fields-released/</link>
		<comments>http://nemops.com/new-module-prestashop-address-fields-released/#comments</comments>
		<pubDate>Mon, 27 Nov 2017 11:09:09 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3104</guid>
		<description><![CDATA[<p>If you need to add new fields to the customer addresses in PrestaShop or ThirtyBees, this module will make your life a lot easier, with its automated process! Get it here Watch the video guide Core features Unlimited fields: Add as many new fields as you like Multiple input types: Choose between text, textarea or [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/new-module-prestashop-address-fields-released/">New module: &#8220;Address Fields&#8221; just released!</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you need to add new fields to the customer addresses in PrestaShop or ThirtyBees, this module will make your life a lot easier, with its automated process!<br />
<span id="more-3104"></span><br />
<a style="text-align:center" class="button style1" title="Get the PrestaShop Address Fields Module here" href="http://store.nemops.com/modules/45-prestashop-address-fields.html#.WhvvvEqWaUk">Get it here</a></p>
<h2>Watch the video guide</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/epnxI42c9ek" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<div class="separator"></div>
<h3>Core features</h3>
<ul>
<li><strong>Unlimited fields</strong>: Add as many new fields as you like</li>
<li>Multiple input types: <strong>Choose between text, textarea or select box</strong> to perfectly fit the type of data you require from your customers</li>
<li>Customizable format</li>
<li>Choose if you want to display the fields in the back office list as well</li>
<li>Multilanguage labels</li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/new-module-prestashop-address-fields-released/">New module: &#8220;Address Fields&#8221; just released!</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/new-module-prestashop-address-fields-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Duplicating Carriers along with Products in PrestaShop and ThirtyBees</title>
		<link>http://nemops.com/prestashop-thirtybees-duplicate-product-carriers/</link>
		<comments>http://nemops.com/prestashop-thirtybees-duplicate-product-carriers/#comments</comments>
		<pubDate>Mon, 13 Nov 2017 12:54:03 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[carriers]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3090</guid>
		<description><![CDATA[<p>In this tutorial we will use a little code snippet to have carriers copy over on product duplication in PrestaShop and Thirtybees. Watch the screencast Duplicating product carriers in PrestaShop and ThirtyBees &#8211; text version Create a new override in override/controllers/admin, and name it AdminProductsController.php: We need to copy the original ProcessDuplicate method, and paste [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-thirtybees-duplicate-product-carriers/">Duplicating Carriers along with Products in PrestaShop and ThirtyBees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we will use a little code snippet to have carriers copy over on product duplication in PrestaShop and Thirtybees.</p>
<p><span id="more-3090"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/SZfVTkEDjb4" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>Duplicating product carriers in PrestaShop and ThirtyBees &#8211; text version</h2>
<p>Create a new override in <em>override/controllers/admin</em>, and name it <strong>AdminProductsController.php</strong>:</p>
<pre class="brush: php; title: ; notranslate">
class AdminProductsController extends AdminProductsControllerCore
{
}
</pre>
<p>We need to copy the original <strong>ProcessDuplicate</strong> method, and paste it into our override. You will see it&#8217;s calling a bunch of methods that start with &#8220;duplicate&#8221;. Add the following right after Product::duplicateSuppliers($id_product_old, $product->id):</p>
<pre class="brush: php; title: ; notranslate">
            &amp;&amp; Product::duplicateCarriers($id_product_old, $product-&gt;id)
</pre>
<p>Next, we have to add the method we are calling to the Product class. We will use another override, so let&#8217;s create <strong>Product.php</strong> in <em>override/classes</em></p>
<p>Open it up, and paste the following, or if you have a product override already in place, just copy over the <strong>DuplicateCarriers</strong> method:</p>
<pre class="brush: php; title: ; notranslate">
    public static function duplicateCarriers($id_product_old, $id_product_new)
    {
        $result = Db::getInstance()-&gt;executeS('
		SELECT *
		FROM `'._DB_PREFIX_.'product_carrier`
		WHERE `id_product` = '.(int)$id_product_old);

        foreach ($result as $row) {
            unset($row['id_product_carrier']);
            $row['id_product'] = $id_product_new;
            if (!Db::getInstance()-&gt;insert('product_carrier', $row)) {
                return false;
            }
        }

        return true;
    }	
</pre>
<p>Save, then reach the <em>cache/</em> folder and erase <strong>class_index.php</strong>, so that the new overrides can get loaded in the system.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-thirtybees-duplicate-product-carriers/">Duplicating Carriers along with Products in PrestaShop and ThirtyBees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-thirtybees-duplicate-product-carriers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make product fields multi-language in PrestaShop and ThirtyBees</title>
		<link>http://nemops.com/prestashop-thirtybees-multi-language-product-fields/</link>
		<comments>http://nemops.com/prestashop-thirtybees-multi-language-product-fields/#comments</comments>
		<pubDate>Mon, 18 Sep 2017 02:56:55 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[products]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3067</guid>
		<description><![CDATA[<p>In this tutorial we will learn how to make product fields translatable in PrestaShop 1.6, and see how to apply the method to the &#8220;price per&#8230;&#8221; field. Introduction You might have come across the need to translate the price per unit field in your PrestaShop or Thirtybees, but crashed against the software&#8217;s limitation, as that&#8217;s [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-thirtybees-multi-language-product-fields/">Make product fields multi-language in PrestaShop and ThirtyBees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we will learn how to make product fields translatable in PrestaShop 1.6, and see how to apply the method to the &#8220;price per&#8230;&#8221; field.<br />
<span id="more-3067"></span></p>
<h2>Introduction</h2>
<p>You might have come across the need to translate the price per unit field in your PrestaShop or Thirtybees, but crashed against the software&#8217;s limitation, as that&#8217;s a single language property. Any product field can be made multi-language with a simple modification, so let&#8217;s see how to do it using the Unity one as example in this tutorial!</p>
<div class="separator"></div>
<h2>Step 1 &#8211; Adding the new database column</h2>
<p>In order to make the field translatable, we have to add it to the <strong>product_lang </strong>table in the database. Not only, but  we also have to erase the same column in both the product and product_shop tables, to avoid conflicts when retrieving values from the database. Let&#8217;s add it first!</p>
<p>Using phpMyAdmin or Adminer, locate the <strong>*prefix*product_lang</strong> table in your database, and add a new column as <strong>VARCHAR</strong>, 24 characters long. Once done, it will look like this:</p>
<p><img src="http://nemops.com/wp-content/uploads/2017/09/multilang_field_db.png" alt="multilang_field_db" width="606" height="97" class="aligncenter size-full wp-image-3069" /></p>
<p>Next, let&#8217;s get rid of the leftovers: open the *prefix*product table and drop the <strong>unity</strong> column first, and then on the <strong>product_shop</strong> table.<br />
We are done! We just broke the Product class though, and have to compensate by letting it know where to grab the new values from.</p>
<div class="separator"></div>
<h2>Step 2 &#8211; Editing the product class</h2>
<p>We have a new column in the database, but at this point the Product class would still just ignore it. To have it lookup, and save into the correct table, we must tell it that the property we are wanting to translate is a multilanguage field. To do so, we must change its definition.</p>
<p>Open up <strong>Product.php</strong>, located in the <em>classes/</em> folder.</p>
<p>Scroll down until you find the following line, part of the <strong>$definition</strong> property:</p>
<pre class="brush: php; title: ; notranslate">
'unity'                     =&gt; ['type' =&gt; self::TYPE_STRING, 'shop' =&gt; true, 'validate' =&gt; 'isString'],
</pre>
<p>To make any field translatable, we can simply add &#8216;lang&#8217; => true as follows</p>
<pre class="brush: php; title: ; notranslate">
'unity'                     =&gt; ['type' =&gt; self::TYPE_STRING, 'shop' =&gt; true, 'validate' =&gt; 'isString', 'lang' =&gt; true],
</pre>
<p><strong>Please notice that, as always, using an override is strongly recommended, instead of editing core files.</strong></p>
<div class="separator"></div>
<h2>Step 3 &#8211; Editing the back office</h2>
<h3>The controller</h3>
<p>This is the most complicated part, as we will have to edit both the admin controller for products, and the correct template. For our example, the template is <strong>prices.tpl</strong>, but it will be different if the field you want to translate is in another tab.</p>
<p>Let&#8217;s start with the controller. The prices template does not offer us any option for translating fields, and therefore misses the indispensable $languages variable.<br />
Open up <strong>AdminProductsController</strong>, located in <em>controllers/admin</em></p>
<p>We are interested in the method called <strong>initFormPrices</strong>, so once you find it you can simply clone that to an override, or continue editing the core.</p>
<p>Right after $data is assigned, at the very beginning of the function, but <strong>before $product = $obj</strong>, add the following</p>
<pre class="brush: php; title: ; notranslate">
if (!$this-&gt;default_form_language) {
    $this-&gt;getLanguages();
}
$data-&gt;assign(array(
    'languages'=&gt; $this-&gt;_languages,
    'id_lang' =&gt; $this-&gt;context-&gt;language-&gt;id,
    'default_form_language' =&gt; $this-&gt;default_form_language,
));
</pre>
<p><strong>Explanation</strong>: Nothing too complex here, we are first checking if languages are loaded, and if not, assigning them to the controller. Then, we simply assign that class property to the template, along with a few other required ones. Please notice we do not use a common smarty assign, but the $data variable instead.</p>
<h3>The template</h3>
<p>Time to make our changes visible in the back office! For the unity field, let&#8217;s open up <em>*admin folder*/themes/default/template/controllers/products/prices.tpl</em></p>
<p>Locate the input with id unity, which will look more or less like the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;input id=&quot;unity&quot; name=&quot;unity&quot; type=&quot;text&quot; value=&quot;{$product-&gt;unity|htmlentitiesUTF8}&quot;  maxlength=&quot;255&quot; onkeyup=&quot;if (isArrowKey(event)) return ;unitySecond();&quot; onchange=&quot;unitySecond();&quot;/&gt;
</pre>
<p>Instead of this input, we will use a handy template PrestaShop makes available to us. Replace the above with the following code:</p>
<pre class="brush: php; title: ; notranslate">
{include file=&quot;controllers/products/input_text_lang.tpl&quot;
languages=$languages
input_class=&quot;{$class_input_ajax}{if !$product-&gt;id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')}copy2friendlyUrl{/if} updateCurrentText&quot;
input_value=$product-&gt;unity
input_name=&quot;unity&quot;}
</pre>
<p>Save and refresh, and you will see the new field, translatable, appearing in the prices table of the back office. Time to test it, and see if it&#8217;s saving properly.<br />
We can take an extra step and translate the preview below as well:</p>
<pre class="brush: php; title: ; notranslate">
&lt;span id=&quot;unity_second&quot;&gt;{$product-&gt;unity}&lt;/span&gt;
</pre>
<p>to</p>
<pre class="brush: php; title: ; notranslate">
&lt;span id=&quot;unity_second&quot;&gt;{$product-&gt;unity.{$id_lang}}&lt;/span&gt;
</pre>
<p>At this point we can go ahead and test the Front Office. If everything has been done correctly, as soon as you change language, the class should automatically pick the correct translation for the field. Neat!</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-thirtybees-multi-language-product-fields/">Make product fields multi-language in PrestaShop and ThirtyBees</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-thirtybees-multi-language-product-fields/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Installing ThirtyBees: e-commerce that works for you</title>
		<link>http://nemops.com/installing-thirtybees/</link>
		<comments>http://nemops.com/installing-thirtybees/#comments</comments>
		<pubDate>Mon, 28 Aug 2017 06:53:33 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3063</guid>
		<description><![CDATA[<p>In this video we will see how to install the awesome e-commerce software ThirtyBees, both automatically and manually, on a live server. Watch the screencast</p>
<p>The post <a rel="nofollow" href="http://nemops.com/installing-thirtybees/">Installing ThirtyBees: e-commerce that works for you</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this video we will see how to install the awesome e-commerce software ThirtyBees, both automatically and manually, on a live server.<br />
<span id="more-3063"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/x9xg27sTQu4" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<p>The post <a rel="nofollow" href="http://nemops.com/installing-thirtybees/">Installing ThirtyBees: e-commerce that works for you</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/installing-thirtybees/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Edit the product creation date in ThirtyBees and PrestaShop</title>
		<link>http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/</link>
		<comments>http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/#comments</comments>
		<pubDate>Mon, 14 Aug 2017 10:45:47 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[new product]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[thirtybees]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3054</guid>
		<description><![CDATA[<p>In this quick tip we will see how to add a new field to the product&#8217;s back office in ThirtyBees and Prestashop 1.6, so that we can edit its creation date Watch the screencast Code Snippet</p>
<p>The post <a rel="nofollow" href="http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/">Edit the product creation date in ThirtyBees and PrestaShop</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this quick tip we will see how to add a new field to the product&#8217;s back office in ThirtyBees and Prestashop 1.6, so that we can edit its creation date<br />
<span id="more-3054"></span></p>
<p><!--more--></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/8HM4ZH5Q8cY" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>Code Snippet</h2>
<pre class="brush: php; title: ; notranslate">
	{if $product-&gt;date_add}
		&lt;div class=&quot;form-group&quot;&gt;
			&lt;label class=&quot;control-label col-lg-3&quot;&gt;
				&lt;span class=&quot;label-tooltip&quot; data-toggle=&quot;tooltip&quot; title=&quot;{l s='Change date for product new from.'}&quot;&gt;
					{$bullet_common_field} {l s='New from'}
				&lt;/span&gt;
			&lt;/label&gt;
			&lt;div class=&quot;col-lg-3&quot;&gt;
				&lt;input type=&quot;text&quot; id=&quot;date_add&quot; class=&quot;datepicker&quot; name=&quot;date_add&quot; value=&quot;{$product-&gt;date_add|escape:html:'UTF-8'}&quot;&gt;
			&lt;/div&gt;
		&lt;/div&gt;
	{/if}
</pre>
<p>The post <a rel="nofollow" href="http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/">Edit the product creation date in ThirtyBees and PrestaShop</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
