Category

Magento Code Snippets

Magento on Amazon Linux EC2: Automated Script (January 2017)

By | Magento Code Snippets, Website Speed

Through the past 12 months, all of our Magento deployments go on AWS EC2. Their infrastructure, prices, and their ability to auto scale properly make it very attractive for companies to host on AWS. We’ll eventually share our terraform scripts for deploying Magento 1 or Magento 2 on AWS, however today we’ll share the automated script we use to setup Amazon Linux with the right packages in order to run Magento successfully.

Read More

How to Check for HTTPS in Magento phtml Files?

By | Magento Code Snippets

These days our eCommerce pages are littered with third party social bookmarking tools, social media tools, facebook like buttons, add this buttons, and third party marketing scripts. It is easy to lose track of the most basic aspect of your shopping carts’ security: valid HTTPS pages. Here is a quick way to isolate all of these third party utilities and simply avoid using them in the HTTPS pages:

Read More

Bulk Copying Product Attributes in Magento

By | Magento Code Snippets

This static method can copy attributes between products in Magento very fast and relatively secure. We are bypassing the main Magento architecture and accessing the Database directly, but notice we are using the Zend framework for the db query and we still use DB transactions. It accepts the source product ID (not SKU), destination product ID, the array of attribute codes (‘size’, ‘color’, ‘name’, etc.), and the attribute type (‘varchar’, ‘int’, etc.).

Read More