Hi guys, I would like to duplicate checkout and failure pages and use one for COD payment and the other one for Credit card, can anyone tell me how to do this?
Thanks!
Thanks!
Last edited by katalin on Thu Feb 02, 2023 12:59 am, edited 1 time in total.
Because I want to have different success messages if user pays with COD or Credit card. If he uses credit card if the payment is accepted I want to let the user know it's good. If user chooses COD I will like to insert some info about how to pay on delivery.
This can be done on the same page with a modification.Because I want to have different success messages if user pays with COD or Credit card. If he uses credit card if the payment is accepted I want to let the user know it's good. If user chooses COD I will like to insert some info about how to pay on delivery.
On the other hand, the success page is a special place whre the analyitcs, remarketing, and fb pixel are implemented.
If you add a second success page you will need to modify all these extensions.
Suppliers Module - XML, CSV, XLS Product Feed Import and Update
Rich Snippets | Facebook Open Graph Meta Tags | WebP Images
And how can I do that? Would you help me with this?agatha65 wrote: ↑Tue Jan 31, 2023 6:01 amThis can be done on the same page with a modification.Because I want to have different success messages if user pays with COD or Credit card. If he uses credit card if the payment is accepted I want to let the user know it's good. If user chooses COD I will like to insert some info about how to pay on delivery.
On the other hand, the success page is a special place whre the analyitcs, remarketing, and fb pixel are implemented.
If you add a second success page you will need to modify all these extensions.
catalog/controller/checkout/success.php
After
$this->cart->clear();
template/common/success.twig
Modify accordingly
After
$this->cart->clear();
Code: Select all
if (isset($this->session->data['payment_method']['code'])) {
if ($this->session->data['payment_method']['code'] == 'cod') {
$data['addcontent'] = $this->language->get('text_cod_instruction');
} else {
$data['addcontent'] = $this->language->get('text_card_instruction');
}
} else {
$data['addcontent'] = '';
}
Modify accordingly
If you are interested in discussing your web development needs with me, please feel free to contact me at
soh.bheng@gmail.com
Works perfectly. Thanks!SohBH wrote: ↑Tue Jan 31, 2023 8:53 pmcatalog/controller/checkout/success.php
After
$this->cart->clear();
template/common/success.twigCode: Select all
if (isset($this->session->data['payment_method']['code'])) { if ($this->session->data['payment_method']['code'] == 'cod') { $data['addcontent'] = $this->language->get('text_cod_instruction'); } else { $data['addcontent'] = $this->language->get('text_card_instruction'); } } else { $data['addcontent'] = ''; }
Modify accordingly
Who is online
Users browsing this forum: apnsolution, fatihcr and 16 guests