Skillnad mellan versioner av "Forms"

Från Vendre Help
Hoppa till: navigering, sök
(GET ?action=buy_now (multiple products))
(/account_logins.php)
 
(8 mellanliggande versioner av 2 användare visas inte)
Rad 57: Rad 57:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Form field !! Description
+
! Form field !! Method !! Description
 
|-
 
|-
| clear_cart|GET || TODO
+
| clear_cart || GET || TODO
 
|-
 
|-
| products[][products_id]GET|POST || TODO
+
| products[][products_id] || GET/POST || TODO
 
|-
 
|-
| products[][quantity]GET|POST || TODO
+
| products[][quantity] || GET/POST || TODO
 
|-
 
|-
| products[][attributes]GET|POST || TODO
+
| products[][attributes] || GET/POST || TODO
 
|-
 
|-
| products[][text]GET|POST || Pass a field like products[0][text][comment] and a comment field will be stored on the product in the shopping cart.
+
| products[][text] || GET/POST || Pass a field like products[0][text][comment] and a comment field will be stored on the product in the shopping cart.
 
|-
 
|-
| products[][json]GET|POST || Pass a field like products[0][json][data] and a data field be stored on the product in the shopping cart.
+
| products[][json] || GET/POST || Pass a field like products[0][json][data] and a data field be stored on the product in the shopping cart.
 
|-
 
|-
| target|GET || TODO
+
| target || GET || TODO
 
|}
 
|}
  
Rad 100: Rad 100:
 
| target (GET) || TODO
 
| target (GET) || TODO
 
|}
 
|}
 +
 +
==/account_logins.php==
 +
 +
Returns responses in the format <tt>{"error":"error_code","message":"..."}</tt> or <tt>{"success":"success_code","message":"..."}</tt>, or alternatively if the form field <tt>redirect_override</tt> is passed sets a <tt>messageStack</tt> message and redirects to the URL in <tt>redirect_override</tt>.
 +
 +
===POST===
 +
 +
{| class="wikitable"
 +
|-
 +
! Form field !! Description
 +
|-
 +
| customer_action=delete || Action for deleting a login on a customer when logged in as a login admin on the customer.
 +
|-
 +
| customer_login_id || Login to delete.
 +
|-
 +
| password_current || Current password for login admin.
 +
|}
 +
 +
Returns the following result codes: not_logged_in, password_not_matching, permission_denied, cant_delete_logged_in_user, user_deleted.
 +
 +
{| class="wikitable"
 +
|-
 +
! Form field !! Description
 +
|-
 +
| customer_action=create || Action for creating a new login on a customer when logged in as a login admin on the customer.
 +
|-
 +
| customer_login_delivery_address_id || Default delivery address id.
 +
|-
 +
| customer_login_firstname || First name.
 +
|-
 +
| customer_login_lastname || Last name.
 +
|-
 +
| customer_login_email || Email address.
 +
|-
 +
| customer_login_password || Password, the login is disabled if this is not set.
 +
|-
 +
| customer_login_telephone || Telephone number.
 +
|-
 +
| customer_login_extra1 || Extra field.
 +
|-
 +
| customer_login_user_type || Login type, 0 for admin and 1 for regular logins.
 +
|}
 +
 +
Returns the following result codes: not_logged_in, permission_denied, internal_error, email_not_set, invalid_email, duplicate_email, user_created.
 +
 +
{| class="wikitable"
 +
|-
 +
! Form field !! Description
 +
|-
 +
| customer_action=update || Action for updating a login on a customer when logged in as a login admin on the customer.
 +
|-
 +
| customer_login_id || Login to update.
 +
|-
 +
| password_current || Current password for login admin.
 +
|-
 +
| customer_login_delivery_address_id || Default delivery address id.
 +
|-
 +
| customer_login_firstname || First name.
 +
|-
 +
| customer_login_lastname || Last name.
 +
|-
 +
| customer_login_email || Email address.
 +
|-
 +
| customer_login_password || Password.
 +
|-
 +
| customer_login_telephone || Telephone number.
 +
|-
 +
| customer_login_extra1 || Extra field.
 +
|-
 +
| customer_login_user_type || Login type, 0 for admin and 1 for regular logins.  Own user type cannot be changed.
 +
|-
 +
| customer_login_send_mail || Set to non-empty value to email login details to login email address.
 +
|}
 +
 +
Returns the following result codes: not_logged_in, password_not_matching, permission_denied, user_not_updated, cant_update_this_user, email_not_set, invalid_email, duplicate_email, user_updated.
  
 
==/ajax.php==
 
