Re: Need help editing the cart summary sidebox mod
Quote:
Originally Posted by
customk1
im not sure what you tried, when you say that it just moved to the "center"... did you define it in the CSS as:
#navMainCartSummary {
I had the #navMainCartSummary { then with code that you gave to me underneath.
It made the shopping basket in my header move to the left and also the main links in the centre became a sqashed up above the shopping basket and moved my search box up into the header.
I can work on the basics, but this code writing is very difficult for me to get to grips with, im so grateful for those attempting to help me out.
Re: Need help editing the cart summary sidebox mod
This line at the top of the file
PHP Code:
$item_separator = ($box_id == '') ? ' ' : '<br />';
says that if there is a box id (i.e. it is for a sidebox), use <br /> as the separator, otherwise use two spaces ' ' .
Try replacing the
' '
with
'<br />'
Re: Need help editing the cart summary sidebox mod
Thanks for looking over the code, unfortunatly it didnt work for me.
Re: Need help editing the cart summary sidebox mod
ok, so still the blind leading the blind here.. lol... (you and me anyways.. glen is "The Man!")
1st... PLEASE backup stuff, i am a try till i get it right b/c i dont know enough kinda person, and i am constantly cutting and pasting back stuff b/c i screwed it up! i dont want to impact your page at all... (with that said, you already pasted the code here, so you have a copy anyways...)
2. so based on what Glen was saying... if i were to try to read this code in "english", it says to me, if you want to separate items, you can use "  " (which are just spaces), or you can use <br /> (which is a break).
i looked thru your code, and each time it said ". item separator ." i just replaced it with <br /> if i wanted a break.
maybe this is too easy/TOO logical? but it makes sense to me... let me know if it works?
------------------------------------------------
/**
* cart_summary ("sidebox") - this sidebox can be used to display a summary of the customer's cart content in header or sidebox
*
* @package sideboxes
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: cart_summary.php $
*/
$item_separator = ($box_id == '') ? ' ' : '<br />';
$totalsDisplay = '';
switch (true) {
case (SHOW_TOTALS_IN_CART == '1'):
$totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . $item_separator . TEXT_TOTAL_WEIGHT . $_SESSION['cart']->show_weight() . TEXT_PRODUCT_WEIGHT_UNIT . <br /> . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
break;
case (SHOW_TOTALS_IN_CART == '2'):
$totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . ($_SESSION['cart']->show_weight() > 0 ? $item_separator . TEXT_TOTAL_WEIGHT . $_SESSION['cart']->show_weight() . TEXT_PRODUCT_WEIGHT_UNIT : '') . <br />. TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
break;
case (SHOW_TOTALS_IN_CART == '3'):
$totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . <br />. TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
break;
}
$content = $totalsDisplay;
Re: Need help editing the cart summary sidebox mod
Sorry to say that made no difference either. Ive had issues with the header displaying in Firefox incorrectly and have been advised that my coding is very poor.
This is the code that i have been using so maybe if someone could advise me on how to clean it up it will enable the problem in this thread to be cleared.
<ul class="forward"><div id="cart"><div class="cart_all"><div class="cart_header"></div><div><img src=http://www.bodykitsonline.co.uk/test...s/cart_top.jpg border="0" /> <div id="navMainCartSummary"><?php require(DIR_WS_MODULES . 'sideboxes/cart_summary.php'); ?></div><br><a href="http://www.bodykitsonline.co.uk/test/index.php?main_page=shopping_cart"><img src=http://www.bodykitsonline.co.uk/test/includes/templates/custom/images/button_view.jpg border="0" /></a> <a href="http://www.bodykitsonline.co.uk/test/index.php?main_page=checkout_shipping"><img src=http://www.bodykitsonline.co.uk/test/includes/templates/custom/images/button_checkout.jpg border="0" /></a></div><br class="clearBoth" /></div></div><div></div><div></div>
</ul>
Re: Need help editing the cart summary sidebox mod
where did you get this coding? is it from a zencart template?
if its not from a template, or if it is code from a template that you have modified, what did you change, and why (ie what are you trying to accomplish)?
Re: Need help editing the cart summary sidebox mod
Its a bit of a mix and match.
I copied the intial code from http://www.tapes-direct.co.uk then changed it a bit to work with my site,
I couldnt get the amount, weight and price to change when parts were added, so i downlaoded the cart summary box and started to work around that.
Re: Need help editing the cart summary sidebox mod
are you working within the zencart structure/admin etc?
Re: Need help editing the cart summary sidebox mod
guess you are lol b/c you have it loaded on your test site.
is the header the first thing you have really worked on modifying with your zencart page?
Re: Need help editing the cart summary sidebox mod
bah! that whole page is hacked up! :) no wonder ur frustrated (this is soooo the pot calling the kettle "black") HAHAHA
just one thing i noticed right away is you are calling a list here:
<ul class="forward"><div id="cart"><div class="cart_all"><div
class="cart_header"><div<img
src="http://www.bodykitsonline.co.uk/test/includes/templates/custom/images/cart_top.jpg"
border="0" /> <div id="navMainCartSummary"> Items: 0 Amount: £0.00</div><br><a
href="http://www.bodykitsonline.co.uk/test/index.php?main_page=shopping_cart"><img
src="http://www.bodykitsonline.co.uk/test/includes/templates/custom/images/button_view.jpg"
border="0" /></a> <a
href="http://www.bodykitsonline.co.uk/test/index.php?main_page=checkout_shipping"><img
src="http://www.bodykitsonline.co.uk/test/includes/templates/custom/images/button_checkout.jpg"
border="0" /></a></div><br class="clearBoth" /></div></div><div></div><div></div>
</ul>
but then dont list anything with list tags..
you have the <ul> but no <li>
sooooo, long and short, here is what I would do (because this is exactly what i had to do a few days ago). 1st, IF the header is the only thing you have messed with so far... i would dump everything and re-install zencart. (i say this because, you prob. did exactly like i did.. jumped in with both feet, and started messing around with files, and basically started working on the "originals" instead of the templates... and it became a MESS)....
after you re-install zencart... find a template you like, this is a good site: http://(sorry, site offline)/
they are all free, and you can scroll thru and find the one that is "closest" to what you are trying to accomplish... right out of the box.
then, we can knock out some of the "default" stuff, like changing header image etc. then go back and put these links/mods in their correct places.
if you decide to tackle it this way, let me know, we can correspond by email or IM so as to not hijack the forum...