This plugin offers two essential shortcodes that empower you to effortlessly display product cost and profit directly on your WooCommerce.
- [alg_wc_cog_product_profit]: This shortcode unveils the actual profit generated by a specific product. Use Case: You might use this shortcode on product pages or in custom templates to show customers or admins the profit margin directly.
- [alg_wc_cog_product_cost]: This shortcode showcases the associated cost of a product. Use Case: You can use this shortcode in admin areas or specialized customer sections where cost transparency is needed, such as wholesale customer portals
Shortcode Parameters
Both shortcodes share two key parameters
- product_id: This parameter allows you to specify the ID of the product for which you want to display the cost or profit. If left empty, the shortcode will automatically attempt to retrieve the current product’s ID.
- html_template: This parameter provides customization options for the way the cost or profit is displayed. By default, it uses a simple <span> tag to wrap the content. You can modify this code to style the output and integrate it seamlessly into your product pages.
Profit Template (Optional)
The [alg_wc_cog_product_profit] shortcode offers an additional optional parameter
- profit_template: This parameter controls the format in which the profit is displayed. The default format showcases both the absolute profit value (%profit%) and the profit margin as a percentage (%profit_percent%). You can customize this template to suit your preferences.
Benefits of Utilizing Cost of Goods Shortcodes
Integrating these shortcodes into your WooCommerce store provides a multitude of benefits
- Enhanced Transparency: Customers gain a clearer understanding of product value by visualizing both the cost and the profit associated with each item.
- Informed Pricing Strategies: By readily viewing profit margins, you can make strategic pricing decisions to optimize your revenue and profitability.
- Data-Driven Decisions: Access to real-time cost and profit information empowers you to identify your most profitable products and tailor your marketing efforts accordingly.