some backup links using rsync

https://github.com/elkarbackup/elkarbackup

ElkarBackup is a free open-source backup solution based on RSync/RSnapshot

Automated Rsync Backup

 

Here’s how to setup an automated backup process using Rsync.

1. Test rysnc using a password. Here we will be copying files from /src-dir to /dest-dir on [email protected]

1
> rsync -rvz -e 'ssh -p 22' --progress /src-dir [email protected]:/dest-dir

2. Now let’s automate Rsync. Create the public and private keys on the source machine.

1
 > ssh-keygen

3. Copy the public key to username’s ~/.ssh/authorized_keys file in the destination machine.

1
 > ssh-copy-id "[email protected] -p 22"

4. Test SSH using key authentication.

1
> ssh "[email protected] -p 22"

5. Test Rsync using key authentication.

1
> rsync -rvz -e 'ssh -p 22' --progress /src-dir [email protected]:/dest-dir

6. Add Rsync to daily cron.

1
2
3
> cd /etc/cron.daily/
> echo 'rsync -rz -e "ssh -p 22" /src-dir [email protected]:/dest-dir' >> rsync.cron
> chmod u+x rsync.cron

7. In case you want to use a password instead (not recommended), you can use sshpass.

1
> rsync -rvz -e 'sshpass -p password ssh -l username -p 22' --progress /src-dir [email protected]:/dest-dir

 

Percona cluster failed

one of the nodes failed then the whole cluster went down.

shutdown mysql on all nodes

cat /var/lib/mysql/grastate.dat

check which node has the highest seq number

boot strap that node

service mysql bootstrap-pxc

then start the next node but before that

mv /var/lib/mysql/grastate.dat ~

service mysql start

this will start a full resync

wait till it finishes then start the same process on the next node.

 

https://www.percona.com/doc/percona-xtradb-cluster/5.5/manual/bootstrap.html

WTF – VMware Update Manager 6.0 Install

I remember installing this was much easier back in da day….

First problem

Trying to find vmware update manager. There is no download link for it on vmware website. After much searching you’ll find it in the vcenter iso.

Second problem

.net 3.5 sp1 installation in windows 2012 can only be done through server manager. This is a big WTF. If your server isn’t online you need to run some command line that downloads it from a mounted windows 2012 iso. My server was having problems updating because of some firewall policies. Took a long time to figure this out.

Third problem

installing update manager needs a ODBC connection. I remember in the past it would install sql express but now you gotta do everything manually. Had to download sqlexpress. I downloaded 2014 microsoft sql express 64 and then needed sql server management studio to create a database. Well VUM doesn’t support 64-bit, you need to setup a 32-bit sql. And 32-bit mssql only works with 32-it sql server management studio. Finally after setting up ODBC I was able to complete the install.

Fourth problem

yes last problem. after all was said and done, vum service wasn’t talking to the database properly. The error didn’t say it couldn’t talk to database so couldn’t figure out for a while was wrong. I was looking up a bunch of stuff that didn’t help. Finally decided to look at event viewer. I should’ve done this first. Found that the SQL user SYSTEM was trying to access the db no permissions. I went to service manager and changed in properties, login as the administrator.

DONE

 

Shitty documentation installing magmi

When you install magmi and you access magmi/web/magmi.php initial login/pass will be “magmi/magmi”. After you setup db connection info it will use magento back office login/password.

create magmi/.htaccess

Order deny,allow
Deny from all

then create magmi/web/.htaccess

Order allow,deny
Allow from all
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Add passphrase to private key

You can still add a passphrase to a private key even after a certificate is generated.

openssl rsa -des3 -in your.key -out your.encrypted.key

mv your.encrypted.key your.key

the -des3 tells openssl to encrypt the key with DES3.

remove it

openssl rsa -in your.key -out your.open.key

you will be asked for your passphrase one last time by omitting the -des3 you tell openssl to not encrypt the output.

mv your.open.key your.key

 

