Compare commits

..

No commits in common. "4e434d72d703d6658326b9f51c80324b0a85d8c7" and "34009f2b2cbef3fb10d0e7d41419a5855750c877" have entirely different histories.

6 changed files with 134 additions and 206 deletions

View File

@ -28,7 +28,7 @@ const CheckUpdateQuantityOperations = {
if (errorMsg !== "") { if (errorMsg !== "") {
const strError = ` const strError = `
<article class="alert text-center w-fit flex mt-12 p-2 bg-red-100 border border-red-300 alert-danger" role="alert" data-alert="danger"> <article class="alert alert-danger" role="alert" data-alert="danger">
<ul> <ul>
<li>${errorMsg}</li> <li>${errorMsg}</li>
</ul> </ul>
@ -398,41 +398,3 @@ $(function () {
return false; return false;
}); });
}); });
$(document).ready(() => {
const e = $("body");
e.off("submit", '[data-link-action="add-voucher"]'),
e.on("submit", '[data-link-action="add-voucher"]', (e) => {
const promoSubmitBtn = $("#promo-code-form button");
e.preventDefault();
const n = $(e.currentTarget),
o = n.attr("action");
0 === n.find("[name=action]").length &&
n.append($("<input>", { type: "hidden", name: "ajax", value: 1 })),
0 === n.find("[name=action]").length &&
n.append(
$("<input>", { type: "hidden", name: "action", value: "update" }),
),
promoSubmitBtn.text("CHECKING");
promoSubmitBtn.prop("disable", true);
$.post(o, n.serialize(), null, "json")
.then((n) => {
n.hasError
? $(".js-error").show().find(".js-error-text").text(n.errors[0])
: prestashop.emit("updateCart", {
reason: e.target.dataset,
resp: n,
});
promoSubmitBtn.text("ADD");
promoSubmitBtn.prop("disable", false);
})
.fail((e) => {
prestashop.emit("handleError", {
eventType: "updateCart",
resp: e,
});
promoSubmitBtn.text("ADD");
promoSubmitBtn.prop("disable", false);
});
});
});

View File

