Kristofor Posted June 9, 2003 Posted June 9, 2003 Hi, can someone tell me, how i can move my shopping cart infobox to the header, but when it is in the header, i dont want it to look like a box, i spose i want to have the text int he box, and i want to put a little cart icon next to it, with a circle image i made behind it, www.righthereit.com/default.php thats what the layout of the header looks like, so how do i put the shopping cart into the header at a fixed position away from the logo without making a line under the logo, ok, thanks kristofor Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Guest Posted June 9, 2003 Posted June 9, 2003 Move the line calling the cart from your column_right.php into a new column in the table in the header. In shopping cart.php remove the infobox header, to remove the box appearance. Infobox contents will keep the contents in the same format, but depending on your setup shouldn't show as an actual box, IYSWIM. Shout if you need more help. :-)
Kristofor Posted June 9, 2003 Author Posted June 9, 2003 hi, can you give me an idea of which code to mess with in the shopping cart.php but i dont see how can i set my picture to be the backgroun for the infobox and have it look as though the circle image is the infobox?? Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Kristofor Posted June 9, 2003 Author Posted June 9, 2003 something else i just realised, i want it so that, it shows up as how many items total, in the cart, cause currently it shows how many of each item, i want that only to be viewed if the user clicks view cart, and i want in that circle to have a little shopping cart image the buyer clicks, and will dirrect them to the shopping cart info page thanks again kristofor Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Guest Posted June 9, 2003 Posted June 9, 2003 To add the image to that cell of the table <td backgound="images/yourbackgroundimage.jpg"> <?php require(DIR_WS_BOXES . 'shopping_cart.php'); ?></td> You may need to adjust the cellpadding to get it in the right place. I think this topic covers showing just the number of items. :?: To remove the infobox, comment out (around line 20 of shopping_cart.php) $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . BOX_HEADING_SHOPPING_CART . '</a>' ); new infoBoxHeading($info_box_contents); BACK UP FIRST Its also a good idea to keep an unaltered copy of the individual file you're working on saved somewhere else, so if/when you screw up (if you don't screw up, you're not trying hard enough :wink: ) its easier to restore than restoring a whole backup. hope that gets you going in the right direction.
Guest Posted June 9, 2003 Posted June 9, 2003 BTW your shopping cart code probably won't look exactly like that. :wink:
Kristofor Posted June 9, 2003 Author Posted June 9, 2003 ok, i tried that, but, what happens, is i get lines under the logo, which show the shopping cart info, i want to have it to the right of the logo, and sitting in my circle picture, if you look at the page, it shows the lines, which is really annoying, how could i make it so that it showd up and i could actually see my circle image Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Kristofor Posted June 9, 2003 Author Posted June 9, 2003 ok now i got it to appear to the right, but it doesnt have my image as the background Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Guest Posted June 10, 2003 Posted June 10, 2003 Unless someone can figure how to add it in shopping_cart.php, I think you need to create a new infoBoxContents class & add the {background-image: url(yourimage.jpg);} to the stylesheet. I tried this method out on my own shop & it does work, but without adding a new class it shows on all the boxes.
Guest Posted June 10, 2003 Posted June 10, 2003 I'm not sure that this is the most logical way to do this. Is the image you want to add to got actually behind the text, or just around it? Could you post the image? Perhaps some lateral thinking is called for here! :D
Kristofor Posted June 10, 2003 Author Posted June 10, 2003 yeh ok, this is the image, that i want behind the shop Also because it would be in the head, i need to restrict the cart so that it only shows the total number of items, eg 10x items in cart, instead of 1xdvd, 2xcomputer, then just to the right, ontop of that other image, which i want as the backgroud for the infor box i want to put a little image of a shopping cart, then if the user clicks that they get redirrected to the shopping cart page. i think this will look really good when i get it working, it would be cool, if we could work it out. thanks Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Kristofor Posted June 10, 2003 Author Posted June 10, 2003 umm, and can you explain how to add that thing to the style sheet without effecting the other boxes, , this is proving a hard one to solve, i have been changing stuff everywhere i can see, cant figure it out, Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Guest Posted June 10, 2003 Posted June 10, 2003 Create a new class in stylesheet.css - just add in infoBoxContentsCart { background-image: url(yourimage.jpg); ADD THE OTHER DETAILS FROM THE infoBoxContents CLASS HERE } & in shopping_cart.php replace infoBoxContents with infoBoxContentsCart. The other way to do it would be to split your image in to top, sides & bottom & position them around the outside of the infobox in a table.
Guest Posted June 10, 2003 Posted June 10, 2003 Also because it would be in the head, i need to restrict the cart so that it only shows the total number of items, eg 10x items in cart, instead of 1xdvd, 2xcomputer, then just to the right, ontop of that other image, which i want as the backgroud for the infor box i want to put a little image of a shopping cart, then if the user clicks that they get redirrected to the shopping cart page. i think this will look really good when i get it working, it would be cool, if we could work it out. thanks nearly forgot! :roll: that part is covered here - http://www.oscommerce.com/forums/viewtopic.php?t=35571
Kristofor Posted June 10, 2003 Author Posted June 10, 2003 hehehe, ok just with that infoboxcontents, thing, would that mean, every instance, where that occurs??? Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Kristofor Posted June 10, 2003 Author Posted June 10, 2003 that didnt work, i didnt see any change at all, what could i be doing wrong?? Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Kristofor Posted June 10, 2003 Author Posted June 10, 2003 just thought of something would i need to replace all the $info_box_contents with $info_box_contents_cart would that do anything???? Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Kristofor Posted June 10, 2003 Author Posted June 10, 2003 ok, now i got that in the header, i used some code from that link <?php if (($cart->count_contents() == "0")) { echo "Cart Empty"; }else{ ?> <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerTop"><?php echo $cart->count_contents(), ' Item(s) '; ?><?php echo $currencies->format($cart->show_total()); ?><?php echo tep_image(DIR_WS_IMAGES . 'infobox/cart.gif', 'Shopping Cart'); ?></a></td> <?php } ?> i went back and put the background in the <td> tag thats in the header, but now i need to make them allign, and not repeat the background which i want to appear where the text is. Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Guest Posted June 10, 2003 Posted June 10, 2003 Looking good! 8) Add to your infoBoxContentsCart class in the stylesheet background-repeat: no-repeat; background-position: center center
Kristofor Posted June 11, 2003 Author Posted June 11, 2003 yeh, but im not using the shopping cart info box now at all, so i dont have that class anymore. Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
Guest Posted June 11, 2003 Posted June 11, 2003 Add the class in the header.php <tr><td align="center" valign="middle" width="200"background="images/shoppingcircle2.jpg"> becomes <tr><td class=Cart align="center" valign="middle" width="200" & add TD.Cart{ background-image: url(images/shoppingcircle2.jpg); background-repeat: no-repeat; background-position: center center REMEMBER TO ADD FONT DETAILS ETC } Or resize your image to fit the cell, so it doesn't need to repeat. hth :D
Kristofor Posted June 11, 2003 Author Posted June 11, 2003 cool, stuff, now it is working, hehehe, i was trying to put it inot its own cell and force the background to be only shown once, was very difficult that fixed it up, one thing i did notice though, was when i added items to the cart, the link that went over all the words put a blue line around my little shopping art image, which i couldnt figure out, is there some a href settings or something that determine that??? wel anyway, for the people who want to know what i did, i changed my header.php to look like this table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td rowspan="2" valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'righthere.jpg', 'RightHere I.T.'); ?></td> <td height="45"></td> <td></td> <tr><td class=Cart align="center" valign="middle" width="200"> <?php if (($cart->count_contents() == "0")) { echo "Your Cart is Empty!!"; ?><img src="images/cart.gif"> <?php }else{ ?> <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerTop"><?php echo $cart->count_contents(), ' Item(s) '; ?><?php echo $currencies->format($cart->show_total()); ?></a><img src="images/cart.gif"></td> <?php } ?> </td><td width="200" bgcolor="#006699"></td></tr> </tr> </table> then i added that class to the style sheet, TD.Cart{ background-image: url(images/shoppingcircle2.jpg); background-repeat: no-repeat; background-position: center center; font-family: Verdana, Arial, sans-serif; font-size: 10px; } then it all worked, :lol: hehehe, was a tough problem for the little bit of code needed to make it happen, hehehe, but if anyone has tips on that link so i can show it as a link without getting a line around it, that would be good. cool, thanks again kristofor Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
proton318 Posted June 11, 2003 Posted June 11, 2003 Here's how you get the blue border to disappear .... In basic html, when you are setting up the <img src="...."> tag, you have to add in border="0" to make the blue line disappear. So your html code should look something like this: <img border="0" src="http://www.???/images/???.gif"> I hope that helps and good luck! Every passing minute is another chance to turn it all around. Delegated to web lackey - again.
Kristofor Posted June 11, 2003 Author Posted June 11, 2003 hey cool, thanks that works great, just while we are talking bout shopping carts, when you click on a category area, and it lists all the products in that category, if i click the buy now button, it just inks to the information page not adding to the cart, i dont know why, but what i want to do, and i have seen it done, look th eforums, and cant find much for anything past ms1, is that i want for all the products listed to have a row called quantity, but in that row, it has little text boxes for all the thigns listed, and you go through type the number of items that you want, for each product, then finally click an add to cart button at the bottom of the page, how would i get that done, would be a great addition to my site i rekon. well thanks again for that code kristofor Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...
proton318 Posted June 15, 2003 Posted June 15, 2003 I have a quick question, somewhat JavaScript related. I have a similar drop down menu on another site. However, I am using frames on that site and I can't get the drop down menu to move past the frame break, so part of my menu is always hidden behind the other frame. I noticed yours always stays on top. How can I get mine to do the same? Every passing minute is another chance to turn it all around. Delegated to web lackey - again.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.