AUTOMATIC CREATION OF BADGES FOR PRODUCTS
If you want to catch the buyer focus - create bright product badge. It is clearly, efficient, not intrusive. Create badges for promo products, show product discount, create the countdowns - all this in automatic mode. No more need to manually control badges for thousands of products.
Features
- More than 75 conditions for creating badges.
- Create badges up to product skus.
- Automatically badges generating.
- Output product information to the badge.
- Opportunity to create lots of badges, that can be combined with each other
- Countdown.
- Dynamic badge updating.
- Convenient badge editor.
Opportunities
The plugin allows you to create:
- Badges for categories, sets, types.
- Badges for features, single products, skus.
- Badges depend on quantity, total sum, total sales, etc.
- Badges for users, user categories.
- Badges for current date, time, day of week, time interval.
- Badges, depend on total sales by selected time intervals.
- Badges for different storefronts, etc.
After install you should make mandatory customization of theme design and embed plugin in your template.
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.
Badge editor let you change font family, color, alignment. Also you can set margins for the text to position it where you want.
For most badge shapes you can use more than one text line. Because of this you will be able to style each line of text.
In text field you can use HTML. You can add your own styles, ad link or script. Also you can use Smarty.
Because the badge is displayed for the product, You always have the information about the product stored in the variable {$product}.
You can use this constructions:
- {$product.name} - product name;
- {$product.sku_code} - SKU code;
- {$product.sku_name} - SKU name;
- {$product.summary} - Product summary;
- {$product.create_datetime} - Product create datetime;
- {$product.edit_datetime} - Product edit datetime;
- {$product.rating} - Product rating;
- {$product.rating_count} - Product rating count;
- {$product.price} - Product price;
- {$product.compare_price} - Product compare price;
- {$product.purchase_price} - Product purchase price;
- {shop_currency($product.price, true)} - Product price with currency;
- {shop_currency($product.compare_price, true)} - Product compare price with currency;
- {shop_currency($product.purchase_price, true)} - Product purchase price with currency;
- {shop_currency_html($product.price, true)} - Product price with ruble sign;
- {shop_currency_html($product.compare_price, true)} - Product compare price with ruble sign;
- {shop_currency_html($product.purchase_price, true)} - Product purchase price with ruble sign;
- {$product.margin} - Product price minus Product purchase price;
- {$product.margin_comp} - Product compare price minus Product price;
- {$product.sku_count} - Stock count;
- {$smarty.now|wa_datetime:"humandate"} - current Datetime, processed by function wa_datetime.
- {$product.discount_percentage} - Discount percentage. Calculated from the compare price.
- {counter date="26.09.2017"} - Countdown.
Copy construction you need and paste to the text field.
You also have an access for optional set of custom parameters. Use code:
{$product.params.key},
where key - custom parameter.
Countdown
You can use countdown in the text field. Use code construction:
{counter date="26.12.2017"}
You also can mention time:
{counter date="26.12.2017" time=23:15:17"}