http://security.stackexchange.com/questions/59136/can-i-add-a-password-to-an-existing-private-key

FUCK: syntax error in /etc/sudoers file

[email protected]:~$ sudo
>>> /etc/sudoers: syntax error near line 33 <<<
sudo: parse error in /etc/sudoers near line 33
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

 

[email protected]:~$ pkexec visudo -f /etc/sudoers
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/sbin/visudo' as the super user
Multiple identities can be used for authentication:
 1.  Admin User,,, (adminuser)
 2.  ,,, (krypt)
Choose identity to authenticate as (1-2): 2
Password:
==== AUTHENTICATION COMPLETE ===

 

svchost.exe high cpu on windows 7

svchost.exe high cpu on windows 7

used process explorer to figure out what service is taking up all the cpu. process explorer is a free tool from microsoft.

found it was dnscache.

read here to try disabling the dns service. I disabled the service and DNS resolution was working, but after a while it would stop and after reboots it wasn’t working either. Found at the bottom of the forum that processing the hosts file is what’s causing the slow down. Even though my hosts file had some entires from spybot it wasn’t huge. I replaced c:\windows\system32\drivers\etc\hosts with an empty and cpu usage was back to normal.

 

Latest_Performance_Report_for__http___fill4style_com____GTmetrix

Pagespeed higher score for magento with cache-control

Add this at the end of .htaccess file

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType application/pdf "access 1 week"
ExpiresByType application/javascript "access 1 week"
ExpiresByType application/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType image/x-icon "access 1 week"
ExpiresDefault "access 1 week"
</IfModule>
<IfModule mod_headers.c>
 <FilesMatch ".(js|css|xml|gz|html)$">
   Header append Vary: Accept-Encoding
 </FilesMatch>
Header set Connection keep-alive
</IfModule>
## EXPIRES CACHING ##

 

 

download cms page for opencart 2.x

Create Download CMS Page on OpenCart 2.x Quick and Dirty

~/www/catalog/view/theme/default/template/download/download.tpl

 

<?php echo $header; ?>
<?php echo $content_top; ?>
<div class="container">
 <div class="row"><?php echo $column_left; ?>
   <?php if ($column_left && $column_right) { ?>
   <?php $class = 'col-sm-6'; ?>
   <?php } elseif ($column_left || $column_right) { ?>
   <?php $class = 'col-sm-9'; ?>
   <?php } else { ?>
   <?php $class = 'col-sm-12'; ?>
   <?php } ?>
   <div id="content" class="<?php echo $class; ?>"><?php
//echo $my_custom_text;
//      var_dump ($download_result);
if ($download_result->num_rows > 0) {
   // output data of each row
   foreach ($download_result as $row){
       if ($row["download_id"]) {
       echo "<div class='download'>ID: " . $row["download_id"]. " - <a href='/system/download/" . $row["filename"]. "'>Download: " . $row["mask"] . "</a></div><br>";
       }
   }
} else {
   echo "0 results";
}
?><?php echo $content_bottom; ?></div>
   <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>

~/www/catalog/controller/download/download.php

<?php
class ControllerDownloadDownload extends Controller {
public function index() {
// set title of the page
$this->document->setTitle("My Download Page");

// define children templates
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');

// set data to the variable
$data['my_custom_text'] = "This is my custom page.";
   $sql = "SELECT * FROM oc_download";
   $download_result = $this->db->query($sql);
//      var_dump ($download_result);
       $data['download_result'] = $download_result;

// call the "View" to render the output
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/download/download.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/download/download.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/download/download.tpl', $data));
}
}
}
?>

go to http://icetrousa.com/index.php?route=download/download

reference:

http://code.tutsplus.com/articles/from-beginner-to-advanced-opencart-more-about-mvc–cms-21737

http://code.tutsplus.com/tutorials/create-a-custom-page-in-opencart–cms-22054 – read comments for 2.x

[Prestashop] How to fix edit product and delete product in back office order

