Can you help me? Best regards.
PrestaShop expert answer about custom input field during checkout
Hello, for me everything is clear. Case requires minor coding skills. It can be easily implemented.
- input field
In your case you need to use hook "displayShoppingCart" - to create an input field in cart (at the top of it as you show on screenshot)
To form where the input field will appear create <input type="hidden"> with value equal to the ID of cart: $this->context->cart->id
When someone will fill the code there, save it in dedicated database table (you need to create it):
- cart_id
- code_value - hookDisplayOrderConfirmation
then use hookDisplayOrderConfirmation to show it after checkout.
you can use sql query to get the code_value that was saved in your database table (hookDisplayOrderConfirmation returns an ID of order, you can use it to get the cart id)
If I were you - this is the know-how that i will use to build such feature
0 comments:
Post a Comment