bashers Posted May 6, 2011 Share Posted May 6, 2011 I've been working on a new shop using the new 2.3 code We only use Paypal express as a payment type at the moment but we are not able to prevent sales completing if the item is out of stock using this payment module. Although we use QTpro on some items and this can hide out of stock goods, other things aren't listed this way I thought this may be due to the customisation we've been doing but i tried a vanilla install today and the same thing happens there. Obviously we have configured "Allow checkout" as false in the admin section Is there any way this can be prevented. Ashley Link to comment Share on other sites More sharing options...
germ Posted May 7, 2011 Share Posted May 7, 2011 Correct me if I'm wrong but you need to hide the Paypal button on the shopping cart page if any items in the basket are out of stock? :unsure: The code that displays the button currently doesn't take stock quantity into account, or whether you have "Allow Checkout" set to false. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
bashers Posted May 8, 2011 Author Share Posted May 8, 2011 Correct me if I'm wrong but you need to hide the Paypal button on the shopping cart page if any items in the basket are out of stock? :unsure: The code that displays the button currently doesn't take stock quantity into account, or whether you have "Allow Checkout" set to false. yeh, i guess i'll have to use the standard paypal checkout instead. what a waste of a module Link to comment Share on other sites More sharing options...
germ Posted May 8, 2011 Share Posted May 8, 2011 Not necessarily.... In /catalog/shopping_cart.php replace this code: if (!empty($initialize_checkout_methods)) { ?> <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <p align="right"><?php echo $value; ?></p> <?php } } ?> </div> </form> With this code: if ( !empty($initialize_checkout_methods) ) { if ($any_out_of_stock == 1) { if (STOCK_ALLOW_CHECKOUT == 'true') { ?> <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <p align="right"><?php echo $value; ?></p> <?php } } } else { ?> <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p> <?php reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { ?> <p align="right"><?php echo $value; ?></p> <?php } } } ?> </div> </form> BACKUP THE FILE BEFORE EDITING. I tested this and it worked for me. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
bashers Posted May 11, 2011 Author Share Posted May 11, 2011 You Absolute Star!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.