Have you ever felt a need to show a Smart Offer on a specific post or page – other than default page options listed in Smart Offers configuration? Or probably your theme is not fully WooCommerce compatible and it does not show Smart Offers on designated pages?
Smart Offers’ version 1.7 onward allows you to show an offer on any page or post with a simple WordPress shortcode.
This means you can now configure offers and show them anywhere on your site. It’s a powerful feature, so here’s an explanation on how to use it.
The Smart Offer Embed Shortcode
Use the shortcode
to embed an offer on any page or post.
The “display_as” parameter tells how to display the offer. The value here can be either “inline” or “popup”.
BTW, if you don’t provide any value for this parameter, Smart Offers will use your default choice from offer settings in “Which page/pages to show offer on -> Show offer as”.
[so_show_offers display_as='popup'] [so_show_offers display_as='inline']
The “offer_ids” parameter will show one of the offers from the list of offer IDs passed. If no value is passed, then Smart Offers will search through all offers with option “Any other page where shortcode is added” ticked under “Which page/pages to show offer on -> Show offer on” and show one offer that meets all the rules and settings.
[so_show_offers offer_ids='123'] [so_show_offers offer_ids='123, 124']
Setting Up Offers and Embedding the Short Code
Imagine you want to show an upsell for a product – but on the product’s page itself after it is added to cart. The first thing you want to do is create a Smart Offer, with offer rule saying ‘Cart contains product‘ and selecting the main product in question.
The most important step is to tick the “Any other page where shortcode is added” option under where this offer should be shown.
Now, add shortcode
in the product description – wherever you want – may be at the top… And save.
Now, when your customer adds your main product to cart, and is redirected back to the product page with success message, Smart Offers will show them the upsell offer.
You can even show the upsell on any other related product’s description.. For example, “Since you also have the T-shirt in your cart, you can buy this Cap for 20% off. Click here to add it to cart”. (And you embed the offer shortcode on “Cap” page…)
You get full flexibility! Embed the short code anywhere. Configure the offer with rules of your choice!
Resolving Theme Compatibility issues with WooCommerce Smart Offers
Offer not showing on Cart/Checkout page?
- You have an offer setup to show on Cart or Checkout page but the offer isn’t showing up at all.
- Firstly, check whether the same offer is showing up on ‘My Account’ page by ticking the option ‘My Account‘ in ‘Show this offer on‘. If offer shows up on ‘My Account’ page, then it means that the theme you are using is not fully compatible with WooCommerce.
- To solve theme compatibility issues, switch to a default WordPress theme and test whether offer is showing. If default theme shows the offer, add the shortcode
in cart/checkout page description before the Woocommerce shortcode. You will see offers showing up!
You can go through detailed description on Smart Offers Shortcode in documentation here.
What’d you say?
Hope you liked our shortcode addition in Smart Offers!!!
Do use this new feature and tell us how you use shortcodes by posting a comment! You can also share how you are using Smart Offers!
Need help? Got questions? Write to us here.
(Editor’s note: You can even address your Smart Offers questions to Rupali – the lead developer of the plugin, and author of this blog post!)