Test should work for any 1.6.x.x, but only tested on 1.6.0.9, 1.6.0.11, and 1.6.1.4

There is a problem with the token. orders.js is the new file and orders.js.bak is the original js file. You will see the token is pulled from the url/href.

[email protected] [/home/bozzolo/www]# diff js/admin/orders.js js/admin/orders.js.bak
595c595
< 				token: window.location.href.split('token=')[1].split("&")[0],
---
> 				token: token,
685c685
< 			query = 'ajax=1&token='+window.location.href.split('token=')[1].split("&")[0]+'&action=editProductOnOrder&id_order='+id_order+'&';
---
> 			query = 'ajax=1&token='+token+'&action=editProductOnOrder&id_order='+id_order+'&';
762c762
< 		var query = 'ajax=1&action=deleteProductLine&token='+window.location.href.split('token=')[1].split("&")[0]+'&id_order_detail='+id_order_detail+'&id_order='+id_order;
---
> 		var query = 'ajax=1&action=deleteProductLine&token='+token+'&id_order_detail='+id_order_detail+'&id_order='+id_order;

 

Fix for this: Can’t edit/add ordered products in an order page

[ERROR] WSREP: failed to open gcomm backend connection: 131: invalid UUID: 00000000 (FATAL) at gcomm/src/pc.cpp:PC():271

Headache: [ERROR] WSREP: failed to open gcomm backend connection: 131: invalid UUID: 00000000 (FATAL)
at gcomm/src/pc.cpp:PC():271

Solution:

rename /var/lib/mysql/gvwstate.dat to /var/lib/mysql/gvwstate.dat.bak

service mysql start

https://github.com/codership/galera/issues/354

How to check if you are running in a VM in linux

On Linux you can use the command virt-what

[[email protected]]# virt-what
vmware

 

Magento – Menu toggle dropdown broken in left column

design/frontend/mogan/default/template/catalog/layer/view.phtml

moved javascript to the very bottom

<script>
jQuery(document).ready(function(){
jQuery(document).on('click',"#shop-by-header",function(){
jQuery("#shop-by-content").slideToggle();
});
jQuery(document).on('click',"dt[data-toggle='true']",function(){

var elm=jQuery(this),name=jQuery(this).attr('data-name').split('-')[1];
console.log('dd[data-toggle="toggle-'+name+'"]');
jQuery('.toggle-'+name).slideToggle( "slow",function(){
if(elm.text()==='- '){
elm.find('span').text('+ ');
}else{
elm.find('span').text('- ');
}
});
});
});
</script>java

 

Magento – swatches slowing down site

The category page aka product-list page was really slow to load, about 25 seconds plus

To troubleshoot Magento’s cpu usage, first enable varien profiler

http://www.techawaken.com/enable-magento-profiler-identify-magento-performance-bottlenecks/

You can also try aoe_profiler

Found out it was the configurable swatches.

Tried the first method in this post.

http://magento.stackexchange.com/questions/69863/configurable-swatches-slow-site-down

My load time went from 25s to 10s. Then I tried the 2nd post which points to https://github.com/wigman/AjaxSwatches

Load time went down 3s

BTW I am running Magento 1.9.2.1

import sample magento magmi configurable product csv

I used the export all products dataflow as a template then started modifying it from there. Put configurable product at the end.

Added + in front of image url so that it will not add as exclude image http://magento.stackexchange.com/questions/29891/magmi-images-excluded

added 3 columns: media_gallery,super_products_sku,configurable_attributes http://stackoverflow.com/questions/16166425/magmi-importing-configurable-product

Used magmi to import the csv http://sourceforge.net/projects/magmi/

in magmi enabled itemprocessors, “Magmi Optimizer, Magmi Magento Reindexer, Image attriutes processor, On the fly indexer, Configurable Item Processor”

BTW this was done on Magento 1.9.x

copy and paste as csv file and open in csv viewer like openoffice or excel

 