@ -22,89 +22,88 @@
* @copyright Since 2007 PrestaShop SA and Contributors * @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/ */
import prestashop from "prestashop"; import prestashop from 'prestashop';
import $ from "jquery"; import $ from 'jquery';
const passwordPolicy = { const passwordPolicy = {
template: "#password-feedback", template: '#password-feedback',
hint: ".js-hint-password", hint: '.js-hint-password',
container: ".password-strength-feedback", container: '.password-strength-feedback',
strengthText: ".password-strength-text", strengthText: '.password-strength-text',
requirementScore: ".password-requirements-score", requirementScore: '.password-requirements-score',
requirementLength: ".password-requirements-length", requirementLength: '.password-requirements-length',
requirementScoreIcon: ".password-requirements-score i", requirementScoreIcon: '.password-requirements-score i',
requirementLengthIcon: ".password-requirements-length i", requirementLengthIcon: '.password-requirements-length i',
progressBar: ".progress-bar", progressBar: '.progress-bar',
inputColumn: ".js-input-column", inputColumn: '.js-input-column',
}; };
prestashop.themeSelectors = { prestashop.themeSelectors = {
product: { product: {
tabs: ".tabs .nav-link", tabs: '.tabs .nav-link',
activeNavClass: "js-product-nav-active", activeNavClass: 'js-product-nav-active',
activeTabClass: "js-product-tab-active", activeTabClass: 'js-product-tab-active',
activeTabs: ".tabs .nav-link.active, .js-product-nav-active", activeTabs: '.tabs .nav-link.active, .js-product-nav-active',
imagesModal: ".js-product-images-modal", imagesModal: '.js-product-images-modal',
thumb: ".js-thumb", thumb: '.js-thumb',
thumbContainer: ".thumb-container, .js-thumb-container", thumbContainer: '.thumb-container, .js-thumb-container',
arrows: ".js-arrows", arrows: '.js-arrows',
selected: ".selected, .js-thumb-selected", selected: '.selected, .js-thumb-selected',
modalProductCover: ".js-modal-product-cover", modalProductCover: '.js-modal-product-cover',
cover: ".js-qv-product-cover", cover: '.js-qv-product-cover',
customizationModal: ".js-customization-modal", customizationModal: '.js-customization-modal',
}, },
listing: { listing: {
searchFilterToggler: "#search_filter_toggler, .js-search-toggler", searchFilterToggler: '#search_filter_toggler, .js-search-toggler',
searchFiltersWrapper: "#search_filters_wrapper", searchFiltersWrapper: '#search_filters_wrapper',
searchFilterControls: "#search_filter_controls", searchFilterControls: '#search_filter_controls',
searchFilters: "#search_filters", searchFilters: '#search_filters',
activeSearchFilters: "#js-active-search-filters", activeSearchFilters: '#js-active-search-filters',
listTop: "#js-product-list-top", listTop: '#js-product-list-top',
product: ".js-product", product: '.js-product',
list: "#js-product-list", list: '#js-product-list',
listBottom: "#js-product-list-bottom", listBottom: '#js-product-list-bottom',
listHeader: "#js-product-list-header", listHeader: '#js-product-list-header',
searchFiltersClearAll: ".js-search-filters-clear-all", searchFiltersClearAll: '.js-search-filters-clear-all',
searchLink: ".js-search-link", searchLink: '.js-search-link',
}, },
order: { order: {
returnForm: "#order-return-form, .js-order-return-form", returnForm: '#order-return-form, .js-order-return-form',
}, },
arrowDown: ".arrow-down, .js-arrow-down", arrowDown: '.arrow-down, .js-arrow-down',
arrowUp: ".arrow-up, .js-arrow-up", arrowUp: '.arrow-up, .js-arrow-up',
clear: ".clear", clear: '.clear',
fileInput: ".js-file-input", fileInput: '.js-file-input',
contentWrapper: "#content-wrapper, .js-content-wrapper", contentWrapper: '#content-wrapper, .js-content-wrapper',
footer: "#footer, .js-footer", footer: '#footer, .js-footer',
modalContent: ".js-modal-content", modalContent: '.js-modal-content',
modal: "#modal, .js-checkout-modal", modal: '#modal, .js-checkout-modal',
touchspin: ".js-touchspin", touchspin: '.js-touchspin',
checkout: { checkout: {
termsLink: ".js-terms a", termsLink: '.js-terms a',
giftCheckbox: ".js-gift-checkbox", giftCheckbox: '.js-gift-checkbox',
imagesLink: ".card-block .cart-summary-products p a, .js-show-details", imagesLink: '.card-block .cart-summary-products p a, .js-show-details',
carrierExtraContent: ".carrier-extra-content, .js-carrier-extra-content", carrierExtraContent: '.carrier-extra-content, .js-carrier-extra-content',
btn: ".checkout a", btn: '.checkout a',
}, },
cart: { cart: {
productLineQty: ".js-cart-line-product-quantity", productLineQty: '.js-cart-line-product-quantity',
quickview: ".quickview", quickview: '.quickview',
touchspin: ".bootstrap-touchspin", touchspin: '.bootstrap-touchspin',
promoCode: "#promo-code", promoCode: '#promo-code',
displayPromo: ".display-promo", displayPromo: '.display-promo',
promoCodeButton: ".promo-code-button", promoCodeButton: '.promo-code-button',
discountCode: ".js-discount .code", discountCode: '.js-discount .code',
discountName: "[name=discount_name]", discountName: '[name=discount_name]',
actions: actions: '[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',
'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',
}, },
notifications: { notifications: {
dangerAlert: "#notifications article.alert-danger", dangerAlert: '#notifications article.alert-danger',
container: "#notifications.notifications-container", container: '#notifications .notifications-container',
}, },
passwordPolicy, passwordPolicy,
}; };
$(document).ready(() => { $(document).ready(() => {
prestashop.emit("themeSelectorsInit"); prestashop.emit('themeSelectorsInit');
}); });

