1. EDIT: catalog/view/theme/default/template/common/header.tpl
2. FIND:
Code: Select all
<?php echo $text_cart; ?>
Code: Select all
<?php echo $text_cart; ?> (<?php echo $this->cart->countProducts(); ?>)
I too would like to add this to the header just as i already have done but how do i get it to update instantly when something is added, just like it does in the cart module? Basically what i am trying to achieve is, moving the cart module in to my header & showing the total count of products just like you have explained here & it does work but it only updates when the page is refreshed or changed to another page. I am also trying to show the sub-total in the header too, with that also instantly updating without the need for refreshing or changing pages. All in all, i am trying to move the cart module to the header but only showing the product count & sub-total. I can do all of this but it does not update instantly when an item is added to cart!
I have seen another website that has achieved this which can be seen here : http://www.mygineration.co.uk/
this is something along the lines of what i am trying to achieve.
cheers
h
Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com
cheers for your help

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com

All i can think of is to somehow try & merge the cart.tpl in with the header.tpl but i'm struggling to get the 'controller' header.php & cart.php combined to work together. This is the only way i can think of to get the cart to update in my header unless somebody else out there knows how to achieve this

Any suggestion / ideas / or anybody know how to do this?
If all else fails, i suppose i can contact the designers of the above site

cheers
h
Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com

i've tried a few ways but keep getting different errors or the page just vanishes due to the merging of the 2 lots of php codes & i have also merged the header.tpl & cart.tpl & also the langauge files too but its not all that straight forward

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com

Instead of merging the elements known as header with cart.... instead change it so that the cart module is by itself above the header. Then remove the outer "box" so that only the insides are there
You will have to edit the layout.tpl file to add a conditional for that box like:
CHANGE:
Code: Select all
<div id="column_right">
<?php foreach ($modules as $module) { ?>
<?php if ($module['position'] == 'right') { ?>
<?php echo ${$module['code']}; ?>
<?php } ?>
<?php } ?>
</div>
Code: Select all
<div id="column_right">
<?php foreach ($modules as $module) { ?>
<?php if ($module['position'] == 'right' && $module['code'] != 'cart') { ?>
<?php echo ${$module['code']}; ?>
<?php } ?>
<?php } ?>
</div>
Code: Select all
<?php foreach ($modules as $module) { ?>
<?php if ($module['code'] == 'cart') { ?>
<?php echo ${$module['code']}; ?>
<?php } ?>
<?php } ?>
// Response
$response = new Response();
$response->addHeader('Content-Type', 'text/html; charset=UTF-8');
Registry::set('response', $response);
Dont know if it is anything to do with it or whats causing these characters to display before a '£' sign & im also going to get in touch with the hosts of our site to see if its anything to do with them but thought i would ask here 1st

cheers
h
Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com
Is it possible that this piece of code would work if placed in a div on a page of my own making that was hosted on the same server as opencart version 1.4.9.6? Specifically I'm thinking about this page: floathousebooks.com/addons.php and this opencart: floathousebooks.com/opencart/uploadQphoria wrote:Try to think outside the box
Code: Select all
<?php foreach ($modules as $module) { ?> <?php if ($module['code'] == 'cart') { ?> <?php echo ${$module['code']}; ?> <?php } ?> <?php } ?>
Cheers!

Users browsing this forum: No registered users and 6 guests