discount_products
This function is used to display discount/free products on the products page that have been added through the Discounts and Coupons section in the control panel.
Example
[%discount_products id:'[@SKU@]' template:'' show_all:'1' limit:'100'%]
[%param *header%]
<div class="alert alert-success">
<h3>BONUS ITEMS! <small>Buy [@name@] Today & Receive These For FREE!</small></h3>
<div class="row">
[%/param%]
[%param *body%]
<div class="col-sm-3">
<div class="thumbnail">
<a href="[%url type:'item ' id:'[@SKU@]'/%]" class="thumbnail-image"><img src="[@thumb@]" alt="[@name@]"></a>
<div class="caption">
<h3 class="title"><a href="[%URL type:'item' id:'[@SKU@]'/%]">[%format type:'text' maxlength:'150' rmhtml:'1'%][@name@][%/FORMAT%]</a></h3>
<div class="text-success"><strong>FREE</strong> With This Item!</div>
</div>
</div>
</div>
[%/param%]
[%param *footer%]
</div>
</div>
[%/param%]
[%/discount_products%]
Usage
The discount_products tag generates a list of products that have been assigned discounts within the Neto by Maropost control panel. By default, we load this tag on the product page. By assigning the products discounts within the control panel, this tag collects those products, which can be displayed to the user in a list.
For more information about the product templates, see the thumb_list
tag.
Parameters
Name | Options | Description |
---|---|---|
limit:'' | Integer | Limit the number of results |
template:'' | Name of the template without the .template.html | Loads the template specified. If there is no value, it will load the default product template |
show_all:'' | HTML & b@se tags | Specifies whether to show all products returned by the function |
ifempty:'' | HTML & b@se tags | If the discount_products returns no results, it'll load this block instead |
*header | HTML & b@se tags | Renders a single usable space above the body |
*body | HTML & b@se tags | Runs an array for result |
*footer | HTML & b@se tags | Renders a single usable space below the body |
Data Tags (body)
Data Tag | Product Field | Example | Description |
---|---|---|---|
`[@acc_code@]`, `[@custom_label@]` | Custom Label/Code | 220/MDC | Product identifier for eBay or accounting integration |
`[@actual_height@]` | Assembled Height | 0.420 | Assembled height in metres |
`[@actual_length@]` | Assembled Length | 0.990 | Assembled length in metres |
`[@actual_width@]` | Assembled Width | 1.200 | Assembled width in metres |
`[@allow_oversell@]` | Inventory Policy | y | **y** - Don't track inventory for this SKU, **n** - Track inventory for this SKU |
`[@arrival_date@]` | Date arrival | 2018-12-31 | Displays date if in the future or nothing if the date is today or in the past (YYYY-MM-DD) |
`[@artisit_author@]` | Author/Artists | John Green | Name of the author or artist |
`[@availability_description@]` | Availability Description | New stock arriving in December | Details of when the product will be available |
`[@available_preorder_quantity@]` | – | 79 | The total of the **Qty on Hand** and **Preorder Qty** |
`[@barcode@]` | UPC/EAN | 9310353080316 | UPC or EAN (Barcode) |
`[@base_unit@]` | Base Unit of Measure | kg | The base unit of measure (ctn, ea, L,ml, cm, m, lb, g, kg) |
`[@base_unit_qty@]` | Base Unit Per Qty | 2.0000 | For display purposes only. Multiplies the actual qty by this qty. For example if base unit qty is 1.9 then a qty of 2 will display as 3.8 |
`[@brand@]` | Brand | Kingston | Product brand |
`[@count@]` | – | 0 | Index number for each child product |
`[@cubic@]` | Cubic | 0.010626 | Shipping length x width x height in cubic metres |
`[@date_created@]` | – | 2017-11-08 | Date the product was created (YYYY-MM-DD) |
`[@display_template@]` | Website Design Template | custom | Name of the theme template assigned to the child product. Blank is default. |
`[@editable_bundle@]` | Editable Kit | n | Is this product an editable kit |
`[@extra@]` | Extra Options | `**Gift Message;*-TEXT_FIELD-;LENGTH=+80` | Non-inventoried extras you offer the customer at the point of purchase. See [Product Import and Export Field Definitions](https://www.netohq.com/support/s/article/Product-Fields-2). |
`[@format@]` | Format | Soft Cover | The format of the product |
`[@has_child@]` | – | 0 | Boolean that when true indicates the SKU has child items / variations |
`[@has_components@]` | – | 0 | Does this product have kit components. **0** - no, **1** - yes |
`[@has_from_price@]` | – | 1 | Is the price of this child product is used on the thumbnail. Normally the cheapest but can be changed to the dearest. **1** - yes, **0** - no |
`[@has_mlp@]` | – | 0 | Does this product have Multi Level Pricing. **0** - no, **1** - yes |
`[@height@]` | Shipping Height | 0.230 | Shipping height in metres |
`[@inpromo@]` | – | 1 | Is the product on promotion. **0** - no, **1** - yes |
`[@instock@]` | – | 1 | Is the product in stock. **0** - no, **1** - yes |
`[@inventory_id@]` | – | 22343 | Unique number for this product |
`[@is_kit@]` | – | 0 | Is this a kitted product. **0** - no, **1** - yes |
`[@itm_gp_id@]` | – | 0 | A unique id for kits/variations/parent items, typically for internal use |
`[@itm_sortorder@]` | Sort Order 1 | 1 | Sort order (ascending order) |
`[@itm_sortorder2@]` | Sort Order 2 | 2 | Sort order (ascending order) |
`[@length@]` | Shipping Length | 0.220 | Shipping length in metres |
`[@limited_stock@]` | – | 1 | Displays true when the stock is lower then the global configuration for "low stock" |
`[@manufacturer_model@]` | Manufacturer model number | A7DC/K | The manufacturers model number of the product |
`[@misc1@]`, `[@misc2@]`, etc | *custom field name* | The Fault in Our Stars | Custom product fields |
`[@mlp_price@]` | Multilevel Pricing | 71.00 | Cheapest multi level price unless regular price is cheaper |
`[@model@]`, `[@name@]` | Name | Turtles All the Way Down | Product name |
`[@notax@]` | Tax Free Product | n | Tax Free Product. **n** - does attract tax, **y** - does not attract tax |
`[@preorder@]` | – | 1 | Is the product on pre-order. **0** - no, **1** - yes |
`[@preorder_date@]` | Date arrival | 2018-12-31 | Returns date if in the future otherwise blank |
`[@preorder_quantity@]` | Preorder Qty | 80 | Quantity of the product available to be purchased on pre-order |
`[@price@]` | Price | 100.00 | Product price based on the group the customer is assigned to. Does not take into account promo pricing |
`[@product_subtype@]` | Subtype | Paperback | The product subtype |
`[@product_type@]` | Type | Book | The product type |
`[@promo_price@]` | Promo Price | 90.00 | Product promotional price based on the group the customer is assigned to |
`[@promo_save@]` | – | 10.00 | Difference between the regular price and the promo price (percentage) |
`[@retail@]` | RRP | 125.00 | Recommended retail price |
`[@rndm@]` | – | wlvvg | Generates a random number each time it is printed in an array |
`[@save@]` | – | 28.00 | Percentage difference between the RRP and the selling price |
`[@save_price@]` | – | 35.00 | Difference between the RRP and the selling price |
`[@service_only@]` | Service Item | n | Service product. Shipping methods and rates are ignored for service items |
`[@sh_type_id@]` | Shipping Category | 1 | ID number of the shipping category. Blank if **Service Item** is selected |
`[@short_description@]` | Short Description | Turtles All the Way Down is a young adult novel written by American author John Green | Short product description (up to 255 characters) |
`[@single_price@]` | – | 110.00 | Price for one of this product |
`[@sku@]` | SKU | 17MD-Black | Product SKU |
`[@start_date@]` | Date arrival | 2018-07-31 | The date the next order from the supplier is due to arrive (YYYY-MM-DD) |
`[@store_price@]` | – | 110.00 | Price for one of this product |
`[@store_quantity@]` | Qty On Hand | 26 | Available stock to sell. It is calculated by the total of all the warehouses minus the committed stock |
`[@subtitle@]` | Subtitle | Fiction | Normally appears below the name of the product on product pages |
`[@tax_inc@]` | Tax Inclusive | y | Price include tax. **n** no, **y** - yes |
`[@thumb@]` | Main | /assets/thumb/17MD-Black.jpg | Main product image thumbnail. If the child product has no image the parent image is returned |
`[@thumb_1@]`, `[@thumb_2@]`, etc | Alt 1, Alt 2, etc | /assets/alt_1_thumb/17MD-Black.jpg | Alt product images thumbnails |
`[@unit@]` | Selling Unit of Measure | g | The selling unit of measure. Can appear on invoices, etc |
`[@url@]` | Product URL | http://www.mysite.com/turtles-all-the-way-down | Product web address |
`[@weight@]` | Shipping Weight | 0.1000 | Shipping weight on kilograms |
`[@width@]` | Shipping Width | 0.210 | Shipping width in metres |