Full-Sized Screenshot in Chrome

Open Chrome and head to the web page you want to capture. Once there, click the three dots, point to “More Tools,” then click on “Developer Tools.”
Alternatively, you can press Ctrl+Shift+I on Windows or Command+Shift+I on Mac to open the Developer Tools pane.

In the top right corner of the pane, click the three dots icon, then click “Run Command.” Alternatively, press Ctrl+Shift+P on Windows and Command+Shift+P on Mac.

In the command line, type “Screenshot,” then click “Capture full-size screenshot” from the list of commands available.

The image should save automatically, but if you’re prompted to save the screenshot, select a destination on your computer, then click “Save.”

Work around Update NodeJS in Plesk

Prblem no vesrion 10 available in Plesk yet (jan 19)

Enable Node support in Plesk Onyx:

Install the “Node support” simply from your “update and updates” Plesk interface.
Go to your “Node extension” page enable/disable the node versions you need
In case you need additional node versions which does not come with the default node support installation:

Install the Node Version Manager on your server
Install the versions you need e.g. nvm install v10.15.1
Copy paste the node version to plesk cp -R ~/.nvm/versions/node/v10.15.1/ /opt/plesk/node/
Then notify your plesk about your installation plesk sbin nodemng register /opt/plesk/node/v10.15.1/bin/node
Go to your node extension page where all node versions are listed, hit refresh and see

How do I add Azure Active Directory User to Local Administrators Group

You can do this via command line!(IT WORKED!!)

Login to the PC as the Azure AD user you want to be a local admin. This gets the GUID onto the PC.

Log out as that user and login as a local admin user.

Open a command prompt as Administrator and using the command line, add the user to the administrators group. As an example, if I had a user called John Doe, the command would be “net localgroup administrators AzureAD\JohnDoe /add” without the quotes.

Log back in as the user and they will be a local admin now.

Magento 2.x – Required parameter ‘theme_dir’ was not passed (SOLVED)

To solve the issue, you should check in your project design folder (app/design/frontend), and find which difference you have with your database settings.

To get the database installed themes you should do:

select * from theme;

add the corresponding missing directories, or remove them from the theme database table.

Clean cache, and the error should be solved.

Install REDIS with Plesk Onyx

This is a quick guide on how to install both the Redis PHP extension as well as the daemon via SSH on a Plesk Onyx webserver.

REDIS provides memory caching for frequently accessed objects.

 

How to install the plugin:

Log in to the command line via SSH as the ROOT user and run the following commands line-by-line.

CentOS

yum groupinstall 'Development Tools'
yum install tcl wget

Debian and Ubuntu

apt-get install build-essential
apt-get install tcl wget

Download and Compile latest Redis 4:

wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable/
make distclean
make
make test
make install

Install your Redis-server Service:

cd utils/
./install_server.sh

Allow memory overcommit

This will allow REDIS to use more memory than it has been allocated by Plesk if required.

echo "vm.overcommit_memory = 1" >>  /etc/sysctl.conf  && sysctl  -p

Disable transparant_hugepage

echo never > /sys/kernel/mm/transparent_hugepage/enabled

Start and test your Redis service

This will ensure REDIS starts when your server boots and checks to ensure the installation completed successfully.

systemctl start redis_6379
systemctl status redis_6379

Add Guest Order to a Customer Account in Magento

To get the customer_id simply go to Customers > Manage Customers in the Magento admin.

Log in to the MySQL and execute the following queries:

UPDATE sales_flat_order 
 SET customer_id = (YOUR-CUSTOMER-ID), customer_is_guest=0 
 WHERE entity_id = YOUR-ORDER-ID AND customer_id IS NULL
 
UPDATE sales_flat_order_grid 
 SET customer_id = YOUR-CUSTOMER-ID
 WHERE entity_id = YOUR-ORDER-ID AND customer_id IS NULL
 

Magento: Removing Billing Agreements, Recurring Profiles & My Applications links

Magento: Removing Billing Agreements, Recurring Profiles & My Applications links from customer account.

 

Step 1: Go to ( yourPackage/YourTemplate/customer/account/navigation.phtml )

Step 2: Replace the below line

<?php $count = count($links); ?>

**With**

<?php $_count = count($_links); /* Add or Remove Account Left Navigation Links Here -*/
unset($_links['account']); /* Account Info */
unset($_links['account_edit']); /* Account Info */
unset($_links['tags']); /* My Tags */
unset($_links['reviews']);  /* Reviews */
unset($_links['wishlist']); /* Wishlist */
unset($_links['newsletter']); /* Newsletter */
unset($_links['orders']); /* My Orders */
unset($_links['address_book']); /* Address */
unset($_links['OAuth Customer Tokens']); /* My Applications */
unset($_links['downloadable_products']); /* My Downloadable Products */
unset($_links['recurring_profiles']); /* Recurring Profiles */
unset($_links['billing_agreements']); /* Billing Agreements */

?>

Available qyt on the cart page in Magento 1

For the available qyt on the cart page use below code;


	   	<!-- start available qty to product in app\design\frontend\ultimo\colorfabb\template\checkout\cart\item\default.phtml-->
        < ?php

		$productId = $_item->getProductId();
		$product = Mage::getModel('catalog/product')->load($productId);
		if($product->getTypeId() == "configurable"){
			$sku = $_item->getSku();
			$simpProdId = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku)->getId();
			$product = Mage::getModel('catalog/product')->load($simpProdId);
		}

		$quantity = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();
		?>
		<span style="font-weight: bold;color:#ff0000;">Available qty:< ?php echo (int) $quantity;?></span>
		
		<!-- einde available qty to product -->

Upgrade Magento 1 Via SSH

Upgrading Magento via SSH is usually much simpler than via the magento downloader. To upgrade follow these simple steps.

1. First backup. Download a copy of your database, and backup your files. You can make a zip of them.

2. Set the permissions for mage:
chmod +x mage

3. Run mage-setup and sync:
./mage mage-setup .
./mage sync

4. Upgrade Magento:
./mage upgrade-all --force

If that doesn’t work, try:
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force

5. It’s always a good idea to run the indexer and clear the cache:
php shell/indexer.php reindexall
rm -rf downloader/.cache/ var/cache/

You’re all done (as long as there were no errors.

 

Error:

/mage mage-setup .

I receive:

Running initial setup…

Success

Success

Error:

channel-add: Channel ‘community’ already exist!

Do:

in the magento directory :

./mage channel-delete community

./mage mage-setup

Then add the extension again via magento connect

and

Go to “downloader” folder and delete the file “cache.cfg”. Then go back to Magento Connect and retry