Tips Blog

Welcome to our technical tips blog – solutions and answers for numerous Joomla, Wordpress, Magento, Linux, MySQL and other problems.
 

Magento2 sorting collection order

Collections in Magento2 can be a real pain. Was having problems with sorting a category getProductCollection collection into position order! The products were just displaying in random order(or rather ID number order). $categoryId=891; $category = $this->_categoryFactory->create(); $category->load($categoryId); $products = $category->getProductCollection();$products->addAttributeToSelect(‘*’);$products->setOrder(“cat_index_position”,’ASC’);

read more

How to test Magento2 REST API with Postman

This assumes you’ve created a new Integration in Magento 2 by going to M2 Dashboard -> System -> Integrations. Create a new one, give it Resource Access to ALL and save. Then Authorise it, then it’ll create new consumer_key,consumer_secret,access_token,token_secret values

read more

Adding a sub-domain Website to Siteground

I found problems adding an already used domain as a website eg. if startnet.co.uk was already on Siteground it didn’t like me adding test.startnet.co.uk when creating a website. So found this solution: Login to Siteground. Add a new Website Pick

read more

Save Streetview image on Google Maps

Wanted to say a Google Maps Streetview image – without all the buttons and tags. Use the code below, then use Snipping Tool to save the image. Note: the only problem are the new hover icons, I couldn’t get the

read more

How to resize a Google Cloud drive

Writing this up as got caught by a wrong command on the actual Google docs – was resizing a disk from 100Gb to 300Gb. You resize the disk in the Google Cloud admin console. Then use “growpart” to resize the

read more