Magento 2 Experts — Hyvä Theme, Tailwind CSS & SEO from a Single Source ›

Magento 2 CMS Block Targeting by Customer Group, Country and Store View

Magento 2 Extension Hyvä Ready Magento 2.4.x

SKU: CMSBLOCKCUSTOMERGROUP1

  • serve CMS blocks by customer group, store view, country and login status
  • show-if and hide-if rules per block
  • fallback block and preview as group and country
  • cache context without an external geo service
Auf Lager
€99.00

Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.

No download, but personal setup

No download, but personal setup. This product is not a downloadable software package for self-installation. With your order, you commission Mironsoft to individually set up this module in your shop. We will get in touch with you within 2 business days — we'll sort out the details and payment together then.

This offer is aimed at business owners and companies running a Magento 2 shop.

6 features

Magento 2 CMS Block Targeting: the right content for every visitor

Trade buyers need different notices than consumers, guests different ones than regular customers, visitors from Austria different ones than from Germany. With the Mironsoft Magento 2 CMS block targeting you define per block who should see it. The blocks remain ordinary CMS blocks and are still embedded via layout, widgets and Page Builder. The module works in the Hyvä theme without an additional library.

Customer group

A block applies to one or several customer groups, including logged-out guests.

Store view

Limit a block to single store views without creating it several times.

Country

Rules by country: for customers from the shipping or billing address, for guests from a header set by your CDN or server.

Login status

Distinguish logged in and logged out, for example for registration prompts or account notices.

Show or hide

Per rule you choose whether the block appears for the group or disappears for it.

Fallback block

Whoever does not meet the rule gets another block instead of a gap.

Why block targeting

Why Magento 2 CMS block targeting makes sense

Many shops serve several audiences with one catalog. The trade buyer should see the tier price information, the consumer the shipping discount, the guest the welcome voucher. Magento itself has no audiences for CMS blocks, so many shops resort to duplicate pages, theme code or customer-group categories.

Magento 2 CMS block targeting moves this decision into the admin. Marketing creates blocks, selects audiences and needs neither developers nor a deployment. Each piece of content stays a single block with a clear name instead of vanishing in branching templates.

01Rules

Magento 2 CMS Block Targeting: define rules per block

You find Magento 2 CMS block targeting in the CMS block as the tab Audience. There you select customer groups, store views, countries and login status and decide whether the rule shows or hides the block. The module combines several conditions with and, and values within one selection with or. Without a rule the block stays visible to everyone as before, so existing blocks do not change.

  • Customer group, store view, country and login status combinable
  • Show-if or hide-if per block
  • Blocks without a rule stay visible to everyone
CMS › Blocks › Audience
Customer groups
Trade (example)
Country
DE, AT (example)
Mode
show if matching
Configuration › Source of country
Guest source
CDN header (example)
Customer source
shipping address
Country unknown
show fallback
02Country

Magento 2 CMS Block Targeting country rules without an external geo service

For logged-in customers Magento 2 CMS block targeting takes the country of the shipping or billing address, depending on the setting. For guests it reads a header that your CDN or web server already sets, for example a country header. There is no query to an external service, and IP addresses are not stored. If the header is missing, the behavior you define applies: show the block, hide it or use the fallback.

  • Country from the address of logged-in customers or from a header for guests
  • No external service queries, no stored IP addresses
  • Behavior for a missing country configurable
03Fallback and preview

Magento 2 CMS Block Targeting: fallback block and preview

If a visitor does not meet the Magento 2 CMS block targeting rule, a fallback block can appear, for example the general banner instead of the trade notice. With the preview you view the page as if you were in a certain customer group and country. The preview is available only to logged-in admin users and changes no data. An overview lists all blocks with rules.

  • Fallback block instead of an empty area
  • Preview as customer group and country, admin login only
  • Overview list of all blocks with rules
Audience › Fallback · Preview
Fallback block
general banner (example)
Preview as
Trade, AT (example)
Blocks with rulesOverview
Configuration › Mironsoft › CMS Block Targeting
Cache variants
groups × used countries
Other countries
one shared variant
Rule change
block tags renewed
04Cache

Cache and performance of Magento 2 CMS Block Targeting