store,websites,attribute_set,type,category_ids,sku,has_options,name,meta_title,meta_description,image,small_image,thumbnail,gallery,url_key,url_path,custom_design,page_layout,options_container,image_label,small_image_label,thumbnail_label,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,gift_message_available,gift_wrapping_available,color,status,is_recurring,visibility,tax_class_id,occasion,apparel_type,sleeve_length,fit,size,length,gender,description,short_description,meta_keyword,custom_layout_update,special_from_date,special_to_date,news_from_date,news_to_date,custom_design_from,custom_design_to,price,special_price,weight,msrp,gift_wrapping_price,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock,low_stock_date,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,stock_status_changed_automatically,use_config_enable_qty_increments,product_name,store_id,product_type_id,product_status_changed,product_changed_websites,website,_media_image,_media_lable,_media_position,_media_is_disabled,media_gallery,super_products_sku,configurable_attributes
admin,base,Clothing,simple,,taka012c-Royal Blue-L,0,taka Knit Top-Royal Blue-L,,,+http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,,taka-knit-top-royal-blue-l,taka-knit-top-royal-blue-l.html,,1 column,Product Info Column,,,, ,Use config,Use config,No,No,Royal Blue,Enabled,No,Not Visible Individually,Taxable Goods,Casual,Knits,Short Sleeve,,L,,Female,”Loose fitting from the shoulders, open weave knit top. Semi sheer. Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.”,The demure taka Knit features a semi sheer open weave and a forgiving silhouette. A nude camisole underneath keeps a stylish but conservative look.,,,3/1/13 0:00,,3/1/13 0:00,,,,210,,1,,,100,0,1,0,0,1,1,1,0,1,1,,,1,0,1,0,1,0,1,0,0,0,1,taka Knit Top-Royal Blue-L,0,simple,,,,,,,,/1/_/1_3.jpg;/2/_/2_2.jpg;/3/_/3_2.jpg;/4/_/4_2.jpg;/5/_/5_2.jpg,,
admin,base,Clothing,simple,,taka012c-Royal Blue-M,0,taka Knit Top-Royal Blue-M,,,+http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,http://dreamatico.com/data_images/girl/girl-8.jpg,,Taka-knit-top-royal-blue-m,Taka-knit-top-royal-blue-m.html,,1 column,Product Info Column,,,, ,Use config,Use config,No,No,Mint,Enabled,No,Not Visible Individually,Taxable Goods,Casual,Knits,Short Sleeve,,M,,Female,”Loose fitting from the shoulders, open weave knit top. Semi sheer. Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.”,The demure taka Knit features a semi sheer open weave and a forgiving silhouette. A nude camisole underneath keeps a stylish but conservative look.,,,3/1/13 0:00,,3/1/13 0:00,,,,210,,1,,,100,0,1,0,0,1,1,1,0,1,1,,,1,0,1,0,1,0,1,0,0,0,1,taka Knit Top-Royal Blue-M,0,simple,,,,,,,,/1/_/1_3.jpg;/2/_/2_2.jpg;/3/_/3_2.jpg;/4/_/4_2.jpg;/5/_/5_2.jpg,,
admin,base,Clothing,configurable,”10,11″,taka012c,1,taka Knit Top,,,+http://7-themes.com/data_images/out/75/7030450-miranda-kerr-smile-girl.jpg,http://7-themes.com/data_images/out/75/7030450-miranda-kerr-smile-girl.jpg,http://7-themes.com/data_images/out/75/7030450-miranda-kerr-smile-girl.jpg,,taka-knit-top,taka-knit-top-1046.html,,1 column,Product Info Column,,,, ,Use config,Use config,No,No,,Enabled,,”Catalog, Search”,Taxable Goods,Casual,Knits,Short Sleeve,,,,Female,”Loose fitting from the shoulders, open weave knit top. Semi sheer. Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.”,The demure taka Knit features a semi sheer open weave and a forgiving silhouette. A nude camisole underneath keeps a stylish but conservative look.,,,3/1/13 0:00,,3/1/13 0:00,,,,210,,,,,0,0,1,0,0,1,1,1,0,1,1,,,1,0,1,0,1,0,1,0,0,0,1,taka Knit Top,0,configurable,,,,,,,,https://pbs.twimg.com/profile_images/378800000767456340/d2013134969a6586afd0e9eab6b0449b.jpeg::taka012c;http://f9view.com/wp-content/uploads/2014/05/Cute-Australian-Girl-Mobile-HD-Wallpapers.jpg::taka012c;,”taka012c-Royal Blue-L,taka012c-Royal Blue-M”,”size,color”