File diff suppressed because one or more lines are too long

View File

@ -22,9 +22,10 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{if isset($notifications)}
<div id="notifications" class="notifications-container container"> {if isset($notifications)}
<aside id="notifications">
<div class="container">
{if $notifications.error} {if $notifications.error}
{block name='notifications_error'} {block name='notifications_error'}
<article class="alert alert-danger" role="alert" data-alert="danger"> <article class="alert alert-danger" role="alert" data-alert="danger">
@ -39,7 +40,7 @@
{if $notifications.warning} {if $notifications.warning}
{block name='notifications_warning'} {block name='notifications_warning'}
<article class="alert alert-warning " role="alert" data-alert="warning"> <article class="alert alert-warning" role="alert" data-alert="warning">
<ul> <ul>
{foreach $notifications.warning as $notif} {foreach $notifications.warning as $notif}
<li>{$notif nofilter}</li> <li>{$notif nofilter}</li>
@ -73,6 +74,5 @@
{/block} {/block}
{/if} {/if}
</div> </div>
</aside> </aside>
{/if} {/if}

View File

@ -54,7 +54,7 @@
<div id="promo-code mt-8"> <div id="promo-code mt-8">
<div class="promo-code"> <div class="promo-code">
{block name='cart_voucher_form'} {block name='cart_voucher_form'}
<form id="promo-code-form" action="{$urls.pages.cart}" data-link-action="add-voucher" method="post"> <form action="{$urls.pages.cart}" data-link-action="add-voucher" method="post">
<input type="hidden" name="token" value="{$static_token}"> <input type="hidden" name="token" value="{$static_token}">
<input type="hidden" name="addDiscount" value="1"> <input type="hidden" name="addDiscount" value="1">
<input class="promo-input" type="text" name="discount_name" placeholder="{l s='Promo code' d='Shop.Theme.Checkout'}"> <input class="promo-input" type="text" name="discount_name" placeholder="{l s='Promo code' d='Shop.Theme.Checkout'}">

View File

