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]
This reply is for PremiumPress customers only.
303
Views
3
Replies
Copyright © 2010-2024 PremiumPress Limited.
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.Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now