Badges

Badges for Shop-Script

Automatic creation of badges for products

39 ratings

Your review
Installs
600+
Developer

If you Shop-Script version < 7 or you disable setting "Use hook frontend_products", use custom call of plugin in catalog and product page.

1) In template of catalog page find:

{foreach $products as $p}

Before it add

{if $wa->pluginName('autobadge')}{$products = shopAutobadgePlugin::prepareProducts($products)}{/if}

After it add:

{if $wa->pluginName('autobadge')}{$p = shopAutobadgePlugin::getBadges($p)}{/if}

In some theme design you may find:

{foreach $products as $product}

After it add:

{if $wa->pluginName('autobadge')}{$product = shopAutobadgePlugin::getBadges($product)}{/if}

You should get something similar to this:

{if $wa->pluginName('autobadge')}{$products = shopAutobadgePlugin::prepareProducts($products)}{/if}
{foreach $products as $p}
{if $wa->pluginName('autobadge')}{$p = shopAutobadgePlugin::getBadges($p)}{/if}

2) In product page template at the beginning add:

{if $wa->pluginName('autobadge')}{$product = shopAutobadgePlugin::getBadges($product)}{/if}

After it embed plugin in template. By clicking on the link, You will find the templates responsible for the output of products in the catalog and on the product page.