The Magento full page cache already varies by customer group. For country rules the module adds the country to the cache context for Magento 2 CMS block targeting, but only the countries your rules actually use; all others fall into one group. The number of cache variants stays small, and pages are still delivered fast. When you change a rule, the module renews the cache tags of the affected block.

  • Customer group uses the existing cache context
  • Only used countries form their own cache variants
  • Rule changes renew the block cache tags precisely
Use cases

Where Magento 2 CMS block targeting helps in daily shop work

Typical situations in which a block should not be the same for everyone.

Trade and retail customers

Tier price notice and minimum quantities only for the trade group, a shipping offer for consumers.

Encouraging registration

Guests see a block with registration benefits, logged-in customers the hint about their account.

Country-specific notices

Customs and shipping information appears only for visitors to whom it applies.

Several store views

A block meant for one language or market is not created several times.

Comparison

Magento 2 CMS Block Targeting: without and with the module

The difference to duplicate pages and theme code.

TopicWithout the moduleWith Mironsoft CMS Block Targeting
AudiencesDuplicate blocks or theme codeRules per block in the admin
CountryCustom developmentCountry rule with header source
MaintenanceDeveloper requiredMarketing maintains it
PreviewWith test accountsPreview as group and country
CacheOften disabled or error-proneContext only for rules in use
Setup

How we set up your Magento 2 CMS Block Targeting

The process after your order.

1

Briefing

You tell us customer groups, countries and the blocks to be targeted.

2

Installation

We install Magento 2 CMS block targeting and clarify where the country for guests comes from, for example the CDN header.

3

Rules

Together we create the first rules and fallback blocks.

4

Testing

We test guest, trade buyer and regular customer, country changes, missing country data and the page cache.

5

Handover

Your team gets an introduction to rules, preview and overview.

Differences

Differences to scheduling, page access and product restriction

The Mironsoft CMS Block Scheduler switches blocks by time. The CMS page restriction regulates access to whole pages, the product restriction by customer group concerns products, and the country store switcher routes visitors to matching store views. Magento 2 CMS block targeting, by contrast, selects single blocks by audience.

The modules can be combined, for example a trade banner only in December. The output remains ordinary block output, without jQuery and without an additional library.

05How the purchase works

No download, personal setup instead

CMS Block Targeting is not listed here as a ready-made download file for self-installation. The purchase is a service commission: we get in touch after the purchase, install the module in your shop and agree on rules, country source and fallbacks together with you.

Important to know

Your purchase does not include a download link. We will get in touch with you within 2 business days — we'll sort out the details and payment together then. This offer is aimed at business owners and companies running a Magento 2 shop.

FAQ

Frequently asked questions

Everything important about rules, country, cache and how the purchase works.

How can I show a CMS block only to one customer group in Magento 2?
In the Audience tab of the block you select the customer groups and set the mode to show. Magento 2 CMS block targeting hides the block for everyone else.
How can I hide a CMS block for guests in Magento 2?
You choose the mode hide and set the login status to logged out. Logged-in customers still see the block.
How can I show a CMS block by country in Magento 2?
You select the countries in the rule. For customers the country of the address applies, for guests a header set by your CDN or web server.
Is an external geo service queried?
No. Magento 2 CMS block targeting only reads a header that your infrastructure sets and stores no IP addresses.
What happens if the country is unknown?
You define the behavior: show the block, hide it or output the fallback block.
Does the page cache stay active?
Yes. The customer group uses the existing Magento cache context. Country rules create variants only for the countries your rules use.
Can I combine several conditions?
Yes. Different conditions are linked with and, several values within one condition with or.
Does Magento 2 CMS block targeting work with Hyvä?
Yes, the blocks are output as usual. The module needs neither jQuery nor Knockout nor additional JavaScript.
How does this differ from the CMS Block Scheduler?
The scheduler controls blocks by time. This module controls them by audience. Both can be combined.
Can I download and install the module myself?
No. This offer is not a download product. After the purchase we install and configure the module personally in your shop.
Write Your Own Review
You're reviewing: Magento 2 CMS Block Targeting – Mironsoft
loader
Loading...

You submitted your review for moderation.

This form is protected by reCAPTCHA - the Google Privacy Policy and Terms of Service apply.

Magento 2 CMS Block Targeting – Mironsoft

Magento 2 CMS Block Targeting – Mironsoft

€99.00