From 48e776d80d445f677c78f28b2de87a2de412c585 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 16:19:02 +0100 Subject: [PATCH 1/8] feat(falcon-PS9): Add custom.scss file to follow 7-in-1 structure --- falcon/_dev/css/theme/_index.scss | 1 + falcon/_dev/css/theme/custom/_custom.scss | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 falcon/_dev/css/theme/custom/_custom.scss diff --git a/falcon/_dev/css/theme/_index.scss b/falcon/_dev/css/theme/_index.scss index 2efc03b..d3714c7 100644 --- a/falcon/_dev/css/theme/_index.scss +++ b/falcon/_dev/css/theme/_index.scss @@ -5,3 +5,4 @@ @import "layout/index"; @import "components/index"; +@import "custom/custom"; diff --git a/falcon/_dev/css/theme/custom/_custom.scss b/falcon/_dev/css/theme/custom/_custom.scss new file mode 100644 index 0000000..806fc61 --- /dev/null +++ b/falcon/_dev/css/theme/custom/_custom.scss @@ -0,0 +1,22 @@ +/* This is the main custom SCSS file for the Falcon theme. + +I am loosely following the 7 in 1 structure for better organization of the styles. Learn more here: +https://medium.com/@diyorbekjuraev77/be-a-master-at-creating-the-7-1-sass-pattern-776fdfb5a3b1 + +⚠️NOTE: All bootstrap overrides have been configured under themes/falcon/_dev/css/abstracts/variables/bootstrap */ + +//Abstracts: Things used throughout the site such as utility classes and generic overrides. +//@import "abstracts/mixins"; + +// Components: parts of the theme itself that are not associated with a module. +//@import "components/buttons"; + +// Modules: Styling for specific modules. +//@import "modules/"; + +//Layouts: Parts of a page, such as the header, footer, etc. +//@import "layout/footer"; +//@import "layout/header"; + +// Pages +//@import "pages/home"; From fd595a0e15dd93641ae05fef30494e05ecfed450 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Thu, 4 Dec 2025 15:21:42 +0100 Subject: [PATCH 2/8] feat(svg_icon): Add standard svg icons -Adds icons to use with the svg_icon smarty helper in the is_themecore module. See is_themecore-PS9 repo. - Uses chevron svg icons by default on bootstrap touchspin AND on main menu if it has children. --- falcon/_dev/img/bag.svg | 6 + falcon/_dev/img/chevron_down.svg | 3 + falcon/_dev/img/chevron_left.svg | 3 + falcon/_dev/img/chevron_right.svg | 3 + falcon/_dev/img/chevron_up.svg | 3 + falcon/_dev/img/heart.svg | 3 + falcon/_dev/img/person.svg | 6 + falcon/_dev/img/search.svg | 3 + falcon/_dev/js/theme/components/product.js | 168 ++++++++++++--------- falcon/modules/ps_mainmenu/ps_mainmenu.tpl | 7 +- 10 files changed, 129 insertions(+), 76 deletions(-) create mode 100644 falcon/_dev/img/bag.svg create mode 100644 falcon/_dev/img/chevron_down.svg create mode 100644 falcon/_dev/img/chevron_left.svg create mode 100644 falcon/_dev/img/chevron_right.svg create mode 100644 falcon/_dev/img/chevron_up.svg create mode 100644 falcon/_dev/img/heart.svg create mode 100644 falcon/_dev/img/person.svg create mode 100644 falcon/_dev/img/search.svg diff --git a/falcon/_dev/img/bag.svg b/falcon/_dev/img/bag.svg new file mode 100644 index 0000000..efbc783 --- /dev/null +++ b/falcon/_dev/img/bag.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/falcon/_dev/img/chevron_down.svg b/falcon/_dev/img/chevron_down.svg new file mode 100644 index 0000000..9af8f01 --- /dev/null +++ b/falcon/_dev/img/chevron_down.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/chevron_left.svg b/falcon/_dev/img/chevron_left.svg new file mode 100644 index 0000000..4e540e3 --- /dev/null +++ b/falcon/_dev/img/chevron_left.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/chevron_right.svg b/falcon/_dev/img/chevron_right.svg new file mode 100644 index 0000000..9c43f23 --- /dev/null +++ b/falcon/_dev/img/chevron_right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/falcon/_dev/img/chevron_up.svg b/falcon/_dev/img/chevron_up.svg new file mode 100644 index 0000000..31a0429 --- /dev/null +++ b/falcon/_dev/img/chevron_up.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/heart.svg b/falcon/_dev/img/heart.svg new file mode 100644 index 0000000..8a051f4 --- /dev/null +++ b/falcon/_dev/img/heart.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/person.svg b/falcon/_dev/img/person.svg new file mode 100644 index 0000000..c2d71cc --- /dev/null +++ b/falcon/_dev/img/person.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/falcon/_dev/img/search.svg b/falcon/_dev/img/search.svg new file mode 100644 index 0000000..ae29bf0 --- /dev/null +++ b/falcon/_dev/img/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/js/theme/components/product.js b/falcon/_dev/js/theme/components/product.js index 05875a4..4f59eee 100644 --- a/falcon/_dev/js/theme/components/product.js +++ b/falcon/_dev/js/theme/components/product.js @@ -1,90 +1,108 @@ -import $ from 'jquery'; -import prestashop from 'prestashop'; +import $ from "jquery"; +import prestashop from "prestashop"; $(() => { - const createInputFile = () => { - $('.js-file-input').on('change', (event) => { - const target = $(event.currentTarget)[0]; - const file = (target) ? target.files[0] : null; + const createInputFile = () => { + $(".js-file-input").on("change", (event) => { + const target = $(event.currentTarget)[0]; + const file = target ? target.files[0] : null; - if (target && file) { - $(target).prev().text(file.name); - } - }); - }; + if (target && file) { + $(target).prev().text(file.name); + } + }); + }; - const createProductSpin = () => { - const $quantityInput = $('#quantity_wanted'); + const createProductSpin = () => { + const $quantityInput = $("#quantity_wanted"); - $quantityInput.TouchSpin({ - verticalupclass: 'material-icons touchspin-up', - verticaldownclass: 'material-icons touchspin-down', - buttondown_class: 'btn btn-touchspin js-touchspin', - buttonup_class: 'btn btn-touchspin js-touchspin', - min: parseInt($quantityInput.attr('min'), 10), - max: 1000000, - }); + $quantityInput.TouchSpin({ + min: parseInt($quantityInput.attr("min"), 10), + max: 1000000, + verticalbuttons: true, + verticalupclass: "btn btn-touchspin js-touchspin", + verticaldownclass: "btn btn-touchspin js-touchspin", + verticalup: + 'Up', + verticaldown: + 'Down', + }); - $quantityInput.on('focusout', () => { - if ($quantityInput.val() === '' || $quantityInput.val() < $quantityInput.attr('min')) { - $quantityInput.val($quantityInput.attr('min')); - $quantityInput.trigger('change'); - } - }); + $quantityInput.on("focusout", () => { + if ( + $quantityInput.val() === "" || + $quantityInput.val() < $quantityInput.attr("min") + ) { + $quantityInput.val($quantityInput.attr("min")); + $quantityInput.trigger("change"); + } + }); - $('body').on('change keyup', '#quantity_wanted', (event) => { - $(event.currentTarget).trigger('touchspin.stopspin'); - prestashop.emit('updateProduct', { - eventType: 'updatedProductQuantity', - event, - }); - }); - }; + $("body").on("change keyup", "#quantity_wanted", (event) => { + $(event.currentTarget).trigger("touchspin.stopspin"); + prestashop.emit("updateProduct", { + eventType: "updatedProductQuantity", + event, + }); + }); + }; - createProductSpin(); - createInputFile(); - let updateEvenType = false; - - prestashop.on('updateProduct', ({ eventType }) => { - updateEvenType = eventType; - }); - - prestashop.on('updateCart', (event) => { - if ( - prestashop.page.page_name === 'product' - && parseInt(event.reason.idProduct, 10) === parseInt($('#add-to-cart-or-refresh').find('[name="id_product"]').val(), 10)) { - prestashop.emit('updateProduct', { - event, - resp: {}, - reason: { - productUrl: prestashop.urls.pages.product || '', - }, - }); - } - }); - - prestashop.on('updatedProduct', (event) => { + createProductSpin(); createInputFile(); + let updateEvenType = false; - if (event && event.product_minimal_quantity) { - const minimalProductQuantity = parseInt(event.product_minimal_quantity, 10); - const quantityInputSelector = '#quantity_wanted'; - const quantityInput = $(quantityInputSelector); + prestashop.on("updateProduct", ({ eventType }) => { + updateEvenType = eventType; + }); - // @see http://www.virtuosoft.eu/code/bootstrap-touchspin/ about Bootstrap TouchSpin - quantityInput.trigger('touchspin.updatesettings', { - min: minimalProductQuantity, - }); - } + prestashop.on("updateCart", (event) => { + if ( + prestashop.page.page_name === "product" && + parseInt(event.reason.idProduct, 10) === + parseInt( + $("#add-to-cart-or-refresh") + .find('[name="id_product"]') + .val(), + 10 + ) + ) { + prestashop.emit("updateProduct", { + event, + resp: {}, + reason: { + productUrl: prestashop.urls.pages.product || "", + }, + }); + } + }); - if (updateEvenType === 'updatedProductCombination') { - $('.js-product-images').replaceWith(event.product_cover_thumbnails); - $('.js-product-images-modal').replaceWith(event.product_images_modal); - prestashop.emit('updatedProductCombination', event); - } + prestashop.on("updatedProduct", (event) => { + createInputFile(); - updateEvenType = false; + if (event && event.product_minimal_quantity) { + const minimalProductQuantity = parseInt( + event.product_minimal_quantity, + 10 + ); + const quantityInputSelector = "#quantity_wanted"; + const quantityInput = $(quantityInputSelector); - prestashop.pageLazyLoad.update(); - }); + // @see http://www.virtuosoft.eu/code/bootstrap-touchspin/ about Bootstrap TouchSpin + quantityInput.trigger("touchspin.updatesettings", { + min: minimalProductQuantity, + }); + } + + if (updateEvenType === "updatedProductCombination") { + $(".js-product-images").replaceWith(event.product_cover_thumbnails); + $(".js-product-images-modal").replaceWith( + event.product_images_modal + ); + prestashop.emit("updatedProductCombination", event); + } + + updateEvenType = false; + + prestashop.pageLazyLoad.update(); + }); }); diff --git a/falcon/modules/ps_mainmenu/ps_mainmenu.tpl b/falcon/modules/ps_mainmenu/ps_mainmenu.tpl index a6b8dff..81dd436 100644 --- a/falcon/modules/ps_mainmenu/ps_mainmenu.tpl +++ b/falcon/modules/ps_mainmenu/ps_mainmenu.tpl @@ -20,6 +20,11 @@ {if $node.open_in_new_window} target="_blank" {/if} > {$node.label} + {if $node.children|count} + + {svg_icon file='chevron_down.svg' } + + {/if} {if $node.children|count} {* Cannot use page identifier as we can have the same page several times *} @@ -51,4 +56,4 @@ - + \ No newline at end of file From 4d7880fcec2c302f08aae06778d79560b1281354 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 14:10:26 +0100 Subject: [PATCH 3/8] feat(svg_icon): Fixed some icon svg codes, added hamburger-menu icon --- falcon/_dev/img/chevron_down.svg | 4 ++-- falcon/_dev/img/chevron_right.svg | 4 ++-- falcon/_dev/img/hamburger-menu.svg | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 falcon/_dev/img/hamburger-menu.svg diff --git a/falcon/_dev/img/chevron_down.svg b/falcon/_dev/img/chevron_down.svg index 9af8f01..64b5016 100644 --- a/falcon/_dev/img/chevron_down.svg +++ b/falcon/_dev/img/chevron_down.svg @@ -1,3 +1,3 @@ - - + + diff --git a/falcon/_dev/img/chevron_right.svg b/falcon/_dev/img/chevron_right.svg index 9c43f23..409f028 100644 --- a/falcon/_dev/img/chevron_right.svg +++ b/falcon/_dev/img/chevron_right.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/falcon/_dev/img/hamburger-menu.svg b/falcon/_dev/img/hamburger-menu.svg new file mode 100644 index 0000000..603e8b9 --- /dev/null +++ b/falcon/_dev/img/hamburger-menu.svg @@ -0,0 +1,3 @@ + + + From 982dc1003866d1a5bbec713335623813b3fa80f9 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 14:14:38 +0100 Subject: [PATCH 4/8] feat(svg_icon): Add x icon; add svg_icon support for header heart icon --- falcon/_dev/img/x.svg | 20 +++++++++++++++++++ .../views/templates/hook/top.tpl | 19 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 falcon/_dev/img/x.svg create mode 100644 falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl diff --git a/falcon/_dev/img/x.svg b/falcon/_dev/img/x.svg new file mode 100644 index 0000000..61979ba --- /dev/null +++ b/falcon/_dev/img/x.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl new file mode 100644 index 0000000..259802d --- /dev/null +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl @@ -0,0 +1,19 @@ + From f2192d11dbe324703edd9c0b825f1ec0b336199b Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 14:18:09 +0100 Subject: [PATCH 5/8] feat(svg_icon): Add checkmark icon --- falcon/_dev/img/checkmark.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 falcon/_dev/img/checkmark.svg diff --git a/falcon/_dev/img/checkmark.svg b/falcon/_dev/img/checkmark.svg new file mode 100644 index 0000000..87168de --- /dev/null +++ b/falcon/_dev/img/checkmark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 6af020d81fbca98ee88a2ac8c9bbf435d14d5de2 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 14:25:08 +0100 Subject: [PATCH 6/8] feat(svg-icon): Add svg_icon support for favoriteproducts module --- .../views/templates/hook/button-product.tpl | 29 +++++++++++++++++++ .../views/templates/hook/button.tpl | 28 ++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl create mode 100644 falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl new file mode 100644 index 0000000..f120e65 --- /dev/null +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl @@ -0,0 +1,29 @@ + + diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl new file mode 100644 index 0000000..0188a2d --- /dev/null +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl @@ -0,0 +1,28 @@ + + +
+ {capture name="svg_output"}{svg_icon file='heart.svg'}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite + {/if} +
+
+ {capture name="svg_output"}{svg_icon file='heart.svg' width="22"}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite_border + {/if} + +
+
From 523c7d573cf9c0058ea2245a9ecba433fa7950b0 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 15:36:30 +0100 Subject: [PATCH 7/8] feat(svg_icon): Add svg_icon support for header --- .../views/templates/hook/is_searchbar.tpl | 22 +++++ .../views/templates/hook/is_shoppingcart.tpl | 89 +++++++++++++++++++ .../ps_customersignin/ps_customersignin.tpl | 7 +- 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl create mode 100644 falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl diff --git a/falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl b/falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl new file mode 100644 index 0000000..d51da7d --- /dev/null +++ b/falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl b/falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl new file mode 100644 index 0000000..c15d237 --- /dev/null +++ b/falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl @@ -0,0 +1,89 @@ +{** + * 2007-2020 PrestaShop and Contributors + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (AFL-3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * https://opensource.org/licenses/AFL-3.0 + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * @author PrestaShop SA + * @copyright 2007-2020 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + *} + +
+ +
diff --git a/falcon/modules/ps_customersignin/ps_customersignin.tpl b/falcon/modules/ps_customersignin/ps_customersignin.tpl index bc98a32..681ff4a 100644 --- a/falcon/modules/ps_customersignin/ps_customersignin.tpl +++ b/falcon/modules/ps_customersignin/ps_customersignin.tpl @@ -34,7 +34,12 @@ {/if} >
- person + {capture name="svg_output"}{svg_icon file='person.svg'}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + person + {/if}
From 5c7750e15d72a18e4ad313264eccb3e4f81ead3c Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 15:53:14 +0100 Subject: [PATCH 8/8] feat(svg_icon): Add chevron_down to footer & menu --- .../views/templates/hook/button-product.tpl | 2 +- falcon/modules/ps_contactinfo/ps_contactinfo.tpl | 8 +++++++- .../ps_customeraccountlinks/ps_customeraccountlinks.tpl | 8 +++++++- .../ps_linklist/views/templates/hook/linkblock-column.tpl | 8 +++++++- .../ps_linklist/views/templates/hook/linkblock.tpl | 8 +++++++- falcon/modules/ps_mainmenu/ps_mainmenu.tpl | 7 ++++++- 6 files changed, 35 insertions(+), 6 deletions(-) diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl index f120e65..5d00fb0 100644 --- a/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl @@ -18,7 +18,7 @@ {/if}
- {capture name="svg_output"}{svg_icon file='heart.svg'}{/capture} + {capture name="svg_output"}{svg_icon file='heart.svg' width="22"}{/capture} {if $smarty.capture.svg_output} {$smarty.capture.svg_output nofilter} {else} diff --git a/falcon/modules/ps_contactinfo/ps_contactinfo.tpl b/falcon/modules/ps_contactinfo/ps_contactinfo.tpl index bcbe054..278c738 100644 --- a/falcon/modules/ps_contactinfo/ps_contactinfo.tpl +++ b/falcon/modules/ps_contactinfo/ps_contactinfo.tpl @@ -28,7 +28,13 @@ diff --git a/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl b/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl index 0756b45..09ae64f 100644 --- a/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl +++ b/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl @@ -28,7 +28,13 @@ diff --git a/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl b/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl index d6f261f..d4174ea 100644 --- a/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl +++ b/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl @@ -4,7 +4,13 @@