PHP message: PHP Fatal error: Class ‘SoapClient’ not found in …..php on line 134″ while reading response header from upstream, client: 173.197.xxx.xx, server: papertine.com, request: “GET /zeki893.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “papertine.com”

Problem:

"PHP message: PHP Fatal error: Class 'SoapClient' not found in /usr/share/nginx/html/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php on line 134" while reading response header from upstream, client: 173.197.173.75, server: papertine.com, request: "GET /zeki893.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "papertine.com"

Fix:

yum install php-soap

some stuff nginx stuff

https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms

https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx

https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps

https://rtcamp.com/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/

https://serversforhackers.com/nginx-caching/

http://myjeeva.com/php-fpm-configuration-101.html

https://github.com/nicolargo/varnish-nginx-wordpress

Magento Customer List in Back Office Only One Page of Records

Thank you kalpesh!!!! I’ve had problem for a long time only showing one page of Customers in my ‘Manage Customers’ list and I was running 1.8.1.0. I just upgraded to 1.9.2.1 and finally decided to try to tackle this issue while I was working on the server. Found this post, and now I can see all 5000+ customers.
I wonder why Magento hasn’t fixed this issue since version 1.5!!!!

http://ka.lpe.sh/2012/01/05/magento-wrong-count-in-admin-grid-when-using-group-by-clause-overriding-lib-module/

Copy Db.php file from magento / lib / Varien / Data / Collection / Db.php
Paste it to your local directory so the resultant folder structure would look like this:
magento / app / code / local / Varien / Data / Collection / Db.php

Now open this file to edit and replace getSelectCountSql function with below one

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public function getSelectCountSql()
    {
        $this->_renderFilters();

        $countSelect = clone $this->getSelect();
        $countSelect->reset(Zend_Db_Select::ORDER);
        $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
        $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
        $countSelect->reset(Zend_Db_Select::COLUMNS);

        if(count($this->getSelect()->getPart(Zend_Db_Select::GROUP)) > 0) {
            $countSelect->reset(Zend_Db_Select::GROUP);
            $countSelect->distinct(true);
            $group = $this->getSelect()->getPart(Zend_Db_Select::GROUP);
            $countSelect->columns("COUNT(DISTINCT ".implode(", ", $group).")");
        } else {
            $countSelect->columns('COUNT(*)');
        }
        return $countSelect;
    }
Observium____-_Devices

Observium client setup notes

observium server on ubuntu

http://www.observium.org/docs/debian_ubuntu/

observium agent

wget http://x.x.x.x/apache
wget http://x.x.x.x/mysql
wget http://x.x.x.x/nginx

ubuntu

#setup agent
apt-get -y install xinetd wget
cd /etc/xinetd.d/
wget http://x.x.x.x/observium_agent_xinetd
cd /usr/bin/
wget http://x.x.x.x/observium_agent
chmod 775 /usr/bin/observium_agent
mkdir /usr/lib/observium_agent
mkdir /usr/lib/observium_agent/local
service xinetd restart
#monitor with mysql agent
apt-get -y install php5-cli php5-mysql
cd /usr/lib/observium_agent/local
wget http://x.x.x.x/mysql
chmod 775 mysql
echo "<?php \$mysql_user = 'observium_mon'; \$mysql_pass='xxx'; ?>" > /usr/lib/observium_agent/local/mysql.cnf

