Add Article Directly to Shopping Cart

Inhaltsverzeichnis

Description

  • PepperShop supports the ability to add articles to the current session’s shopping cart directly via a URL. This gives you the option to add an article directly configured to the shopping cart from an external page with one click.

  • This guide describes the procedure for application. Prerequisites: Understanding URL structure, knowledge of syntax, variables and replacements.

  • Since PepperShop version 5.0.0.29, additional features have been provided (support for articles with: variants, options, linked main articles, text input fields)

Procedure / Syntax

URL

To add an article directly to the shopping cart in PepperShop, please assemble a URL as in the following example: https://{url_zum_shop}/shop/USER_BESTELLUNG_AUFRUF.php? darstellen=1&add_artikel=true&in_wk_artikel_id[0]={artikel_id}&in_wk_anzahl[0]={anzahl}

Required Parameters

The variable {url_zum_shop} must be replaced. The following required GET parameters are included:

  • darstellen = 1 (static value)
  • add_artkel = true (static value - string)
  • in_wk_artikel = Array with article ID per article, e.g. in_wk_artikel_id[0]=65 (Key in array = running number for each article to be inserted)
  • in_wk_anzahl = Array with quantity per article, e.g. in_wk_anzahl[0]=1 (Key in array = running number for each article to be inserted)

Optional Parameters

The following optional GET parameters are also available:

  • in_wk_parent_id
    • If an article is added to the shopping cart as a linked option, specify the a_b_ID of the linked main article per article in this array variable, e.g. in_wk_parent_id[1]=27 (Key in array = running number for each article to be inserted). Attention: The use scenario here is somewhat unusual, since the a_b_ID (article-order ID) of the article already in the shopping cart is actually not yet known…
  • in_wk_variationen
    • Description: If standard PepperShop variants per article should be added to the shopping cart. The values must be urlencoded, best copied from article form in article detail display.
    • Syntax: in_wk_variationen[{artikel_id}][{variantenbezeichnung_mit_gruppe}]=16
    • Example: in_wk_variationen[74][Gr%C3%B6sse%3C%3A%3A%3Enormal+%2830cm%29]=16
  • in_wk_optionen
    • Description: If standard PepperShop options per article should be added to the shopping cart. The values must be urlencoded, best copied from article form in article detail display.
    • Syntax: in_wk_optionen[{artikel_id}][{optionsbezeichnung}]={preis}
    • Example: in_wk_optionen[74][mit+Besteck]=0.5
  • in_wk_texteingabefelder
    • Description: If PepperShop text input field data per article should be added to the shopping cart. Important: Omitted elements must still be supplied with an empty value for {textwert}, since the numbering otherwise contains no gap
    • Syntax: in_wk_texteingabefelder[{artikel_id}][{element_lauf_nr}]={textwert}
    • Example: in_wk_texteingabefelder[96][0]=Glarotech+Gmbh

Example URLs

Examples with various options for the standard article assortment in PepperShop:

  • Standard: Add one article once to the shopping cart:
    • 1 x red PepperShop pepper pod
    • https://{url_zum_shop}/shop/USER_BESTELLUNG_AUFRUF.php? darstellen=1&add_artikel=true&in_wk_artikel_id[0]=98&in_wk_anzahl[0]=1
  • Quantity: Add one article with larger quantity to the shopping cart:
    • 3x green PepperShop pepper pod:
    • https://{url_zum_shop}/shop/USER_BESTELLUNG_AUFRUF.php? darstellen=1&add_artikel=true&in_wk_artikel_id[0]=97&in_wk_anzahl[0]=3
  • PepperShop Standard Variants and Options: Add one article with variants and options to the shopping cart:
    • 1x Pizza Gambretti (Article ID = 74)
    • Size ‘normal’ (variant) - CHF 16.-
    • With cutlery (option) - CHF 0.50
    • https://{url_zum_shop}/shop/USER_BESTELLUNG_AUFRUF.php? darstellen=1&add_artikel=true&in_wk_artikel_id[0]=74&in_wk_anzahl[0]=1& in_wk_variationen[74]Gr%C3%B6sse%3C%3A%3A%3Enormal+%2830cm%29]=16&in_wk_optionen[74][mit+Besteck]=0.5
  • Text Input Fields: Add one article with five text input fields (and one variant) to the shopping cart:
    • 1x Stamp Professional (Article ID = 96)
    • Ink color (variant) = (blue) - no surcharge
    • Line 1: Glarotech GmbH
    • Line 2: Toggenburgerstr. 156
    • Line 3: CH-9500 Wil
    • Line 4: empty (must be supplied!)
    • Line 5: Tel. 071 923 08 58
    • https://{url_zum_shop}/shop/USER_BESTELLUNG_AUFRUF.php? darstellen=1&add_artikel=true&in_wk_artikel_id[0]=96&in_wk_anzahl[0]=1&in_wk_variationen[96][Stempelkissen%3C%3A%3A%3Eblau+%28Druckfarbe%29]=0&in_wk_texteingabefelder[96][0]=Glarotech%20GmbH&in_wk_texteingabefelder[96][1]=Toggenburgerstr.+156&in_wk_texteingabefelder[96][2]=CH-9500+Wil&in_wk_texteingabefelder[96][3]=&in_wk_texteingabefelder[96][4]=Tel.+071+923+08+58
  • Linked Main Articles (Parents): Add one main article with linked sub-articles as related variants to the shopping cart:
    • 1x Pizza homemade large (40cm) (Article ID = 83)
    • 1x Red wine Vitiano, red (7dl) (Article ID = 94)
    • ATTENTION: This example requires an a_b_ID of a main article already in the shopping cart with Article ID = 83, here = &in_wk_parent_id[1]=27! What usually requires programming to find this, or work via module Direct external integration.
    • https://{url_zum_shop}/shop/USER_BESTELLUNG_AUFRUF.php? darstellen=1&add_artikel=true&in_wk_artikel_id[0]=83&in_wk_anzahl[0]=1&in_wk_artikel_id[1]=94&in_wk_anzahl[1]=1&in_wk_parent_id[0]=0&in_wk_parent_id[1]=27

Further Help

Do you have questions or need assistance? Do you have special requirements or desire a custom solution for your system? Our support team is happy to help. Support services are charged based on time and material at CHF 195.- / hour. Here is how to reach us:

Other Useful Pages

🌶️
🔥
🌶️