Prestashop

Prestsahop: Edit Variables

Posted on

I wanted to change the Manufacturer Name variable, to eliminate the spaces and replace it with a dash. I tried doing this with PHP, but it was terrible to do it, as there were multiple places to change it, and it some places impossible. To do it via PHP Variable I had to change it […]

SugarCRM

SugarCRM: Delete Custom Field

Posted on

You have to check for following things. 1) Remove custom field entry in table “fields_meta_data” 2) Remove field from module_name_cstm table 2) Remove file from custom/extension/modules/<Yourmodule>/Ext/Vardefs/sugarfield_<Field name>.php 3) Remove field from all the view if you have added any.   Do quick repair & rebuild.   Reference: https://community.sugarcrm.com/thread/26711  

Prestashop

Prestashop: Optimizing Store for SEO

Posted on

CSS Optimization: Every time you load a page it has to load the Global.css file which is big, and all the info there is not specific for that page. So configuration so that only the required parts of the CSS are loaded for that particular page. To accomplish this, there are two particular very important […]

PostgreSQL

PostgreSQL: Limit 1 on Group BY

Posted on

It’s stupidly complicated to get just one record per group on a PostgreSQL query… After an hour of trial and error this worked for me: SELECT DISTINCT ON (c_order_id) c_order_id FROM c_invoice   No Group By or Limit 1 functions needed.    

Mautic

Mautic: Remove Bounces

Posted on

My Method: Send the email and get the bounces on my email. Select all the bounced emails on Outlook and save them all as .TXT file so that I can then extract the all the text of all emails to a file. Put that file on a Ubunut Server and run a query to Extract […]

Apache

Apache: Change Default Not Found Image

Posted on

This is globally controlled by apache, or locally controlled by your .htaccess file (which basically changes the local apache configurations on local folders). Just add the following code to your .haccess file and adjust as per your requirements   RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ RewriteRule .* /var/www/html/malla-supply/img/p/en.jpg [L]   To do it Programatically […]

PostgreSQL

PgSQL: Cannot Alter Character Length because of Dependant Views

Posted on

  SQL error: ERROR: cannot alter type of a column used by a view or rule DETAIL: rule _RETURN on view rv_warehouseprice depends on column “sku” In statement: ALTER TABLE “adempiere”.”m_product” ALTER COLUMN “sku” TYPE character varying(50) I’ve read some documentation and the only apparent solution is to delete all the related views and then […]

Jasper Reports

Best BI Software

Posted on

JasperSoft Pentaho Watson Analytics *** Very Poor (even cancelled the trial) *** Microsoft Power BI AWS Quick Sight *** Still on Trial *** DELL – Boomi *** No Trial that I was Able to see ***   SQL Graphs review from Quora…   Chartio : for the data-consuming portion of the company.  Most of our small […]

PostgreSQL

PostgreSQL: Table Sizes

Posted on

SELECT *, pg_size_pretty(total_bytes) AS total , pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast , pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM ( SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME , c.reltuples AS row_estimate , pg_total_relation_size(c.oid) AS total_bytes , pg_indexes_size(c.oid) AS index_bytes , pg_total_relation_size(reltoastrelid) AS toast_bytes FROM pg_class c LEFT JOIN pg_namespace […]

MySQL

MySQL: Enable Logging

Posted on

mysql> show variables like ‘%log%’; Recreate the log files I deleted by mistake. It appears the MySQL does not recreate them automatically. touch /var/log/mysql.log chown mysql:adm /var/log/mysql.log touch /var/log/mysql/error.log chown mysql:adm /var/log/mysql/error.log touch /var/log/mysql/mysql-slow.log chown mysql:adm /var/log/mysql/mysql-slow.log touch /var/log/mysql/mysql.log chown mysql:adm /var/log/mysql/mysql.log

PHP

Prestashop: Debug Mode and Memory Upgrade

Posted on

To turn on debug mode go to: config/defines.inc.php Set define(‘_PS_MODE_DEV_’, false); –> define(‘_PS_MODE_DEV_’, true);   To upgrade PHP Memory Limit vim /etc/php5/apache2/php.ini — Go to Memory Limit.   To check PHP Config create a file with the following code. <?php phpinfo(); ?>   Another way to raise you your servers performance is to create a SWAP file, […]

MySQL

CSV IMPORT MANUAL

Posted on

Remove Commas from strings Truncate String Length using LEFT function in Excel Use CLEAN Function to remove unwanted breaks and non displaying characters