Downgrading .NET 4.8 on Windows Server 2012 R2

Published by John on July 2, 2020

While setting up a server running Windows Server 2012 R2 for a client, I ran into an issue that required me to downgrade from .NET 4.8 to .NET 4.5.

When using Windows Server, .NET updates are installed via Windows Update, which meant finding the correct update for .NET 4.8 and uninstalling it.

Read More  |  Add Comment

Magento 2: Generating an Add to Cart URL for Configurable Products

Published by John on January 23, 2020

When using Magento 2, if you want to add a configurable product to the cart outside of the normal product page, like from within a CMS page, you can’t just use the getAddToCartUrl() function, but instead need to create a special form. This article describes one way of creating an add to cart form for a configurable product that you could adabpt to a custom PHTML template file, such as in your theme or a custom module.

Please carefully read the notices though, as this is just a proof of concept and you should NOT simply copy the code as is!

Read More  |  Add Comment

A Quick Look at How the WordPress “Log Out Everywhere” Button Works

Published by John on October 28, 2019

I got an email from a client that I do Wordpress development for about performance impacts of the “Log Out Everywhere”, which appears in the back end of Wordpress when you are editing a user. I realized that I wasn’t overly familiar with how Wordpress sessions work, so took this as an opportunity to dig into how the actual session gets saved in the database.

Read More  |  Add Comment

Adding a Trailing Slash to CMS Pages in Magento 2

Published by John on October 9, 2019

One of my clients is migrating their Magento 1 website to Magento 2. One feature that is a bit tricky is adding a trailing slash to the end of CMS Pages. For Categories and Products, this is not an issue, but it isn’t as straightforward for CMS Pages.

I wrote an observer that you can plugin to your custom Magento 2 plugin to automatically add the trailing slash to CMS Pages when they are saved, which I think is the simplest and non-obtrusive way of addressing this issue. However, if you know a better/easier way, please feel free to leave a comment.

Read More  |  Add Comment

Magento 2: Targeting a Specific CMS Page using Layout.XML

Published by John on September 1, 2019

With Magento 2, adding a layout update usually starts with creating an XML file, using the layout handle of the item you are trying to target. For example, if you wanted to make a change to all category pages, you could create a file named ‘catalog_category_view.xml’ and then add all your updates to it.

For CMS pages, you can do a general update to ALL cms pages or target a specific page by using the identifier(URL Key) of the CMS page.

Read More  |  Add Comment

« Previous PageNext Page »