Most likely, at least once you faced the issue when customer session does not work except an account page etc. And usually, it’s not obvious why. Is it a bug? No, actually that is the case when it’s not a bug, it’s kind of feature.
The Magento page cache library contains a simple PHP reverse proxy that enables page content caching. There are two types of distinguished content: private and public.
The “private” content is being served for each user separately and represents the personalized data of a customer. E.g. shopping cart, wishlist, customer addresses, notification messages. This data should not be cached on the server side, and should not be shown to more than one user. The private content is stored on the client’s side by Customer Data JS component (Magento_Customer/js/customer-data.js
). However, this is a topic for another blog post. Today we will focus on the second content type – public content, or rather the cacheable content and its variations in terms of customer grouping.
As everyone who uses Magento knows, in most cases after each order, the customer receives an order confirmation email which contains some useful information about an order that has been just placed. However, sometimes, it would be great to provide some additional information alongside with an order confirmation – such as payment information. There are some ways in Magento for extending emails with custom info, but often they require a lot of time and deep technical knowledges. Let’s leave these ways for people who has an extra time and review the simple and fast way how to add an invoice information to the order confirmation email.
It is a good idea to create a new layout handle in Magento when we need to be able to easily customize styling of pages or enable/disable specific blocks for the customer groups. Here is how.
In this article I’d like to explain how to create multiselect product attribute which will allow to restrict actions depending on a customer group. This feature can be used to hide price of the product, disable product addition to cart or set other restrictions basing on a customer group.
In Magento, order numbers are generated starting from 100000001
and up by default. Many companies want to use a custom value so that customers don’t know exactly how many orders have been placed before. Others need a custom value to match other parts of their system. The field increment_id
is present in various entity tables to store this number.