Hello!
I am trying to show a sold out badge on the category view and something is not working quite well.
I am using the following code<?php
if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none') ){?>
<?php if (($product->product_in_stock - $product->product_ordered) < 1) { ?>
<div class="SoldOut"><?php echo $soldouttext;?></div>
<?php }?>
<?php }>
in templates/mytemplate/html/com_virtuemart/category/default.php
the css looks like this:
.SoldOut {
font:bold 15px/28px "Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,Verdana,sans-serif;
color:#FFF;
background:#F00;
text-align:center;
position: absolute;
top: 28px;
left: 0px;
-webkit-transform: rotate(-20deg); /**safari, chrome**/
-moz-transform: rotate(-20deg); /**firefox**/
transform: rotate(-20deg); /**other browsers**/
width:100%;
opacity:0.7;
}
I don't know what am I doing wrong because I "borrowed" the code from another extension, FancyProductSlider which is displaying it perfectly inside the module.
I appreciate any help/suggestion
I think this could be modified to work correctly
if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none') ){?>
<?php if (($product->product_in_stock - $product->product_ordered) < 1) { ?>
<div class="SoldOut"><?php echo $soldouttext;?></div>
<?php }?>
<?php }>
Try this
if (!VmConfig::get('use_as_catalog') and (!VmConfig::get('stockhandle','none')=='none') ){?>
<?php if (($product->product_in_stock - $product->product_ordered) < 1) { ?>
<div class="SoldOut"><?php echo $soldouttext;?></div>
<?php }?>
<?php } ?>
this showed no changes for me on my site, can you please specify the css file used here?