misieq122 Posted December 1, 2022 Share Posted December 1, 2022 Hello, I need to display in my checkout page, block cart vocher(Have a promo code?) but i want to display this block from step 3(Shipping method) and 4(Payment). At this moment block are visable from step 1(personal information) so i need to hide this block in step 1 and 2. How to do this? Link to comment Share on other sites More sharing options...
catzarov Posted December 5, 2022 Share Posted December 5, 2022 Hello misieq122, Simply select the hook of the module to appear only with step 3 (above the module for delivery) or step 4 (sub-methods for payment) I hope I've been helpful Link to comment Share on other sites More sharing options...
misieq122 Posted December 6, 2022 Author Share Posted December 6, 2022 On 12/5/2022 at 11:27 AM, catzarov said: Hello misieq122, Simply select the hook of the module to appear only with step 3 (above the module for delivery) or step 4 (sub-methods for payment) I hope I've been helpful Thanks for the information, but I don't know which module is responsible for coupon block. I add coupons in Theme Catalog -> Discounts. Link to comment Share on other sites More sharing options...
catzarov Posted December 8, 2022 Share Posted December 8, 2022 Hello misieq122, I think I've got you now, what do you want to do, you want to show the form box for a voucher, not a message alert! I don't think it's right, but I'll share with you what I know. /themes/classic/templates/checkout/_partials/cart-voucher.tpl Get from this file from line "53" to line "74" the html code. <div id="promo-code" class="collapse{if $cart.discounts|count > 0} in{/if}"> <div class="promo-code"> {block name='cart_voucher_form'} <form action="{$urls.pages.cart}" data-link-action="add-voucher" method="post"> <input type="hidden" name="token" value="{$static_token}"> <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'}"> <button type="submit" class="btn btn-primary"><span>{l s='Add' d='Shop.Theme.Actions'}</span></button> </form> {/block} {block name='cart_voucher_notifications'} <div class="alert alert-danger js-error" role="alert"> <i class="material-icons"></i><span class="ml-1 js-error-text"></span> </div> {/block} <a class="collapse-button promo-code-button cancel-promo" role="button" data-toggle="collapse" data-target="#promo-code" aria-expanded="true" aria-controls="promo-code"> {l s='Close' d='Shop.Theme.Checkout'} </a> </div> </div> Then paste that code into a file: /themes/classic/templates/checkout/_partials/steps/payment.tpl on line 6, immediately after the line: {hook h='displayPaymentTop'} I haven't tested it in practice to see if it will work, but in that order of thought and action, if it doesn't work, look to revert your edit to the original version. best regards and success Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now