an
groups-icon

help editing defaults_comparison.php (display meta_key from post_meta)

Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
  • Version 9
    Maik
    0 points
    Beginner

    Hi folks,

    I’m not a real expert in php and I wanted to ask for help.
    I imported ~2000 products and I’m trying to add a price option to my comparison table.

    I tried several things but I do not have the appropriate php knowlege to do so.

    [code title=”example”]
    // NOW DISPLAY TABLE

    $DATA = $CORE->multisort( $dataArray , array(‘price’) );
    if(count($DATA) > 1){ $row = 1; }else{ $row = 0; }
    foreach($DATA as $data){

    $STRING .= ‘<tr class=”row’.$row.'”>’;

    $price = hook_price($data[‘price’]);
    if($data[‘price’] == “” || $data[‘price’] == 0){ $price = $CORE->_e(array(‘button’,’19’)); }

    $STRING .= ‘<td>

    <div class=”media”>
    <div class=”pull-left”>
    ‘.$data[‘image’].’
    <!– ‘.$data[‘ID’].’ –>
    </div>
    <div class=”media-body hidden-xs”>

    <h4 class=”media-heading”>’.$data[‘title’].'</h4>’.preg_replace(‘/\

    +\]/i’, “”, substr(strip_tags($data[‘desc’]),0,130)).’

    </div>
    </div>

    </td><td style=”text-align:center;”>

    <div class=”price”>’.$price.’ ‘.$data[‘store’].'</div>
    <div class=”price_monthly”></div>

    ‘.$CORE->_e(array(‘checkout’,’51’)).’

    </td>

    </tr>’;
    $row ++;

    } // END TABLE
    [/code]

    Attachments:
    You must be logged in to view attached files.
    April 13, 2015 at 8:17 pm
  • Mark Fail
    11,847 points
    Platinum User
    Bronze User Silver User Gold User Platinum User Helpful Award Fast Responder Thank You Coffee Villian Award Video Testimonial
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    April 14, 2015 at 5:54 am
  • Maik
    0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    April 25, 2015 at 8:59 am
  • Ninja Raphael
    0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    June 6, 2015 at 4:57 pm

302

Views

3

Replies