Creating Back Button

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Has thanked: 29 times
Been thanked: 4 times

Creating Back Button

Post by Portman »

Hi,
I am creating a Minimum order type function on my site....

I am currently reworking the tpl_cm_sc_checkout.php file with an;

if minimum order reached -> show checkout button
else -> show continue shopping button

so I am just using the same "Button" as the original button but was thinking that the best option was to go back to the previous page (IE before they went to checkout)...
so this is my code...

Code: Select all

<?= new Button(MODULE_CONTENT_SC_MIN_ORDER_CHECKOUT_BUTTON_CONTINUE_SHOPPING, 'fas fa-angle-right', 'btn-success btn-lg btn-block', [], $GLOBALS['Linker']->build('checkout_shipping.php')) ?>

essentially the same as the original...

2 questions;

1. what would I change $GLOBALS['Linker']->build('checkout_shipping.php') to to make it go back? - I've tried a few things with no luck.
2. is there a better class (or whatever) to use than "btn-success"? Is there a generally recognised convention that I should stick to and if so how do I find out what that would be?


Join The Code Co-op to get access to your library in the Code Co-op Forum
raiwa
Certified Developer
Posts: 1641
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: Creating Back Button

Post by raiwa »

Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Has thanked: 29 times
Been thanked: 4 times

Re: Creating Back Button

Post by Portman »

Thanks, that is what I was looking for!


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply