Satchmo Views¶
URLs by Name¶
Here’s an overview showing the name and view for URLs in Satchmo.
URL paths are relative to SHOP_BASE.
-
satchmo_shop_home
¶ URL: / View: satchmo_store.shop.views.home.home()
-
satchmo_category_index
¶ URL: /<CATEGORY_SLUG>/ View: product.views.category_index()
-
satchmo_category
¶ URL: /<CATEGORY_SLUG>/slug1/slug2/.../<slug>/ View: product.views.category_view()
-
satchmo_product
¶ URL: /<PRODUCT_SLUG>/<slug>/ View: product.views.get_product()
-
satchmo_cart
¶ URL: /cart/ View: satchmo_store.shop.views.cart.display()
-
satchmo_checkout-step1
URL: /checkout/ View: payment.views.contact.contact_info_view()
-
satchmo_balance_remaining
¶ URL: /checkout/balance/ View: payment.views.balance.balance_remaining_order()
-
satchmo_balance_remaining_order
¶ URL: /checkout/balance/<id>/ View: payment.views.balance.balance_remaining()
-
satchmo_charge_remaining
¶ URL: /checkout/custom/charge/ View: payment.views.balance.charge_remaining_post()
-
satchmo_charge_remaining_post
¶ URL: /checkout/custom/charge/<id>/ View: payment.views.balance.charge_remaining()
-
satchmo_checkout_auth_required
¶ URL: /checkout/mustlogin/ View: payment.views.contact.authentication_required()
-
satchmo_checkout-success
URL: /checkout/success/ View: payment.views.checkout.success()
-
satchmo_contact
¶ URL: /contact/ View: satchmo_store.shop.views.contact.form()
-
satchmo_contact_thanks
¶ URL: /contact/thankyou/ View: Contact thanks
-
satchmo_order_history
¶ URL: /history/ View: satchmo_store.shop.views.orders.order_history()
-
satchmo_quick_order
¶ URL: /quickorder/ View: satchmo_store.shop.views.cart.add_multiple()
-
satchmo_search
¶ URL: /search/ View: satchmo_store.shop.views.search.search_view()
-
satchmo_order_tracking
¶ URL: /tracking/ View: satchmo_store.shop.views.orders.order_tracking()
Use of Generic Django Views¶
Contact thanks¶
The view satchmo_store.shop.views.contact.form()
redirects the user to
this page after sending the email successfully.
url: satchmo_contact_thanks
template: shop/contact_thanks.html context: None
Views by App¶
payment¶
-
payment.views.balance.
balance_remaining
()¶ Url: satchmo_balance_remaining
Template: shop/checkout/balance_remaining.html Context: form: an instance of payment.forms.PaymentMethodForm
paymentmethod_ct: the length of the return value of payment.active_gateways() order:
-
payment.views.balance.
balance_remaining_order
()¶ Url: satchmo_balance_remaining_order
Template: shop/checkout/balance_remaining.html Context: see balance_remaining’s context.
-
payment.views.balance.
charge_remaining
()¶ Displays a confirmation form for the order with id id.
Url: Template: payment/admin/charge_remaining_confirm.html
Context: form: an instance of payment.forms.CustomChargeForm
-
payment.views.balance.
charge_remaining_post
()¶ Handles the submit response to
payment.views.balance.charge_remaining()
.Url: Template: payment/admin/charge_remaining_confirm.html
Context: form: an instance of payment.forms.CustomChargeForm
-
payment.views.contact.
authentication_required
()¶ Url: satchmo_checkout_auth_required
Template: shop/checkout/authentication_required.html Context: None
-
payment.views.contact.
contact_info_view
()¶ Url: Template: shop/checkout/form.html
Context: form: an instance of payment.forms.PaymentContactInfoForm
country: paymentmethod_ct: the length of the return value of payment.active_gateways(), passed through the payment_choices signal
product¶
-
product.views.
get_product
()¶ Url: Template: product/product.html
Context: product: the product with slug slug current_product: clone of product for product variations default_view_tax: see default_view_tax
.sale: see sale
.error_message: errors
satchmo_store¶
-
satchmo_store.shop.views.cart.
add_multiple
()¶ Url: Template: shop/multiple_product_form.html
Context: form: an instance of satchmo_store.shop.forms.MultipleProductForm
-
satchmo_store.shop.views.cart.
display
()¶ Url: Template: shop/cart.html
Context: cart: cart default_view_tax: see default_view_tax
.error_message: errors sale: see sale
.
-
satchmo_store.shop.views.contact.
form
()¶ Url: Template: shop/contact_form.html
Context: form: an instance of satchmo_store.shop.views.contact.ContactForm
-
satchmo_store.shop.views.home.
home
()¶ Url: Template: shop/index.html
Context: all_products_list: is_paginated: page_obj: paginator:
-
satchmo_store.shop.views.orders.
order_history
()¶ Url: Template: shop/order_history.html
Context: contact: default_view_tax: see default_view_tax
.orders:
-
satchmo_store.shop.views.orders.
order_tracking
()¶ Url: Template: shop/order_tracking.html
Context: contact: default_view_tax: see default_view_tax
.order:
-
satchmo_store.shop.views.search.
search_view
()¶ Url: satchmo_search
Template: shop/search.html Context:
Payment Processor Views¶
PayPal¶
URLs by Name¶
URLs are relative to /checkout/PAYMENT_PAYPAL.URL_BASE
/.
-
PAYPAL_satchmo_checkout-step2
URL: / View: payment.modules.paypal.views.pay_ship_info()
-
PAYPAL_satchmo_checkout-step3
URL: /confirm/ View: payment.modules.paypal.views.confirm_info()
-
PAYPAL_satchmo_checkout_free-confirm
URL: /confirmorder/ View: payment.views.confirm.confirm_free_order
-
PAYPAL_satchmo_checkout-ipn
URL: /ipn/ View: payment.modules.paypal.views.ipn
-
PAYPAL_satchmo_checkout-success
URL: /success/ View: payment.views.checkout.success()
Views¶
-
payment.modules.paypal.views.
pay_ship_info
()¶ Url: Template: shop/checkout/paypal/pay_ship.html
Context: form: an instance of payment.views.payship.simple_pay_ship_process_form PAYMENT_LIVE: whether the Paypal module is ‘live’
-
payment.modules.paypal.views.
confirm_info
()¶ Url: Template: shop/checkout/paypal/confirm.html
Context: order: the instance of satchmo_store.shop.models.Order being paid for. post_url: either PAYMENT_PAYPAL.POST_URL
orPAYMENT_PAYPAL.POST_TEST_URL
, depending on whether the Paypal module is'live'
.default_view_tax: see default_view_tax
.business: either PAYMENT_PAYPAL.BUSINESS
orPAYMENT_PAYPAL.BUSINESS_TEST
, depending on whether the Paypal module is'live'
.currency_code: the value of PAYMENT_PAYPAL.CURRENCY_CODE
.return_address: the value of PAYMENT_PAYPAL.RETURN_ADDRESS
.invoice: the id of order subscription: PAYMENT_LIVE: whether the Paypal module is 'live'
.
Forms¶
-
class
satchmo_store.shop.views.contact.
ContactForm
¶ -
contents
¶ a CharField with a TextArea widget.
-
inquiry
¶ - a ChoiceField with choices:
- General Question
- Order Problem
-
name
¶ a CharField.
-
sender
¶ an EmailField
-
subject
¶ a CharField.
-
-
class
payment.forms.
CustomChargeForm
¶ -
amount
¶ a DecimalField.
-
notes
¶ a CharField.
-
orderitem
¶ a hidden IntegerField field.
-
shipping
¶ a DecimalField.
-
-
class
satchmo_store.shop.forms.
MultipleProductForm
¶ A form populated with PositiveRoundedDecimalField fields, one for each active product.
-
class
payment.forms.
PaymentContactInfoForm
¶ Subclasses
payment.forms.PaymentMethodForm
and
satchmo_store.contact.forms.ContactInfoForm
.
Context variables¶
Variables provided by Satchmo’s context processor¶
Here are the variables provided in the context by Satchmo’s context processor, satchmo_store.shop.context_processor.settings.
shop_base: The base URL from SHOP_BASE in SATCHMO_SETTINGS shop: an object satchmo_store.shop.models.Config representing the current store configuration shop_name: the store_name value from the config media_url: The current media url, taking into account SSL STATIC_URL: The current static url, taking into account SSL cart_count: number of items in the cart cart: user’s current cart; an instance of satchmo_store.shop.models.Cart categories: all categories in the site is_secure: A boolean representing weather or not SSL is enabled request: The HttpRequest object passed into the context processor login_url: the LOGIN_URL setting in your settings.py logout_url: the LOGOUT_URL setting in your settings.py storewide_sale: An instance of product.models.Discount if there is a global sale, or None