Prestashop

Prestashop: Manufacturer Page Slow

Posted on

-> Classes-> Manufacturer.php   /* $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT p.`id_manufacturer`, COUNT(DISTINCT p.`id_product`) as nb_products FROM `'._DB_PREFIX_.'product` p USE INDEX (product_manufacturer) '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`) WHERE p.`id_manufacturer` != 0 AND product_shop.`visibility` NOT IN ("none") '.($active ? ' AND product_shop.`active` = 1 ' : '').' '.(Group::isFeatureActive() && $all_group ? '' : […]

OpenBravo

Openbravo: Custom Query to find Invoice's Product Account

Posted on

SELECT c_invoice.documentno, c_invoiceline.linenetamt, --m_product_acct.m_product_id, --m_product_acct.ad_org_id, m_product_acct.p_expense_acct, c_elementvalue.name FROM c_invoice LEFT JOIN c_invoiceline ON c_invoice.c_invoice_id = c_invoiceline.c_invoice_id LEFT JOIN m_product_acct ON c_invoiceline.m_product_id = m_product_acct.m_product_id LEFT JOIN c_elementvalue ON c_elementvalue.c_elementvalue_id = m_product_acct.p_expense_acct WHERE dateinvoiced > '2017-01-01 00:00:00' AND dateinvoiced < '2017-12-31 00:00:00' AND issotrx = 'N' AND m_product_acct.c_acctschema_id = '092273C810444B4086ED18612E3F5833' ORDER BY --c_invoice.dateinvoiced ASC p_expense_acct asc

Prestashop

Prestashop: Remove undefined from Product List

Posted on

When you switch the view from Manufacturer's Product List you get an undefined Character.  To remove this go to  /var/www/html/XXXXXXX/themes/default-bootstrap/js/global.js: Comment the following lines: Line 284: html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';   Line 324: html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';

Mautic

Mautic: Bounces Retrieval not working

Posted on

Error: [Symfony\Component\Debug\Exception\ClassNotFoundException] Attempted to load class "Type" from namespace "Mautic\EmailBundle\MonitoredEmail\Processor\Bounce". Did you forget a "use" statement for e.g. "JMS\Serializer\Annotation\Type", "Doctrine\DBAL\Types\Type", "Aws\DynamoDb\Enum\Type", "Symfony\Component\Validator\Constraints\Type" or "Mautic\Emai lBundle\MonitoredEmail\Processor\Bounce\Definition\Type"?   Best way to solve this is by adding the verbose option to the fetch command.  php app/console mautic:emails:fetch -v

Mautic

Mautic: Placeholders

Posted on

Related to contacts {contactfield=firstname}   Related to Companies {contactfield=companyname} {contactfield=city} {contactfield=companyfax}   Custom Fields???

PowerBI

PowerBI: SugarCRM Database Connection.

Posted on

It will only work if you add the following parameter: OldGuids=true And the query will work as follows. let Source = MySQL.Database("192.168.1.244", "crm_em", [ReturnSingleDatabase=true, OldGuids=true]), crm_em_opportunities = Source{[Schema="crm_em",Item="opportunities"]}[Data] in crm_em_opportunities

Prestashop

Prestashop: Remove Rendering Blocking CSS

Posted on

If you do a Page Speed test on Google, to make sure your site is loading fast enough and a slow load time is not penalizing your SEO, you can do this hetre: https://developers.google.com/speed/pagespeed/insights/ One tipical error you'll get is  Eliminate render-blocking JavaScript and CSS in above-the-fold content The solution I got was to remove […]

Mautic

Mautic: Clear Bounces not working correctly

Posted on

Some emails are parsed, while others are not. It depends on the format of the email. Here are some highlights: Files of interest: /app/bundles/EmailBundle/MonitoredEmail/Processor/Bounce/DsnParser.php /app/bundles/EmailBundle/MonitoredEmail/Mailbox.php: /app/bundles/EmailBundle/MonitoredEmail/Processor/Bounce.php The process as I understand it is the following: Step 1.  On Mailbox.php you define what emails are considered for un-subscription. The default criteria es UNSEEN, which the process […]

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 […]

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 […]