-
AuthorPosts
-
tom_laan84 Friend
tom_laan84
- Join date:
- June 2008
- Posts:
- 348
- Downloads:
- 142
- Uploads:
- 30
- Thanks:
- 88
- Thanked:
- 67 times in 11 posts
June 15, 2013 at 3:31 pm #188256Hi Guys,
I want to implement the “ja-product-type” label option into JA MixMaz. I tried to do so, by doing following:
adding special field type “string” named “ja-product-type”.
added it to a random product.
Then added this line of code:
<?php if($addclass){ ?>
<span class="label <?php echo $addclass;?>"><?php echo $addclass;?></span>
<?php }?>
found in template/html/com_virtuemart/category/default.php on line 242 into my mixmax same file.But stuff doesn’t work. So there must be more to it. Unfortunately i can’t seem to find additional code.
Could you guys give me more info on how to do this? Thanks a lot.
tom_laan84 Friendtom_laan84
- Join date:
- June 2008
- Posts:
- 348
- Downloads:
- 142
- Uploads:
- 30
- Thanks:
- 88
- Thanked:
- 67 times in 11 posts
June 15, 2013 at 3:53 pm #495978i found some more code:
// Start the Output
foreach ($this->products as $product) {
$addclass = '';
if(isset($product->customfields)){
foreach ($product->customfields as $prdcs){
if($prdcs->custom_title == JText::_('JA_CUSTOMFIELDS_NAME')){
$addclass = ' '.strtolower(str_replace(" ","-",trim($prdcs->custom_value)));
}
}
}it replaces:
// Start the Output
foreach ($this->products as $product) {Still no luck.. :((
tom_laan84 Friendtom_laan84
- Join date:
- June 2008
- Posts:
- 348
- Downloads:
- 142
- Uploads:
- 30
- Thanks:
- 88
- Thanked:
- 67 times in 11 posts
June 17, 2013 at 10:20 pm #496098Anyone willing to send me in the right direction?
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
June 18, 2013 at 7:23 am #496135Hi Tom,
Pls try to put below label css styles to virtuemart.css (JA Mixmaz):
span.label {
position: absolute;
right: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
background: url("../images/ico/icon_label.png") no-repeat;
color: #fff;
width: 39px;
height: 25px;
line-height: 20px;
text-align: center;
padding: 0;
z-index: 20;
}
span.label.hot {
background-image: url("../images/ico/icon_hot.png");
}
span.label.sale {
background-image: url("../images/ico/icon_sale.png");
width: 44px;
}And remember to put label of VM product in Virtumart >> Products >> Selected product >> Custom field >> Value. Insert “hot”.
Don’t fortget to backup your files & clear JAT3 cache after saving changes.
tom_laan84 Friendtom_laan84
- Join date:
- June 2008
- Posts:
- 348
- Downloads:
- 142
- Uploads:
- 30
- Thanks:
- 88
- Thanked:
- 67 times in 11 posts
June 24, 2013 at 2:17 pm #496726Hi Leo,
Thanks for your help! Greatly appreciated.
I had the CSS classes already added :).
The problem is, the information is not posted to the category page. When i use firebug to search for it. it’s not there at all.
So i must be looking over some code that needs to be inserted in the category default.php.
The product named “Masita Voetbal Actiepakket” on this page:
http://www.ballen.tltest.nl/voetbal/voetballen/voetbal-masita.html
Has the attribute added like you told me.
Maybe the custom fields are not loaded at all?
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
June 26, 2013 at 12:46 pm #497027Hi Tom,
I saw. Pls backup your files & make sure that your VM component is latest version 2.0.20b. Then try attract our attached folder to templates/ja_mixmaz/html/ path (Our overriden layout of VirtueMart Product module).And try to follow the tips on above replies. Hope it helps !
kiwilee Friendkiwilee
- Join date:
- June 2012
- Posts:
- 30
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 13 times in 1 posts
June 26, 2013 at 10:05 pm #497065HI,
Does this work for JA Hawkstore templete too?
As this is posted in JA Hawkstore topic I assume yes.
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 8 replies, has 3 voices, and was last updated by phong nam 11 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
How to implement the "label hot" in clean virtuemart install
Viewing 8 posts - 1 through 8 (of 8 total)