Code from header.tpl
Code: Select all
<a href="<?php echo $checkout; ?>"><img src="catalog/view/theme/default/image/icon_checkout.png" alt="" /><?php echo $text_checkout; ?></a>
Code: Select all
$this->data['text_checkout'] = $this->language->get('text_checkout');
$this->data['checkout'] = $this->url->https('checkout/shipping');
Code: Select all
$_['text_checkout'] = 'Checkout';
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Code: Select all
<a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a>
Code: Select all
Notice: Undefined index: product_id in /vservers/survivalstrat/htdocs/store/catalog/controller/module/cart.php on line 59Notice: Undefined index: quantity in /vservers/survivalstrat/htdocs/store/catalog/controller/module/cart.php on line 59
The correct code to use for your button would be-
Code: Select all
<a onclick="location='<?php echo $checkout; ?>'" class="button"><span><?php echo $text_checkout; ?></span></a>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Code: Select all
$output .= '<a onclick="location=' . $this->url->https('checkout/shipping') . '" class="button"><span>' . $this->language->get('text_checkout') . '</span></a>';
Code: Select all
$this->response->setOutput($output);
Don't know if it will work though.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Edit: Is there an easy way to compile all this to make it a contribution? Maybe other people would like to easily add this functionality.
Glad to hear it worked.nosleephotel wrote:Viola! Seems to do the trick. Thanks fido!
Done! Now available as a module from contributions http://www.opencart.com/index.php?route ... ion_id=259Edit: Is there an easy way to compile all this to make it a contribution? Maybe other people would like to easily add this functionality.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Easy enough, it was only 3 files anyway!nosleephotel wrote:Wow, fast work, fido! Kudos.
Good point. Should have thought of that when I uploaded - bit late to do it now!One suggestion, reading "This module (or modification) provides a "Checkout" button in your shopping cart." it's not totally clear how this is different from the "Checkout" in the top nav thus beneficial. I would modify it to say "This module (or modification) provides a "Checkout" button in your Cart module."
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
As it turned out, I forgot to center the button and add a margin above it anyway.nosleephotel wrote:I guess so. No edit function on the contribution section I see. Maybe another version of the contrib.
Fixes applied and updated on contributions.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
fido, did you write simple instructions on what files to replace?
Yes, I certainly did!nosleephotel wrote:fido, did you write simple instructions on what files to replace?
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Users browsing this forum: No registered users and 46 guests