@ -61,10 +61,6 @@
{include file='_partials/breadcrumb.tpl'} {include file='_partials/breadcrumb.tpl'}
{/block} {/block}
{block name='notifications'}
{include file='_partials/notifications.tpl'}
{/block}
{block name='wrapperTop'} {block name='wrapperTop'}
{hook h="displayWrapperTop"} {hook h="displayWrapperTop"}
{/block} {/block}
@ -83,15 +79,15 @@
Start Customization</h2> Start Customization</h2>
<h3 class="text-lg font-semibold text-center mb-12">Tailored to you, at no extra cost.</h3> <h3 class="text-lg font-semibold text-center mb-12">Tailored to you, at no extra cost.</h3>
<div class="flex md:flex-row flex-col gap-8 lg:mb-32 mb-20"> <div class="flex md:flex-row flex-col gap-8 lg:mb-32 mb-20">
<div> <div><a href="https://brooksbingham.com/module/thob/configurator?id_product=74"> <img id=shirtImage
<a href="https://brooksbingham.com/module/thob/configurator?id_product=74"> class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100"
<img id="shirtImage" class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100" src="https://brooksbingham.com/111-home_default/business-shirt.jpg" alt="business-shirt.jpg" /></a> src="https://brooksbingham.com/111-home_default/business-shirt.jpg" alt="business-shirt.jpg" /></a>
<div class="flex flex-col pt-4 items-start"> <div class="flex flex-col pt-4 items-start">
<h3 class="text-center text-lg font-bold">$99.00</h3> <h3 class="text-center text-lg font-bold">$99.00</h3>
<h3 class="text-center text-lg font-semibold">Shirts</h3> <h3 class="text-center text-lg font-semibold">Shirts</h3>
</div> </div>
</div> </div>
<div><a href="https://brooksbingham.com/module/thob/configurator?id_product=75"> <img id="suitImage" <div><a href="https://brooksbingham.com/module/thob/configurator?id_product=75"> <img id=suitImage
class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100" class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100"
src="https://brooksbingham.com/107-home_default/business-suit.jpg" alt="business-suit.jpg" /></a> src="https://brooksbingham.com/107-home_default/business-suit.jpg" alt="business-suit.jpg" /></a>
<div class="flex flex-col pt-4 items-start"> <div class="flex flex-col pt-4 items-start">
@ -99,7 +95,7 @@
<h3 class="text-center text-lg font-semibold">Suits</h3> <h3 class="text-center text-lg font-semibold">Suits</h3>
</div> </div>
</div> </div>
<div><a href="https://brooksbingham.com/module/thob/configurator?id_product=76"> <img id="sportsjacketImage" <div><a href="https://brooksbingham.com/module/thob/configurator?id_product=76"> <img id=sportsjacketImage
class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100" class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100"
src="https://brooksbingham.com/108-home_default/sports-jacket.jpg" alt="sports-jacket.jpg" /></a> src="https://brooksbingham.com/108-home_default/sports-jacket.jpg" alt="sports-jacket.jpg" /></a>
<div class="flex flex-col pt-4 items-start"> <div class="flex flex-col pt-4 items-start">
@ -107,9 +103,9 @@
<h3 class="text-center text-lg font-semibold">Sports Jackets</h3> <h3 class="text-center text-lg font-semibold">Sports Jackets</h3>
</div> </div>
</div> </div>
<div><a href="https://brooksbingham.com/module/thob/configurator?id_product=77"> <div><a href="https://brooksbingham.com/module/thob/configurator?id_product=77"> <img id=tuxImage
<img id="tuxImage" class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100" src="https://brooksbingham.com/112-home_default/tuxedo.jpg" alt="tuxedo.jpg" /> class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100"
</a> src="https://brooksbingham.com/112-home_default/tuxedo.jpg" alt="tuxedo.jpg" /></a>
<div class="flex flex-col pt-4 items-start"> <div class="flex flex-col pt-4 items-start">
<h3 class="text-center text-lg font-bold">$995.00</h3> <h3 class="text-center text-lg font-bold">$995.00</h3>
<h3 class="text-center text-lg font-semibold">Tuxedos</h3> <h3 class="text-center text-lg font-semibold">Tuxedos</h3>
@ -120,11 +116,9 @@
<div class="lg:mb-32 mb-20"> <div class="lg:mb-32 mb-20">
<h1 class="text-2xl font-bold text-center">Design and Visualize what you need</h1> <h1 class="text-2xl font-bold text-center">Design and Visualize what you need</h1>
<h3 class="text-lg font-semibold text-center mb-12">Choose what looks good on you</h3> <h3 class="text-lg font-semibold text-center mb-12">Choose what looks good on you</h3>
<a href="https://brooksbingham.com/module/thob/configurator?id_product=75"> <a href="https://brooksbingham.com/module/thob/configurator?id_product=75"> <img
<video autoplay="autoplay" muted loop width="100%" height="auto"> src="https://brooksbingham-season5.sfo2.cdn.digitaloceanspaces.com/site-static-assets/widget-screenshot.png"
<source src="https://brooksbingham-season5.sfo2.cdn.digitaloceanspaces.com/site-static-assets/homepage/brooksbingham_configurator_demo_video_compressed.mp4" /> alt="widget-screenshot.png" /> </a>
</video>
</a>
</div> </div>
<div class="text-white grid grid-cols-2 grid-rows-* gap-y-1 gap-x-1 mb-1"> <div class="text-white grid grid-cols-2 grid-rows-* gap-y-1 gap-x-1 mb-1">
<div class="row-span-3 col-start-1 row-end-2 relative"> <div class="row-span-3 col-start-1 row-end-2 relative">