==/ajax.php==
 +
 +
===GET ?mode=session===
 +
 +
Returns status 204 No Content if no other code returns a response.  Can be used for setting session variables and updating shopping carts and the like.
  
 
===GET ?mode=shopping_cart_item_set_data===
 
===GET ?mode=shopping_cart_item_set_data===

Nuvarande version från 10 februari 2026 kl. 12.06

This page describes forms in the system, including their function and their parameters.

Global forms

POST ?action=add_product

TODO

Form field Description
clear_cart TODO
products_id TODO
quantity TODO
full_products_id TODO
attributes_comments TODO
unique_id TODO
id TODO
text Pass a field like text[comment] and a comment field will be stored on the product in the shopping cart.
json Pass a field like json[data] and a data field be stored on the product in the shopping cart.
target (GET) TODO

GET ?action=buy_now

TODO

Form field Description
clear_cart TODO
products_id TODO
text Pass a field like text[comment] and a comment field will be stored on the product in the shopping cart.
json Pass a field like json[data] and a data field be stored on the product in the shopping cart.
target TODO

GET|POST ?action=buy_now (multiple products)

TODO

Form field Method Description
clear_cart GET TODO
products[][products_id] GET/POST TODO
products[][quantity] GET/POST TODO
products[][attributes] GET/POST TODO
products[][text] GET/POST Pass a field like products[0][text][comment] and a comment field will be stored on the product in the shopping cart.
products[][json] GET/POST Pass a field like products[0][json][data] and a data field be stored on the product in the shopping cart.
target GET TODO

GET|POST ?action=update_product

The method is set to GET if products_id and cart_quantity are passed.

TODO

Form field Description
products_id[] TODO
cart_quantity[] TODO
cart_delete[] TODO
id[] TODO
text[] Pass a field like text[0][comment] and a comment field will be stored on the product in the shopping cart.
json[] Pass a field like json[0][data] and a data field be stored on the product in the shopping cart.
referer_url (POST) TODO
target (GET) TODO

/account_logins.php

Returns responses in the format {"error":"error_code","message":"..."} or {"success":"success_code","message":"..."}, or alternatively if the form field redirect_override is passed sets a messageStack message and redirects to the URL in redirect_override.

POST

Form field Description
customer_action=delete Action for deleting a login on a customer when logged in as a login admin on the customer.
customer_login_id Login to delete.
password_current Current password for login admin.

Returns the following result codes: not_logged_in, password_not_matching, permission_denied, cant_delete_logged_in_user, user_deleted.

Form field Description
customer_action=create Action for creating a new login on a customer when logged in as a login admin on the customer.
customer_login_delivery_address_id Default delivery address id.
customer_login_firstname First name.
customer_login_lastname Last name.
customer_login_email Email address.
customer_login_password Password, the login is disabled if this is not set.
customer_login_telephone Telephone number.
customer_login_extra1 Extra field.
customer_login_user_type Login type, 0 for admin and 1 for regular logins.

Returns the following result codes: not_logged_in, permission_denied, internal_error, email_not_set, invalid_email, duplicate_email, user_created.

Form field Description
customer_action=update Action for updating a login on a customer when logged in as a login admin on the customer.
customer_login_id Login to update.
password_current Current password for login admin.
customer_login_delivery_address_id Default delivery address id.
customer_login_firstname First name.
customer_login_lastname Last name.
customer_login_email Email address.
customer_login_password Password.
customer_login_telephone Telephone number.
customer_login_extra1 Extra field.
customer_login_user_type Login type, 0 for admin and 1 for regular logins. Own user type cannot be changed.
customer_login_send_mail Set to non-empty value to email login details to login email address.

Returns the following result codes: not_logged_in, password_not_matching, permission_denied, user_not_updated, cant_update_this_user, email_not_set, invalid_email, duplicate_email, user_updated.

/ajax.php

GET ?mode=session

Returns status 204 No Content if no other code returns a response. Can be used for setting session variables and updating shopping carts and the like.

GET ?mode=shopping_cart_item_set_data

TODO

Form field Description
products_id TODO
key TODO
text TODO
json TODO

/checkout.php

?removeProductId

TODO

Form field Description
removeProductId TODO

?changeQuantityProduct

TODO

Form field Description
changeQuantityProduct TODO
quantity TODO
text Pass a field like text[comment] and a comment field will be stored on the product in the shopping cart.
json Pass a field like json[data] and a data field be stored on the product in the shopping cart.