Page 1 of 1

Font Color in Cart

Posted: Wed Jan 13, 2010 10:35 am
by scottt20
How do I change the color of the font in the red circle (img attached)? It's the text that appears for product options selected for an item when it is added to my cart. I thought it was breadcrumb in style.css, but no luck.

Any help is greatly appreciated:) Thank you all, youve been great!!

Re: Font Color in Cart

Posted: Wed Jan 13, 2010 11:58 am
by dangkhoaweb
you can write your own style in CSS then add it to controller\module\cart.php in lines

Code: Select all

foreach ($this->cart->getProducts() as $product) {
      		$output .= '<tr>';
        	$output .= '<td width="1" valign="top" align="right">' . $product['quantity'] . '&nbsp;x&nbsp;</td>';
        	$output .= '<td align="left" valign="top"><a href="' . $this->model_tool_seo_url->rewrite($this->url->http('product/product&product_id=' . $product['product_id'])) . '">' . $product['name'] . '</a>';
          	$output .= '<div>';
            
			foreach ($product['option'] as $option) {
            	$output .= ' - <small style="color: #999;">' . $option['name'] . ' ' . $option['value'] . '</small><br />';
            }
			
			$output .= '</div></td>';
			$output .= '</tr>';
      	} 

Re: Font Color in Cart

Posted: Wed Jan 13, 2010 3:55 pm
by scottt20
I changed the color in the line:

Code: Select all

foreach ($product['option'] as $option) {
               $output .= ' - <small style="color: #999;">' .
And, it did make the change but only when I first add the product. i.e. if I set the color to white, it will appear white in that section immediately after I add the product to the cart, but if I browse to another page of the site it goes back to #999 the default. Any idea why that might happen?

I've tried clearing cache to no avail.

Re: Font Color in Cart

Posted: Thu Jan 14, 2010 3:39 am
by scottt20
Anyone?

Re: Font Color in Cart

Posted: Thu Jan 14, 2010 10:28 am
by dangkhoaweb
the reason is you changed in the file which only use when is called AJAX, you must change in template file to make it effects in whole system --> catalog\view\theme\default\template\module\cart.tpl
Hope it helps

Re: Font Color in Cart

Posted: Thu Jan 14, 2010 10:31 am
by readyman
Do a search for "style="color: #999;" when you have the cart.tpl module file open. You'll find the code is in the javascript.
The best way would be to put this into your stylesheet instead of using inline styles. eg. class="smalltxt"

Re: Font Color in Cart

Posted: Thu Jan 14, 2010 10:51 am
by scottt20
Thanks:) I had to change both, cart.tpl takes effect on other pages once the item has been added to your cart and the cart.php takes effect on the page immediately after you click 'Add to Cart'. So, the .tpl controls all other pages.