Post by jcgadgets » Sat Jan 29, 2011 5:46 pm

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

Active Member

Posts

Joined
Sun Oct 31, 2010 4:49 pm

Post by Chones » Tue Feb 01, 2011 6:20 am

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>

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by jcgadgets » Tue Feb 01, 2011 6:33 am

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

Active Member

Posts

Joined
Sun Oct 31, 2010 4:49 pm

Post by Chones » Tue Feb 01, 2011 6:40 am

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 ;)

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by jcgadgets » Tue Feb 01, 2011 7:01 am

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

Active Member

Posts

Joined
Sun Oct 31, 2010 4:49 pm
Who is online

Users browsing this forum: No registered users and 3 guests