Both sides previous revisionPrevious revisionNext revision | Previous revision |
v:2.0:cheat_sheet [2022/08/01 09:44] – [View Data] adam | v:2.0:cheat_sheet [2025/01/27 18:40] (current) – [Standard Product Options] foxybrett |
---|
: **Accepts:** A full URI to an image, starting with ''http://'' or ''https://'', //or// a relative path to the image from the store's domain (as configured in the store settings). __Limited to 500 characters in length.__ | : **Accepts:** A full URI to an image, starting with ''http://'' or ''https://'', //or// a relative path to the image from the store's domain (as configured in the store settings). __Limited to 500 characters in length.__ |
: **Examples:** ''&image=http://example.com/path/to/image.jpg'', ''&image=local/path/to/image.png'', ''<input type="hidden" name="image" value="http://example.com/path/to/image.jpg">'' | : **Examples:** ''&image=http://example.com/path/to/image.jpg'', ''&image=local/path/to/image.png'', ''<input type="hidden" name="image" value="http://example.com/path/to/image.jpg">'' |
: **Notes:** Images will //not// be resized, but they will automatically be securely cached, so you don't need to worry about security warnings. | : **Notes:** Images will //not// be resized, but they will automatically be securely cached, so you don't need to worry about security warnings. Note also that Foxy's cache is short-term (hours to days), so if you're passing dynamically-generated images, you'll need to keep those images available on your end for Foxy to re-retrieve as necessary. |
; ''url'' | ; ''url'' |
: **Description:** A URL for the product, displayed in the cart. | : **Description:** A URL for the product, displayed in the cart. |
: **Description:** <wrap round tip>You may add any additional attributes to any product you’d like.</wrap> For example, you can add ''&color=green&size=XXL''. If an attribute is passed in with a name not otherwise reserved, it will be added as a product option. | : **Description:** <wrap round tip>You may add any additional attributes to any product you’d like.</wrap> For example, you can add ''&color=green&size=XXL''. If an attribute is passed in with a name not otherwise reserved, it will be added as a product option. |
: **Accepts:** Any characters. Custom name attribute limited to 100 characters and the value is limited to 1024 characters. | : **Accepts:** Any characters. Custom name attribute limited to 100 characters and the value is limited to 1024 characters. |
| : **Notes:** A single product can have a maximum of 100 custom product options |
| |
| ==== Special Product Options ==== |
| |
| These options are specified at the product level, but serve a special purpose, separate to the cart itself, such as for analytics |
| |
| ; ''_ga_*'' |
| : **Description:** Google Analytics product level attributes. If set, will be utilised in any Google Analytics calls made through our native integration that includes item details. |
| : **Supported Option Names:** ''_ga_item_id'', ''_ga_item_name'', ''_ga_affiliation'', ''_ga_item_brand'', ''_ga_item_category'', ''_ga_item_category2'', ''_ga_item_category3'', ''_ga_item_category4'', ''_ga_item_category5'', ''_ga_item_list_id'', ''_ga_item_list_name'', ''_ga_item_variant'', ''_ga_location_id'' |
| : **Accepts:** See the [[https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#add_to_cart|GA documentation for reference]] for what the values should be. __Limited to 255 characters in length.__ |
| : **Example:** ''&_ga_item_category2=Clothing'' |
| : **Notes:** These attributes are hidden from the cart automatically, so customers will not see them visually on the cart, checkout or receipt, or in the administration. |
| |
| |
==== Product Discounting Options ==== | ==== Product Discounting Options ==== |
| |
; ''future_subscription_totals_by_date''\\ ''future_subscription_totals_by_date.total''\\ ''future_subscription_totals_by_date.total_item_price''\\ ''future_subscription_totals_by_date.total_shipping''\\ ''future_subscription_totals_by_date.total_tax''\\ ''future_subscription_totals_by_date.total_weight'' | ; ''future_subscription_totals_by_date''\\ ''future_subscription_totals_by_date.total''\\ ''future_subscription_totals_by_date.total_item_price''\\ ''future_subscription_totals_by_date.total_shipping''\\ ''future_subscription_totals_by_date.total_tax''\\ ''future_subscription_totals_by_date.total_weight'' |
: **Description:** The totals for subscription products with a start date or next transaction date in the are grouped together here for the cart display. | : **Description:** The totals for subscription products with a start date or next transaction date in the are grouped together here for the cart display. |
| ; ''gift_cards''\\ ''gift_cards.{gift_card_code}''\\ ''gift_cards.{gift_card_code}.amount''\\ ''gift_cards.{gift_card_code}.id''\\ ''gift_cards.{gift_card_code}.code_id''\\ ''gift_cards.{gift_card_code}.is_applied''\\ ''gift_cards.{gift_card_code}.name''\\ ''gift_cards.{gift_card_code}.current_balance'' |
| : **Description:** Gift cards associated with this cart. The ''{gift_card_code}'' is the code value used by the customer to add the gift card. |
| : **Note:** The ''current_balance'' attribute will not factor in the discount that __could__ apply from the cart or checkout. On the web receipt, ''current_balance'' will take into account the discount from that transaction, and any other uses of the gift card since then (if the receipt is being revisited). The email receipt will be the current balance of the gift card at the time the transaction was completed. |
; ''has_eligible_coupons'' | ; ''has_eligible_coupons'' |
: **Description:** If the cart contains products which can have a coupon applied to them. | : **Description:** If the cart contains products which can have a coupon applied to them. |
; ''items[].code'' | ; ''items[].code'' |
: Product code or sku. | : Product code or sku. |
| ; ''items[].parent_code'' |
| : Parent product code or sku. |
; ''items[].delivery_type'' | ; ''items[].delivery_type'' |
: The delivery type of this product. | : The delivery type of this product. |
; ''items[].width'' | ; ''items[].width'' |
: Reserved for future use. | : Reserved for future use. |
| ; ''language'' |
| : ** Description: ** The English name for the language of the cart as set by the template set (like ''english'', ''french'', ''german'' etc). Can be blank if using the default template set. |
| ; ''language_iso_code'' |
| : ** Description: ** The 2 character ISO code for the language of the cart as set by the template set (like ''en'', ''fr'', ''de'' etc). Can be blank if using the default template set. |
; ''loading_coupons''\\ ''loading_quantity''\\ ''loading_shipping_results''\\ ''loading_taxes''\\ | ; ''loading_coupons''\\ ''loading_quantity''\\ ''loading_shipping_results''\\ ''loading_taxes''\\ |
: **Description:** Used for determining if a loading animation should currently be displayed. | : **Description:** Used for determining if a loading animation should currently be displayed. |