Prestashop

Prestashop Shortlinks

Posted on

Manufacturer Link on Product Page <a href=”manufacturers-{$product->manufacturer_name|replace:’&’:”|replace:’ ‘:’-‘|lower}-{$product->id_manufacturer}” style=”color:blue; text-decoration:underline” ></a>     Manufacturer Link on Manufacturer List href=”{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:’html’:’UTF-8′}”

Scrapy

Scrapy: Basic Commands

Posted on

Create Project scrapy startproject EXAMPLE /home/Scripts/scrapy/EXAMPLE   2 . Create Project inside the spiders folder with the format: example_spider.py   3.  Start testing with the console. scrapy shell ‘http://quotes.toscrape.com’   And execute the XPath commands https://devhints.io/xpath   To run the spider execute the followng command on the folder. scrapy crawl <spider name> -o file.csv -t […]

PHP

PHP-FPM Performance Tweaks

Posted on

High performance Apache with mpm-event and PHP-FPM   Next, we edit config file for mpm-event at /etc/apache2/mod-available/mpm-event.conf : # event MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads […]

Ubuntu

Apache http2 Activation on Ubuntu 14.04

Posted on

http/2 is apparently where the web is going on the next generation web data transfer. I’m interested on trying to configure it, to see if that gives me an edge on the SEO side. The process to activate it is particularly simple, but, I had some compatibility challenges. Let me elaborate: I’m hosting this particular […]

PostgreSQL

PgSQL: Replace Add break

Posted on

UPDATE m_product SET em_mg_longdescription = regexp_replace(em_mg_longdescription,’————‘,chr(13)) WHERE em_mg_manufacturer = 1000637 AND value = ‘IMI-YW356A01′     Some additional replace scripts   UPDATE m_product SET em_mg_longdescription = regexp_replace(em_mg_longdescription,'</li>’,chr(10)) WHERE em_mg_manufacturer = 1000637   UPDATE m_product SET em_mg_longdescription = replace(em_mg_longdescription,'<li>’,”) WHERE em_mg_manufacturer = 1000637   UPDATE m_product SET em_mg_longdescription = replace(em_mg_longdescription,'<ul>’,”) WHERE em_mg_manufacturer = 1000637   UPDATE […]

Mautic

Mautic: Fix Upgrade Problems

Posted on

https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful   1. Try to clear cache When the upgrade failed in the last step, it’s possible that only the cache is outdated. Try to clear it manually. php app/console cache:clear If this command throws a PHP error, you can try to nuke the cache folder like this: rm -rf app/cache/* If clearing cache didn’t […]

Mautic

Mautic: Understanding how it works

Posted on

Add your contacts. Create your segments and apply the filters you want. Update the segments using this query php /var/www/html/malla-group.com/mail/app/console mautic:segments:update Rebuild Campaign php /var/www/html/malla-group.com/mail/app/console mautic:campaigns:rebuild Trigger Campaign —> Note that once you trigger the campaign the email will appear as Sent altough it may not have been sent yet. The email will be stock […]

Mautic

Mautic: Console Commands

Posted on

To execute… php /var/www/html/—PATHTOSERVER—/mail/app/console mautic:campaigns:rebuild mautic:campaigns:trigger – mautic:campaign:trigger – mautic:trigger:campaigns – mautic:trigger:campaign 2) mautic:campaigns:rebuild – mautic:update:campaigns – mautic:rebuild:campaigns – mautic:campaigns:update 3) mautic:iplookup:download – mautic:fetch:ipdata – mautic:ipdata:fetch – mautic:ipdata:update – mautic:update:ipdata 4) mautic:emails:send – mautic:send:emails – mautic:process:email – mautic:process:emails – mautic:email:process – mautic:emails:process – mautic:send:email 5) mautic:email:fetch – mautic:fetch:email – mautic:email:fetch – mautic:fetch:mail – mautic:check:email – […]

Mautic

Mautic: Configuration

Posted on

https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful   Add Mailto to the List-Unsubscribe Header: Go to -> /app/bundles/EmailBundle/Helper/MailHelper.php: Aproximately on line 1484 /** * Generate and insert List-Unsubscribe header. */ private function addUnsubscribeHeader() { if (isset($this->idHash)) { $unsubscribeLink = $this->factory->getRouter()->generate(‘mautic_email_unsubscribe’, [‘idHash’ => $this->idHash], true); $this->headers[‘List-Unsubscribe’] = “<unsubscribe@malla-group.com>,<$unsubscribeLink>”; } }

Jasper Reports

JasperServer: Start Server on Boot

Posted on

This is an excellent post, which not only shows you how to solve the startup problem, but illustrate the use of startup scripts. http://community.jaspersoft.com/questions/541044/auto-start-boot   Key Points. To creste “service type” scripts you need to create the bash script on /etc/init.d/NAME_OF_SCRIPT To have this script run on server boot, you need to run update-rc.d NAME_OF_SCRIPT defaults […]

Python

Python: For Financial Services

Posted on

  Download Python (https://www.python.org/downloads/release/python-361/) Download matplotlib (https://pypi.python.org/pypi/matplotlib) Numpy (http://www.numpy.org/) Python Installers: http://www.lfd.uci.edu/~gohlke/pythonlibs/       cd \Users\Ricardo\AppData\Local\Programs\Python\Python36\Scripts   pip install numpy pip install Matplotlib pip install pandas pip install pandas-datareader pip install beautifulsoup4 pip install scikit-learn     Posible IDEs iPython Notebooks Anaconda PyCharm Pro   Good Tutorials on Panda pandas python.org   Recommended Youtube Channels: https://www.youtube.com/user/APMonitorCom/videos https://www.youtube.com/user/sentdex/videos

Prestashop

Prestashop: Add custom column on Product Page and Display it on product.tpl

Posted on

Steps: Create the table manually on the database. Declare the variable on /classes/product.php add the variable on /controllers/front/ProductController.php in the following matter. $product_tariff = $this->product->em_mg_tariff_code; $this->context->smarty->assign(‘tariff_code’, $product_tariff); 4. Add the field on your tpl on the following matter. {$tariff_code}    

MySQL

PHPMyAdmin: Securing web console

Posted on

I installed PHPMyadmin to check my help manage my database, eventhough I also use the desktop program MySQL Workbench, I fell sometimes its important to use the webconsole. Recently, upon checking my MySQL Logs (/var/logs/mysql/error.log) I encountered that everyday I had thousands of failed logins to the PHPMyAdmin. I sure enough have a very strong […]

Prestashop

Prestashop: No follow causing W3 non-compliance

Posted on

The problem I believe has to do with changes on standards. The w3 validator shoes as an error to have multiple rel=”example” tags inside an argument. So when it added its no follow arguments did the following things. Incorrect <a rel=”nofollow” href=”http://www.malla-supply.com/manufacturers-abb-96?p=2” rel=”next“>   Correct <a href=”http://www.malla-supply.com/manufacturers-abb-96?p=2” rel=”next nofollow“>   To solve this I removed the […]