Jump to content
thirty bees forum

Introducing Shortcodes module


Recommended Posts

Shortcodes is a premium module for thirty bees supporters that let you use shortcodes in your product description. 

Currently, you can use HTML within descriptions. This is very often used to create link to other products, categories, or pages within your site.  Over time, these hardcoded links can stop working properly (for example if you change rewrite, or move product to different category).

Shortcodes offers solution for this problem. Instead of creating link to product, you can simply add shortcode like

[product id=34] link [/product]

And thirty bees will automatically generate correct link for you. Moreover, the link will use to current context -- if you are browsing your site in french language, the links will also point to french products. The same applies to multi-store context.

Module also contains (optional) functionality to automatically convert HTML links to shortcodes. So if you, or your employee, enter HTML link to some product, module will detect it and replace the <a href="https://www.domain.com/en/category/product.html">link</a> with [product id=34] link [/product] shortcode. Module will also report all internal links that it could not be converted -- so you can go and fix them manually.

Supported shortcodes:

At the moment, only a few shortcodes exists. We plan to implement many more. And not only for linking content. We can use shortcodes to embed more interesting stuff, for example review ratings, product cover image, or what have you. If you have any ideas, let us know!

  • [product id=id] - creates hyperlink to product. Optional parameters: shop, language
  • [product_url id=id] - generates url string for product. Optional parameters: shop, language
  • [category id=id] - creates hyperlink to category. Optional parameters: shop, language
  • [category_url id=id] - generates url string for category. Optional parameters: shop, language 
  • [cms id=id] - creates hyperlink to cms page. Optional parameters: shop, language 
  • [cms_url id=id] - generates url string for cms page. Optional parameters: shop, language  


  • support shortcodes in more contents -- currently, you can use shortcodes only in product short and long descriptions. In the future, we want to add support for other rich contents (category descriptions, cms pages, blogposts,...)
  • support for custom shortcodes registered by modules. Modules (for example beesblog) will be able to register shortcodes that you can use to embed module content, for example link to blog post [blogpost id=100] link [/blogpost]
  • more friendly parameters, so you won't have to use internal ids. For example to generate link to product in fr context, you could write [product id=1 language=fr] instead of [product id=1 language=3]
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • datakick featured this topic
  • datakick pinned this topic
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...