Page 1 of 1

Small plus sign add to cart buttons black cc_carbon_tab

Posted: Sat Jan 29, 2011 5:46 pm
by jcgadgets
Hi,

I'm using OpenCart 1.4.9.3 with the free "Black Theme" / cc_carbon_tab theme.

Unfortunately, with this theme all of the mini add to cart buttons are missing. I was able to have someone helping me add them to the categories pages, but they are not on other areas such as in the "featured" or "special" modules boxes...anyone know how I can add those back in?


Thank you,
Jared

Re: Small plus sign add to cart buttons black cc_carbon_tab

Posted: Tue Feb 01, 2011 6:20 am
by Chones
Hey Jared, just have a look at how it's done in the default template and copy that.

It's usually done by adding the following after the price:

Code: Select all

<a class="button_add_small" href="<?php echo $product['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>

Re: Small plus sign add to cart buttons black cc_carbon_tab

Posted: Tue Feb 01, 2011 6:33 am
by jcgadgets
Hi Craig,

I should've thought of this, sorry. Thanks for pointing this out.

I had a look at the file anyway just to make myself do it and get more used to it, and noticed that the code from the default theme differed this much:

Code: Select all

          <a class="button_add_small" href="<?php echo $product['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>
          <?php } ?>
          <?php if ($product['rating']) { ?>
          <br />
          <img src="catalog/view/theme/default/image/stars_<?php echo $product['rating'] . '.png'; ?>" alt="<?php echo $product['stars']; ?>" />
Rather than just the first line - any idea as to what it does? I was looking at it and trying to figure it out, but I know nothing of PHP. It looks like it has something to do with the rating. I tried it with and without those extra lines of code, and could not see a difference. For now, I've just left it as the one-liner.


Thank you again!
Jared

Re: Small plus sign add to cart buttons black cc_carbon_tab

Posted: Tue Feb 01, 2011 6:40 am
by Chones
Yeah, the last bit adds the stars if you want the rating to show up. Maybe your theme also doesn't have that as standard either?

If you want the ratings to show up, at least you know what to add now ;)

Re: Small plus sign add to cart buttons black cc_carbon_tab

Posted: Tue Feb 01, 2011 7:01 am
by jcgadgets
Craig,

Ok then, I see! The product simply doesn't have a rating yet, so that's why it wasn't showing :)


Thanks again!
Jared