diff --git a/src/js/theme.ts b/src/js/theme.ts index b7271d336..5ff971f41 100644 --- a/src/js/theme.ts +++ b/src/js/theme.ts @@ -32,6 +32,12 @@ initEmitter(); $(() => { const {prestashop, Theme: {events}} = window; + // @TODO: Fix this on core.js side inside a major version of PrestaShop instead of minor + // For reference: https://github.com/PrestaShop/hummingbird/pull/418#discussion_r1061938669 + document.querySelectorAll('[name="token"]').forEach((el) => { + el.value = prestashop.static_token; + }); + initProductBehavior(); initQuickview(); initCheckout(); diff --git a/templates/catalog/_partials/miniatures/product.tpl b/templates/catalog/_partials/miniatures/product.tpl index 0a47a0188..aaddfbf54 100644 --- a/templates/catalog/_partials/miniatures/product.tpl +++ b/templates/catalog/_partials/miniatures/product.tpl @@ -168,6 +168,30 @@ {/block} + {if $product.add_to_cart_url} +
+ + +
+ {include file='components/qty-input.tpl' + attributes=[ + "id"=>"quantity_wanted_{$product.id_product}", + "value"=>"1", + "min"=>"{if $product.quantity_wanted}{$product.minimal_quantity}{else}1{/if}" + ] + marginHelper="mb-0" + } +
+ +
+ {else} + + {l s='See details' d='Shop.Theme.Actions'} + + {/if} {/block} diff --git a/templates/components/qty-input.tpl b/templates/components/qty-input.tpl index 2de174e42..56846c760 100644 --- a/templates/components/qty-input.tpl +++ b/templates/components/qty-input.tpl @@ -18,7 +18,7 @@ {assign var="append" value=["button"=>"increment", "icon"=>$increment_icon, "confirm_icon"=>$submit_icon]} {/if} -
+