Restructure pages for permutations and basket with metadata for is_included_VAT, id_currency, id_region_delivery

This commit is contained in:
2024-04-21 15:13:09 +01:00
parent f1b095ba83
commit bbb7800dc8
40 changed files with 524 additions and 277 deletions

View File

@@ -11,7 +11,6 @@ function hookupStore() {
function hookupBasket() {
// const containerBasket = $(idContainerBasket);
toggleShowBtnCheckout(); // containerBasket
hookupBtnCheckout();
hookupBtnsPlusMinus();
@@ -45,13 +44,19 @@ function hookupLocalStorageStore() {
}
if (createNewBasket) {
basket = {'items': []};
basket = {};
basket[keyItems] = [];
basket[keyIsIncludedVAT] = true;
basket[keyIdCurrency] = 1;
basket[keyIdRegionDelivery] = 1;
setLocalStorage(keyBasket, basket);
console.log("new local basket created");
}
let ajaxData = {}
ajaxData[keyBasket] = basket;
// console.log('ajax:' + ajaxData);
// console.log("hookupLocalStorageStore\nhashStoreBasketLoad: " + hashStoreBasketLoad + "\n");
// ajaxData[keyIsIncludedVAT] = getLocalStorage(keyIsIncludedVAT);
console.log('ajax:' + ajaxData);
ajaxJSONData(keyBasket, mapHashToController(hashStoreBasketLoad), ajaxData, loadBasket, false);
}