Thanks for such a fabulous mod!
If anyone has a sec, I have a non-important issue I'm hoping to get help with. (Sorry - I'm still trying to wrap my head around how the functions work.)
I added SFL to the "my account" page but am having trouble modifying the redirect to suit my situation.
In includes/functions/extra-functions/sfl_functions.php, I tried adding an if statement to the redirect of the actionRemoveProduct function so it now reads:
PHP Code:
// from actionRemoveProduct in shopping cart class
function actionRemoveProduct($parameters) {
if (!$_SESSION['customer_id']) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
if (isset($_GET['product_id']) && zen_not_null($_GET['product_id']))
remove($_GET['product_id']);
if ($_GET['main_page'] == 'shopping_cart') {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
}else{
zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
}
but it redirects to the account page regardless of where the item is deleted from. And if I switch the if statement, it always redirects back to the shopping cart.
I'm (slowly) learning php and would appreciate any assistance (with an explanation as to why it's ignoring the first part of the if statement if possible). Thanks in advance!
Bookmarks