mysql -e "GRANT SUPER, REPLICATION SLAVE, PROCESS ON *.* TO 'observium_mon'@'localhost' IDENTIFIED BY 'xxx';"
apt-get -y install snmpd
cd /usr/bin/
wget http://x.x.x.x/distro
chmod 775 distro
cd /etc/snmp/
mv snmpd.conf snmpd.conf.orig
wget http://x.x.x.x/snmpd.conf
service snmpd restart

compiling cacti-spine 0.8.8d with mariadb on centos6

get the other libraries snmp, ssl, etc

yum install MariaDB-devel
ln -s /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
ln -s /usr/lib64/mysql/libmysqlclient.so.16.0.0 libmysqlclient.so

then compile
if you get this error during make
common.h:143:18: error: mib.h: No such file or directory

then

cp /usr/include/net-snmp/library/mib.h .

How to guide to get google adwords to work with your prestashop

After googling I couldn’t find any guide to get this to work. I had to piece together bunch of posts and spent a whole night of trial and error came up with this.

In order-confirmation.tpl add to the bottom and fill out your variables from your google adwords

<!-- Google Code for Purchase Conversion Page -->
<script type="text/javascript">
{literal} /* <![CDATA[ */ {/literal}
var google_conversion_id = ENTER_YOUR_ID_HERE;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "ENTER_YOUR_LABEL_HERE";
var google_conversion_value = {$total_pay};
var google_conversion_currency = "{$currencyiso}";
var google_remarketing_only = false;
{literal}/* ]]>*/ {/literal}
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/ENTER_YOUR_ID_HERE/?value={$total_pay}&amp;currency_code={$currencyiso}&amp;label=ENTER_YOUR_LABEL_HERE&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

in OrderConfirmationController.php add below in initContent function

        public function initContent()
        {
                parent::initContent();

                $this->context->smarty->assign(array(
                        'is_guest' => $this->context->customer->is_guest,
                        'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(),
                        'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn()
                ));


$order = new Order($this->id_order);
$currency = new Currency($order->id_currency);
$this->context->smarty->assign(array(
'total_pay' => $order->getOrdersTotalPaid(),
'currencyiso' => $currency->iso_code
));
                if ($this->context->customer->is_guest)
                {

to test if this is working I used the google tag assistant chrome extension and made a bunch of orders using bankwire payment method.

Good luck….

 

 

https://www.prestashop.com/forums/topic/444305-how-to-guide-to-get-google-adwords-to-work-with-your-prestashop/

Error code: ERR_SSL_VERSION_OR_CIPHER_MISMATCH

For Chrome v40: Open chrome://flags Look for “Minimum SSL/TLS version supported.” Choose SSLv3 Click on “Relaunch now” button Open your https page again You will be redirected to a “Your connection is not private” page. If you do not worry about this security issue click on the “Advanced” link. Finally click on “Proceed to (unsafe)”. Solved.

sed tips

sed -i ‘s/fengo/dressholic/g’ * 

sed -i ‘s/Fengo/Dressholic/g’ * 

search folders for file type recurisvely and replace text in file

find . -type f -exec sed -i.bak “s/fengo/dressholic/g” {} \; 

find . -type f -exec sed -i.bak “s/Fengo/Dressholic/g” {} \; 

delete files in folders with extension

find . -name “*.bak*” -type f -delete

In Unix, how do I find a user’s UID or GID?

In Unix, how do I find a user’s UID or GID?

To find a user’s UID or GID in Unix, use the id command. To find a specific user’s UID, at the Unix prompt, enter:

  id -u username

Replace username with the appropriate user’s username. To find a user’s GID, at the Unix prompt, enter:

  id -g username

If you wish to find out all the groups a user belongs to, instead enter:

  id -G username

If you wish to see the UID and all groups associated with a user, enter id without any options, as follows:

  id username