Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • tom_laan84 Friend
    #188256

    Hi 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 Friend
    #495978

    i 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 Friend
    #496098

    Anyone willing to send me in the right direction?

    phong nam Friend
    #496135

    Hi 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.


    1. 6-18-2013-1-47-25-PM
    tom_laan84 Friend
    #496726

    Hi 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 Friend
    #497027

    Hi 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 Friend
    #497065

    HI,

    Does this work for JA Hawkstore templete too?

    As this is posted in JA Hawkstore topic I assume yes.

    phong nam Friend
    #497070

    Hi kiwilee,

    Yes. It does. On JA Hawkstore template, you just need to create a Custom field (string type) & add “hot” in Custom Fields tab of Virtuemart items. Pls check out my first reply !

Viewing 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, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum