Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
carlwhat
Correct
Re: One-Page Checkout [Support Thread]
Just sayin ... lat9 isn't going to be able to inspect or identify any possible issues without access to that mod's code. Contact her by PM with a copy of the code for inspection. I'm sure she won't use it inappropriately.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
DrByte
Just sayin ... lat9 isn't going to be able to inspect or identify any possible issues without access to that mod's code. Contact her by PM with a copy of the code for inspection. I'm sure she won't use it inappropriately.
Quote:
Originally Posted by
mprough
Anyone using NUMINIX's store credit mod with OPC in 1.5.7?
~Melanie
I was inquiring for anyone who was using it. I wasn't asking anything else.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
mprough
I was inquiring for anyone who was using it. I wasn't asking anything else.
Fair, but I think lat9's query was an expression of willingness to test it, and potentially make it compatible or at least supported.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
DrByte
Fair, but I think lat9's query was an expression of willingness to test it, and potentially make it compatible or at least supported.
That's a correct interpretation.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
That's a correct interpretation.
Appreciate that, I'm trying to get a feel if it's time well spent or not. If no one uses it, then...
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
mprough
Anyone using NUMINIX's store credit mod with OPC in 1.5.7?
~Melanie
Quote:
Originally Posted by
carlwhat
Quote:
Originally Posted by
mprough
Appreciate that, I'm trying to get a feel if it's time well spent or not. If no one uses it, then...
Two alternatives of which I'm aware, but unfortunatly have no meaningful experience with, are Reward Points (free plugin) and another by TwitchToo (commercial).
Re: One-Page Checkout [Support Thread]
Zen Cart 1.5.7b
One-Page Checkout (One Page Checkout) - Version: v2.3.7
I've made some modifications to my site so that I can prevent specific products from being visible to customers from certain countries.
Whilst this works for the most part, I want to ensure that if a customer changes shipping address during checkout to a country that has restrictions, the restricted product is removed from the cart and a message advises the customer of this.
I've got shipping country detection working on main_page=checkout_one, but I'm struggling to find a way to remove the restricted product from the array.
I tried doing this
Code:
$selected_ship_country = $_SESSION['opc']->getAddressValues('ship')['country_id'];
foreach ($_SESSION['cart']->get_products() as $product) {
$check_for_restriction = $db->Execute("SELECT products_id
FROM " . TABLE_PRODUCTS . "
WHERE products_id = '" . $product['id'] . "'
AND restricted_country_id LIKE '%" . $selected_ship_country . "%'");
if ($check_for_restriction->RecordCount() > 0) {
remove($product['id']);
}
in the hope that calling the remove function of the shopping cart class would do the trick, but it didn't make any difference.
Is there a way to achieve this during checkout with OPC?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
strelitzia
Zen Cart 1.5.7b
One-Page Checkout (One Page Checkout) - Version: v2.3.7
I've made some modifications to my site so that I can prevent specific products from being visible to customers from certain countries.
Whilst this works for the most part, I want to ensure that if a customer changes shipping address during checkout to a country that has restrictions, the restricted product is removed from the cart and a message advises the customer of this.
I've got shipping country detection working on main_page=checkout_one, but I'm struggling to find a way to remove the restricted product from the array.
I tried doing this
Code:
$selected_ship_country = $_SESSION['opc']->getAddressValues('ship')['country_id'];
foreach ($_SESSION['cart']->get_products() as $product) {
$check_for_restriction = $db->Execute("SELECT products_id
FROM " . TABLE_PRODUCTS . "
WHERE products_id = '" . $product['id'] . "'
AND restricted_country_id LIKE '%" . $selected_ship_country . "%'");
if ($check_for_restriction->RecordCount() > 0) {
remove($product['id']);
}
in the hope that calling the remove function of the shopping cart class would do the trick, but it didn't make any difference.
Is there a way to achieve this during checkout with OPC?
i currently do not use OPC, although i have played around with it. i'm not sure this is where i would do it... but, if this is the spot i would try:
PHP Code:
//from:
remove($product['id']);
//to:
$_SESSION['cart']->remove($product['id']);
best.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
carlwhat
PHP Code:
//from:
remove($product['id']);
//to:
$_SESSION['cart']->remove($product['id']);
That worked a treat. Now I just need to figure out how to get the total to recalculate as it is still showing the value from before the item is removed!