Sold label on top of all price labels

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeSold label on top of all price labels

This topic has been marked as resolved.

Hi TB team,

I’ve managed to place a “sold” label on top of the price label on the product page when stock is 0.
Therefore i placed thies piece of code in catalog/view/theme/shoppica2/product.tpl inside the “product_price” div.

<?php if ($stock == 'Verkocht'): ?>
    <div class="verkocht"></div>
    <?php endif; ?>

with the following CSS rules:

.verkocht{
position:absolute;
width: 150px;
height: 100px;
top:0;
left:-10px;
z-index:1000;
background: url(catalog/view/theme/shoppica2/image/label-verkocht.png) no-repeat center;
}

It does the job perfect but…
I need to show the “sold” label on top of every price label there is on every page and every module.

Hope you understand what i mean and you can help me out!

Thanks in advance,
Dieter

  • This reply was modified 3790 days ago by  Dieter. Reason: typo's
  • This reply was modified 3790 days ago by  Dieter.
 Dieter
December 16, 2013 at 4:07 pm #29517

Hi TB team,

You think you are able to help me with that sold label. Or is it not a supported question?

Thanks in advance,
Dieter

 Dieter
December 18, 2013 at 4:12 pm #29573

Hi Dieter,

Can we take a look at your website?.

You can use hidepost to share private information with the support staff.

Best,
ThemeBurn team

December 20, 2013 at 10:07 am #29615

Hi TB team,

Sure you can…

http://attractieverkoop.nl
Admin:

Please note that the site is in Dutch and there are only two products available for testing purposes.
The bouncy castle has the sold label on top of the price label, the blower has not and the label only shows on product.tpl.

The cart and checkout are turned off and i placed a contact form where the “add to cart” button supposed to be.
When the cart and checkout are turned on again, everything works as it should be.

Except for the cart in the menu bar, i just found out. :-|
More work to do…

Thanks in advance.
Dieter

  • This reply was modified 3786 days ago by  Dieter. Reason: Typo's
 Dieter
December 20, 2013 at 2:44 pm #29618

Hi TB team,

Merry Christmas and happy new year!
For all of you guys!

Talk to you in 2014

Best,
Dieter

 Dieter
December 24, 2013 at 10:55 am #29640

Hi Dieter,

Thanks for the best wishes :) Wish you all the best for the new 2014 year!

If you want to apply the same quantity check, you need to take a look at this post here:

http://support.themeburn.com/topic/how-do-i-remove-the-add-to-cart#post-2760

and apply the same label code.

Best,
ThemeBurn team

January 3, 2014 at 11:14 am #29737

Hi TB team,

Thank you!
I will give it a try next week.

Thanks for the effort!

Dieter

 Dieter
January 3, 2014 at 12:22 pm #29740

Hi TB team,

Can’t get it to work for the the latest module. I suppose it works the same for the other modules?

Inside latest.tpl right below:


<p class="s_price"><?php echo $tbData->priceFormat($product['price']); ?></p>

I added:


<?php if ($stock == 'Verkocht'): ?>
<div class="verkocht"></div>
<?php endif; ?>

Inside latest.php right below:


if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}

I added:


if ($result['quantity'] <= 0) {
$this->data['stock'] = $result['Verkocht'];
} else {
$this->data['stock'] = 'In stock';
}

And right below:


'special'    => $special,

I added:


'stock'       =>; $this->;data['stock'],

But nothing seems to happen. :s
Can you explain to me where things go wrong?

Thanks in advance!

Dieter

  • This reply was modified 3766 days ago by  Dieter. Reason: typo's
  • This reply was modified 3766 days ago by  Dieter.
 Dieter
January 9, 2014 at 12:25 pm #29861
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
January 13, 2014 at 1:13 pm #29905

Hi,

Thanks for the effort but unfortunately it did not work :|

Now i did the following…
On latest.php changed this:


if ($result['quantity'] <= 0) {
$this->data['stock'] = $result['Verkocht'];
} else {
$this->data['stock'] = 'In stock';
}

Into:


if ($result['quantity'] <= 0) {
$this->data['stock'] = 'Verkocht';
} else {
 $this->data['stock'] = 'In Stock';
}

Now it works on the latest module?! :D
I’m sure i did that before…I think I’m sure ;)

Now i just have to make some new css styles to make it fit.
Solved!

Thank you.

Dieter

 Dieter
January 13, 2014 at 3:21 pm #29915

Hi Dieter,

Sorry, but we’ve missed this line. Glad you’ve managed to get the things working :)

BR,
ThemeBurn team

January 15, 2014 at 5:49 pm #29978
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.