@burt - thanks for the heads up on the startCheckout Hook I will definitly use that instead of what I was trying...
However I am still getting errors...
@Kofod95 when I use your suggestion of;
Code: Select all
Guarantor::ensure_global('Href')::redirect($Linker->build('shopping_cart.php'));Code: Select all
PHP Fatal error: Uncaught Error: Call to a member function build() on null in .../includes/hooks/shop/checkout/MinOrderRedirect.php:6
Stack trace:
#0 /.../includes/system/versioned/1.0.8.1/hooks.php(160): hook_shop_checkout_MinOrderRedirect->listen_startCheckout(Array)
#1 /.../includes/system/segments/checkout/pipeline.php(14): hooks->generate('startCheckout')
#2 /.../checkout_shipping.php(15): require('/home/devcreat/...')
#3 {main}
thrown in /.../includes/hooks/shop/checkout/MinOrderRedirect.php on line 6Code: Select all
$Href = Guarantor::ensure_global('Href');
$Linker = Guarantor::ensure_global('Linker');
$Href::redirect($Linker->build('shopping_cart.php'));Code: Select all
Href::redirect(Guarantor::ensure_global('Linker')->build('shopping_cart.php'));Code: Select all
PHP Warning: Cannot modify header information - headers already sent by (output started at /.../includes/hooks/shop/checkout/MinOrderRedirect.php:14) in /.../includes/system/versioned/1.0.8.5/href.php on line 195Code: Select all
<?php
class hook_shop_checkout_MinOrderRedirect {
function listen_startCheckout() {
$Href = Guarantor::ensure_global('Href');
$Linker = Guarantor::ensure_global('Linker');
$Href::redirect($Linker->build('shopping_cart.php'));
}
}
?>