Restructure pages for permutations and basket with metadata for is_included_VAT, id_currency, id_region_delivery
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!-- Basket -->
|
||||
{% set show_delivery_option = False %}
|
||||
<div id="{{ model.id_basket }}" class="{{ model.flag_card }} {{ model.flag_scrollable }}">
|
||||
<div id="{{ model.ID_BASKET }}" class="{{ model.FLAG_CARD }} {{ model.FLAG_SCROLLABLE }}">
|
||||
<div class="container column">
|
||||
<div class="container row">
|
||||
<h2>Basket</h2>
|
||||
@@ -9,10 +9,10 @@
|
||||
{% for basket_item in model.basket.items %}
|
||||
{% include '_block_store_basket_item.html' %}
|
||||
{% endfor %}
|
||||
<h3 id="{{ model.id_basket_total }}">Total: {{ model.output_basket_total() }}</h3>{% if not model.app.is_included_VAT %}<h4> + VAT </h4>{% endif %}
|
||||
<p id="{{ model.id_label_basket_empty}}" style="margin: 1vh;">Buy some shit dawg!</p>
|
||||
<h3 id="{{ model.ID_BASKET_TOTAL }}">Total: {{ model.output_basket_total() }}</h3>{% if not model.app.is_included_VAT %}<h4> + VAT </h4>{% endif %}
|
||||
<p id="{{ model.ID_LABEL_BASKET_EMPTY }}" style="margin: 1vh;">Buy some shit dawg!</p>
|
||||
<!-- <div id="{{ model.id_basket_notices }}"> include line above
|
||||
</div> -->
|
||||
<button id="{{ model.id_btn_checkout }}" type="submit">Checkout</button>
|
||||
<button id="{{ model.ID_BUTTON_CHECKOUT }}" type="submit">Checkout</button>
|
||||
</div>
|
||||
</div>
|
||||
35
templates/_block_store_home_body.html
Normal file
35
templates/_block_store_home_body.html
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
|
||||
{% set block_id = 'styles' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<!-- Include Stylesheet -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/store_home.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
<div class="model.FLAG_ROW">
|
||||
<div class="leftcolumn">
|
||||
{% for cat in model.category_list.categories %}
|
||||
{% if cat.is_available() %}
|
||||
{% include '_block_store_product_category.html' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="{{ model.ID_BASKET_CONTAINER}}" class="rightcolumn">
|
||||
{% include '_block_store_basket.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set block_id = 'scripts' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('static', filename='js/store_home.js') }}"></script>
|
||||
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_HOME }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up home page...');
|
||||
hookupStorePageHome();
|
||||
// hookupStore(); // in _shared_store.html
|
||||
});
|
||||
</script>
|
||||
@@ -1,22 +1,24 @@
|
||||
<!-- Store Product Card
|
||||
for insertion in _store_product_category_card
|
||||
-->
|
||||
{% set permutation = product.get_permutation_selected() %}
|
||||
<div class="card subcard" {{ model.attr_id_product }}="{{ product.id_product }}" {{ model.attr_id_permutation }}="{{ permutation.id_permutation }}">
|
||||
<div class="container">
|
||||
<img class="img-product" src="{{ permutation.get_image_from_index(0).url }}" alt="Template product image"> <!-- model.get_many_product_image_src(product.id_product, '', True, 'FULL') -->
|
||||
</div>
|
||||
{% set form = product.form_basket_add %}
|
||||
<form {{ model.attr_form_type }}="{{ form.form_type }}" {{ model.attr_id_product }}="{{ product.id_product }}" {{ model.attr_id_permutation }}="{{ permutation.id_permutation }}" class="container column" action="{{ url_for('basket_add') }}" method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
<h2>{{ product.name }}</h2>
|
||||
<h3>{{ permutation.output_price(model.app.is_included_VAT) }}</h3>
|
||||
{% if permutation.is_available %}
|
||||
{% set tmp_quantity = 1 %}
|
||||
{% include '_block_input_number_plus_minus.html' %}
|
||||
{{ form.submit() }}
|
||||
<p>Get it: <strong>{{ permutation.output_delivery_date() }}</strong></p>
|
||||
{% if product.has_permutations() %}
|
||||
{% set permutation = product.get_permutation_selected() %}
|
||||
<div class="card subcard" {{ model.attr_id_product }}="{{ product.id_product }}" {{ model.attr_id_permutation }}="{{ permutation.id_permutation }}">
|
||||
<div class="container">
|
||||
<img class="img-product" src="{{ permutation.get_image_from_index(0).url }}" alt="Template product image"> <!-- model.get_many_product_image_src(product.id_product, '', True, 'FULL') -->
|
||||
</div>
|
||||
{% if permutation.is_available() %}
|
||||
{% set form = product.form_basket_add %}
|
||||
<form {{ model.attr_form_type }}="{{ form.form_type }}" {{ model.attr_id_product }}="{{ product.id_product }}" {{ model.attr_id_permutation }}="{{ permutation.id_permutation }}" class="container column" action="{{ url_for('basket_add') }}" method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
<h2>{{ product.name }}</h2>
|
||||
<h3>{{ permutation.output_price(model.is_included_VAT) }}</h3>
|
||||
{% set tmp_quantity = 1 %}
|
||||
{% include '_block_input_number_plus_minus.html' %}
|
||||
{{ form.submit() }}
|
||||
<p>Get it: <strong>{{ permutation.output_delivery_date() }}</strong></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
</form>
|
||||
<!-- { % inc !!!! broken to ignore !!!! lude '_block_store_product_price!!!! broken to ignore !!!!.html' % } -->
|
||||
</div>
|
||||
<!-- { % inc !!!! broken to ignore !!!! lude '_block_store_product_price!!!! broken to ignore !!!!.html' % } -->
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -69,7 +69,7 @@
|
||||
<script src="{{ url_for('static', filename='js/store_shared.js') }}"></script>
|
||||
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.hash_page_home }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_ADMIN_HOME }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
hookupPageStoreAdminHome();
|
||||
|
||||
@@ -9,30 +9,30 @@
|
||||
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/store_home.css') }}"> css/store_basket.css -->
|
||||
|
||||
<!-- HTML content -->
|
||||
<div class="{{ model.flag_card }}">
|
||||
<div class="{{ model.flag_container }} {{ model.flag_column }}">
|
||||
<div id="{{ model.id_container_info_delivery }}" class="{{ model.flag_container }} {{ model.flag_row }}" style="border-bottom: 1px black;">
|
||||
<div class="{{ model.FLAG_CARD }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div id="{{ model.ID_CONTAINER_INFO_DELIVERY }}" class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}" style="border-bottom: 1px black;">
|
||||
<h2>Delivery Information</h2>
|
||||
<div class="{{ model.flag_container }} {{ model.flag_row }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
||||
Valid delivery information not submitted
|
||||
</div>
|
||||
</div>
|
||||
<div id="{{ model.id_container_info_billing }}" class="{{ model.flag_container }} {{ model.flag_row }}" style="border-bottom: 1px black;">
|
||||
<div id="{{ model.ID_CONTAINER_INFO_BILLING }}" class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}" style="border-bottom: 1px black;">
|
||||
<h2>Billing Information</h2>
|
||||
<div class="{{ model.flag_container }} {{ model.flag_row }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
||||
Valid billing information not submitted
|
||||
</div>
|
||||
</div>
|
||||
<div class="{{ model.flag_container }}">
|
||||
<div id="{{ model.id_basket_container }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }}">
|
||||
<div id="{{ model.ID_BASKET_CONTAINER }}">
|
||||
{% include '_block_store_basket.html' %}
|
||||
</div>
|
||||
<!-- Comes with basket block
|
||||
<div class="{{ model.flag_container }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }}">
|
||||
<!-- subtotal --
|
||||
<h2 id="id_basket_total">Order total: £{{ model.output_basket_total() }}</h2>
|
||||
<h2 id="id_basket_total">Order total: £{{ model.OUTPUT_BASKET_TOTAL() }}</h2>
|
||||
<!-- checkout button - hidden unless valid details entered everywhere above --
|
||||
<button type="submit" class="{{ model.flag_btn_submit }}">Complete Purchase</button>
|
||||
<button type="submit" class="{{ model.FLAG_BTN_SUBMIT }}">Complete Purchase</button>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
@@ -54,31 +54,10 @@
|
||||
{% set block_id = 'scripts' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<script src="{{ url_for('static', filename='js/store_page_basket.js') }}"></script>
|
||||
|
||||
{% set block_id = 'checkout' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.hash_page_store_basket }}";
|
||||
var hashPageStoreCheckout = "{{ model.hash_page_store_checkout }}";
|
||||
var hashPageStoreCheckoutSession = "{{ model.hash_page_store_checkout_session }}";
|
||||
var hashStoreBasketInfo = "{{ model.hash_store_basket_info }}";
|
||||
var idOverlayInfoBilling = "#{{ model.id_overlay_info_billing }}";
|
||||
var idOverlayInfoDelivery = "#{{ model.id_overlay_info_delivery }}";
|
||||
var idContainerInfoBilling = "#{{ model.id_container_info_billing }}";
|
||||
var idContainerInfoDelivery = "#{{ model.id_container_info_delivery }}";
|
||||
var keyIdCheckout = "{{ model.key_id_checkout }}";
|
||||
var keyInfoBilling = "{{ model.key_info_billing }}";
|
||||
var keyInfoDelivery = "{{ model.key_info_delivery }}";
|
||||
var keyInfoIdentical = "{{ model.key_info_identical }}";
|
||||
var keyInfoType = "{{ model.key_info_type }}";
|
||||
var keyIsSubscription = "{{ model.key_is_subscription }}";
|
||||
var keyAddress1 = "{{ model.key_address1 }}";
|
||||
var keyAddress2 = "{{ model.key_address2 }}";
|
||||
var keyCity = "{{ model.key_city }}";
|
||||
var keyCounty = "{{ model.key_county }}";
|
||||
var keyNameFull = "{{ model.key_name_full }}";
|
||||
var keyPhoneNumber = "{{ model.key_phone_number }}";
|
||||
var keyPostcode = "{{ model.key_postcode }}";
|
||||
var keyRegion = "{{ model.key_region }}";
|
||||
var keyUrlCheckout = "{{ model.key_url_checkout }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_BASKET }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up store basket review page...');
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/store_home.css') }}"> css/store_basket.css -->
|
||||
|
||||
<!-- HTML content -->
|
||||
<div class="{{ model.flag_card }}">
|
||||
<div class="{{ model.flag_container }} {{ model.flag_column }}">
|
||||
<div id="{{ model.id_container_info_delivery }}" class="{{ model.flag_container }} {{ model.flag_row }}" style="border-bottom: 1px black;">
|
||||
<div class="{{ model.FLAG_CARD }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div id="{{ model.ID_CONTAINER_INFO_DELIVERY }}" class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}" style="border-bottom: 1px black;">
|
||||
<h2>Order successful!</h2>
|
||||
<div class="{{ model.flag_container }} {{ model.flag_row }}">
|
||||
<div class="{{ model.flag_label }}"><strong>Order reference: {{ model.checkout_session.id }}</strong></div>
|
||||
<div class="{{ model.flag_label }}">You will receive an order acknowledgement by email</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
||||
<div class="{{ model.FLAG_LABEL }}"><strong>Order reference: {{ model.CHECKOUT_SESSION.ID }}</strong></div>
|
||||
<div class="{{ model.FLAG_LABEL }}">You will receive an order acknowledgement by email</div>
|
||||
</div>
|
||||
{% if model.is_user_logged_in %}
|
||||
<div class="{{ model.flag_container }} {{ model.flag_row }}">
|
||||
{% if model.IS_USER_LOGGED_IN %}
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
||||
<h3>Your order:</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -30,30 +30,10 @@
|
||||
{% set block_id = 'scripts' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<script src="{{ url_for('static', filename='js/store_page_basket.js') }}"></script>
|
||||
|
||||
{% set block_id = 'checkout' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.hash_page_store_basket }}";
|
||||
var hashPageStoreCheckout = "{{ model.hash_page_store_checkout }}";
|
||||
var hashPageStoreCheckoutSession = "{{ model.hash_page_store_checkout_session }}";
|
||||
var hashStoreBasketInfo = "{{ model.hash_store_basket_info }}";
|
||||
var idOverlayInfoBilling = "#{{ model.id_overlay_info_billing }}";
|
||||
var idOverlayInfoDelivery = "#{{ model.id_overlay_info_delivery }}";
|
||||
var idContainerInfoBilling = "#{{ model.id_container_info_billing }}";
|
||||
var idContainerInfoDelivery = "#{{ model.id_container_info_delivery }}";
|
||||
var keyIdCheckout = "{{ model.key_id_checkout }}";
|
||||
var keyInfoBilling = "{{ model.key_info_billing }}";
|
||||
var keyInfoDelivery = "{{ model.key_info_delivery }}";
|
||||
var keyInfoIdentical = "{{ model.key_info_identical }}";
|
||||
var keyInfoType = "{{ model.key_info_type }}";
|
||||
var keyIsSubscription = "{{ model.key_is_subscription }}";
|
||||
var keyAddress1 = "{{ model.key_address1 }}";
|
||||
var keyAddress2 = "{{ model.key_address2 }}";
|
||||
var keyCity = "{{ model.key_city }}";
|
||||
var keyCounty = "{{ model.key_county }}";
|
||||
var keyNameFull = "{{ model.key_name_full }}";
|
||||
var keyPhoneNumber = "{{ model.key_phone_number }}";
|
||||
var keyPostcode = "{{ model.key_postcode }}";
|
||||
var keyRegion = "{{ model.key_region }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_BASKET }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up store checkout success page...');
|
||||
|
||||
@@ -3,35 +3,5 @@
|
||||
{% block title %}{{ model.title }}{% endblock %}
|
||||
|
||||
{% block page_body %}
|
||||
{% set block_id = 'styles' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<!-- Include Stylesheet -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/store_home.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
<div class="row">
|
||||
<div class="leftcolumn">
|
||||
{% for cat in model.category_list.categories %}
|
||||
{% include '_block_store_product_category.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="{{ model.id_basket_container }}" class="rightcolumn">
|
||||
{% include '_block_store_basket.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set block_id = 'scripts' %}
|
||||
{% include '_shared_store.html' %}
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('static', filename='js/store_home.js') }}"></script>
|
||||
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.hash_page_store_home }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up home page...');
|
||||
hookupStorePageHome();
|
||||
// hookupStore(); // in _shared_store.html
|
||||
});
|
||||
</script>
|
||||
{% include '_block_store_home_body.html' %}
|
||||
{% endblock %}
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="{{ model.id_basket_container }}" class="rightcolumn">
|
||||
<div id="{{ model.ID_BASKET_CONTAINER }}" class="rightcolumn">
|
||||
{% include '_block_store_basket.html' %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<script>
|
||||
// pass arguments from model to JS
|
||||
var hashPageCurrent = "{{ model.hash_page_store_product }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_PRODUCT }}";
|
||||
|
||||
// hookup elements
|
||||
$(document).ready(function() {
|
||||
|
||||
@@ -10,33 +10,36 @@
|
||||
<script src="{{ url_for('static', filename='js/store_shared.js') }}"></script>
|
||||
<!-- Variables from Model_View_Store + model-->
|
||||
<script>
|
||||
var attrFormType = "{{ model.attr_form_type }}";
|
||||
var attrIdPermutation = "{{ model.attr_id_permutation }}";
|
||||
var attrIdProduct = "{{ model.attr_id_product }}";
|
||||
var attrIdProductCategory = "{{ model.attr_id_product_category }}";
|
||||
var flagBasketItemDelete = "{{ model.flag_basket_item_delete }}";
|
||||
var flagBtnBasketAdd = "{{ model.flag_btn_basket_add }}";
|
||||
var flagBtnBuyNow = "{{ model.flag_btn_buy_now }}";
|
||||
var hashStoreBasketAdd = "{{ model.hash_store_basket_add }}";
|
||||
var hashStoreBasketDelete = "{{ model.hash_store_basket_delete }}";
|
||||
var hashStoreBasketEdit = "{{ model.hash_store_basket_edit }}";
|
||||
var hashStoreBasketLoad = "{{ model.hash_store_basket_load }}";
|
||||
var hashStoreSelectCurrency = "{{ model.hash_store_select_currency }}";
|
||||
var hashStoreSelectDeliveryRegion = "{{ model.hash_store_select_delivery_region }}";
|
||||
var hashStoreSetIsIncludedVAT = "{{ model.hash_store_set_is_included_VAT }}";
|
||||
var hashPageStoreBasket = "{{ model.hash_page_store_basket }}";
|
||||
var idBasket = "#{{ model.id_basket }}";
|
||||
var idBasketContainer = "#{{ model.id_basket_container }}";
|
||||
var idBasketTotal = "#{{ model.id_basket_total }}";
|
||||
var idBtnCheckout = "#{{ model.id_btn_checkout }}";
|
||||
var idLabelBasketEmpty = "#{{ model.id_label_basket_empty }}";
|
||||
var attrFormType = "{{ model.ATTR_FORM_TYPE }}";
|
||||
var attrIdPermutation = "{{ model.ATTR_ID_PERMUTATION }}";
|
||||
var attrIdProduct = "{{ model.ATTR_ID_PRODUCT }}";
|
||||
var attrIdProductCategory = "{{ model.ATTR_ID_PRODUCT_CATEGORY }}";
|
||||
var flagBasketItemDelete = "{{ model.FLAG_BASKET_ITEM_DELETE }}";
|
||||
var flagBtnBasketAdd = "{{ model.FLAG_BTN_BASKET_ADD }}";
|
||||
var flagBtnBuyNow = "{{ model.FLAG_BTN_BUY_NOW }}";
|
||||
var hashStoreBasketAdd = "{{ model.HASH_STORE_BASKET_ADD }}";
|
||||
var hashStoreBasketDelete = "{{ model.HASH_STORE_BASKET_DELETE }}";
|
||||
var hashStoreBasketEdit = "{{ model.HASH_STORE_BASKET_EDIT }}";
|
||||
var hashStoreBasketLoad = "{{ model.HASH_STORE_BASKET_LOAD }}";
|
||||
var hashStoreSetCurrency = "{{ model.HASH_STORE_SET_CURRENCY }}";
|
||||
var hashStoreSetRegion = "{{ model.HASH_STORE_SET_REGION }}";
|
||||
var hashStoreSetIsIncludedVAT = "{{ model.HASH_STORE_SET_IS_INCLUDED_VAT }}";
|
||||
var hashPageStoreBasket = "{{ model.HASH_PAGE_STORE_BASKET }}";
|
||||
var idBasket = "#{{ model.ID_BASKET }}";
|
||||
var idBasketContainer = "#{{ model.ID_BASKET_CONTAINER }}";
|
||||
var idBasketTotal = "#{{ model.ID_BASKET_TOTAL }}";
|
||||
var idBtnCheckout = "#{{ model.ID_BUTTON_CHECKOUT }}";
|
||||
var idCurrency = "#{{ model.ID_CURRENCY }}";
|
||||
var idLabelBasketEmpty = "#{{ model.ID_LABEL_BASKET_EMPTY }}";
|
||||
var idRegionDelivery = "#{{ model.ID_REGION_DELIVERY }}";
|
||||
var keyIdCurrency = "{{ model.KEY_ID_CURRENCY }}";
|
||||
var keyIdPermutation = "{{ model.key_id_permutation }}";
|
||||
var keyIdProduct = "{{ model.key_id_product }}";
|
||||
var keyItems = "{{ model.KEY_ITEMS }}";
|
||||
var keyIdPermutation = "{{ model.KEY_ID_PERMUTATION }}";
|
||||
var keyIdProduct = "{{ model.KEY_ID_PRODUCT }}";
|
||||
var keyIdRegionDelivery = "{{ model.KEY_ID_REGION_DELIVERY }}";
|
||||
var keyIsIncludedVAT = "{{ model.KEY_IS_INCLUDED_VAT }}";
|
||||
var typeFormBasketAdd = "{{ model.type_form_basket_add }}";
|
||||
var typeFormBasketEdit = "{{ model.type_form_basket_edit }}";
|
||||
var typeFormBasketAdd = "{{ model.TYPE_FORM_BASKET_ADD }}";
|
||||
var typeFormBasketEdit = "{{ model.TYPE_FORM_BASKET_EDIT }}";
|
||||
|
||||
if (!isEmpty({{ model.basket.items }})) {
|
||||
localStorage.setItem(keyBasket, JSON.parse(JSON.stringify({'items': "{{ model.basket.items }}"})));
|
||||
@@ -48,4 +51,30 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
{% elif block_id == 'checkout' %}
|
||||
<!-- Variables from Model_View_Store + model-->
|
||||
<script>
|
||||
var hashPageStoreCheckout = "{{ model.HASH_PAGE_STORE_CHECKOUT }}";
|
||||
var hashPageStoreCheckoutSession = "{{ model.HASH_PAGE_STORE_CHECKOUT_SESSION }}";
|
||||
var hashStoreBasketInfo = "{{ model.HASH_STORE_BASKET_INFO }}";
|
||||
var idOverlayInfoBilling = "#{{ model.ID_OVERLAY_INFO_BILLING }}";
|
||||
var idOverlayInfoDelivery = "#{{ model.ID_OVERLAY_INFO_DELIVERY }}";
|
||||
var idContainerInfoBilling = "#{{ model.ID_CONTAINER_INFO_BILLING }}";
|
||||
var idContainerInfoDelivery = "#{{ model.ID_CONTAINER_INFO_DELIVERY }}";
|
||||
var keyIdCheckout = "{{ model.KEY_ID_CHECKOUT }}";
|
||||
var keyInfoBilling = "{{ model.KEY_INFO_BILLING }}";
|
||||
var keyInfoDelivery = "{{ model.KEY_INFO_DELIVERY }}";
|
||||
var keyInfoIdentical = "{{ model.KEY_INFO_IDENTICAL }}";
|
||||
var keyInfoType = "{{ model.KEY_INFO_TYPE }}";
|
||||
var keyIsSubscription = "{{ model.KEY_IS_SUBSCRIPTION }}";
|
||||
var keyAddress1 = "{{ model.KEY_ADDRESS1 }}";
|
||||
var keyAddress2 = "{{ model.KEY_ADDRESS2 }}";
|
||||
var keyCity = "{{ model.KEY_CITY }}";
|
||||
var keyCounty = "{{ model.KEY_COUNTY }}";
|
||||
var keyNameFull = "{{ model.KEY_NAME_FULL }}";
|
||||
var keyPhoneNumber = "{{ model.KEY_PHONE_NUMBER }}";
|
||||
var keyPostcode = "{{ model.KEY_POSTCODE }}";
|
||||
var keyRegion = "{{ model.KEY_REGION }}";
|
||||
var keyUrlCheckout = "{{ model.KEY_URL_CHECKOUT }}";
|
||||
</script>
|
||||
{% endif %}
|
||||
@@ -10,13 +10,17 @@
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script> <!-- Include jQuery from a CDN -->
|
||||
|
||||
<script>
|
||||
var attrTextCollapsed = "{{ model.ATTR_TEXT_COLLAPSED }}";
|
||||
var attrTextExpanded = "{{ model.ATTR_TEXT_EXPANDED }}";
|
||||
var flagBtnOverlayClose = "{{ model.FLAG_BTN_OVERLAY_CLOSE }}";
|
||||
var flagBtnSubmit = "{{ model.FLAG_BTN_SUBMIT }}";
|
||||
var flagCard = "{{ model.FLAG_CARD }}";
|
||||
var flagCollapsed = "{{ model.FLAG_COLLAPSED }}";
|
||||
var flagCollapsible = "{{ model.FLAG_COLLAPSIBLE }}";
|
||||
var flagColumn = "{{ model.FLAG_COLUMN }}";
|
||||
var flagContainer = "{{ model.FLAG_CONTAINER }}";
|
||||
var flagContainerInput = "{{ model.FLAG_CONTAINER_INPUT }}";
|
||||
var flagExpanded = "{{ model.FLAG_EXPANDED }}";
|
||||
var flagRow = "{{ model.FLAG_ROW }}";
|
||||
var flagScrollable = "{{ model.FLAG_SCROLLABLE }}";
|
||||
var flagBtnOverlayClose = "{{ model.FLAG_BTN_OVERLAY_CLOSE }}";
|
||||
@@ -64,18 +68,22 @@
|
||||
<div class="container column">
|
||||
<a id="{{ model.ID_NAV_HOME }}">Home</a> <!-- href="{{ url_for('home') }}" -->
|
||||
</div>
|
||||
<!--
|
||||
<div class="container column">
|
||||
<a id="{{ model.ID_NAV_SERVICES }}">Services</a>
|
||||
</div>
|
||||
<div class="container column">
|
||||
<a id="{{ model.ID_NAV_TECHNOLOGIES }}">Technologies</a>
|
||||
</div>
|
||||
-->
|
||||
<div class="container column">
|
||||
<a id="{{ model.ID_NAV_STORE_HOME }}">Store</a>
|
||||
</div>
|
||||
<!--
|
||||
<div class="container column">
|
||||
<a id="{{ model.ID_NAV_CONTACT }}">Contact</a> <!-- href="{{ url_for('contact') }}" -->
|
||||
<a id="{{ model.ID_NAV_CONTACT }}">Contact</a> <!-- href="{{ url_for('contact') }}" --
|
||||
</div>
|
||||
-->
|
||||
{% if model.is_page_store %}
|
||||
<div class="container column">
|
||||
<!-- <a href="{ url_ for('create_price_dummy') }">Create template price</a> -->
|
||||
@@ -83,7 +91,7 @@
|
||||
{{ model.form_is_included_VAT.hidden_tag() }}
|
||||
<div class="container-input">
|
||||
{{ model.form_is_included_VAT.is_included.label }}
|
||||
{{ model.form_is_included_VAT.is_included() }}
|
||||
{{ model.form_is_included_VAT.is_included( checked = model.is_included_VAT ) }}
|
||||
{% for error in model.form_is_included_VAT.is_included.errors %}
|
||||
<p class="error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user