Update dolistore.class.php
This commit is contained in:
parent
734a8ba312
commit
366ae2f116
@ -248,11 +248,8 @@ class Dolistore
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
$html = "";
|
||||
$parity = "pair";
|
||||
$last_month = time() - (30 * 24 * 60 * 60);
|
||||
foreach ($this->products as $product) {
|
||||
$parity = ($parity == "impair") ? 'pair' : 'impair';
|
||||
|
||||
// check new product ?
|
||||
$newapp = '';
|
||||
if ($last_month < strtotime($product->date_add)) {
|
||||
@ -267,7 +264,7 @@ class Dolistore
|
||||
// add image or default ?
|
||||
if ($product->id_default_image != '') {
|
||||
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
|
||||
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">';
|
||||
$images = '<a href="'.$image_url.'" class="documentpreview" target="_blank" mime="image/png" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">';
|
||||
$images .= '<img src="'.$image_url.'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
||||
} else {
|
||||
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
||||
@ -306,16 +303,16 @@ class Dolistore
|
||||
//.'<br><a class="inline-block valignmiddle" target="_blank" href="'.$this->shop_url.$product->id.'"><span class="details button">'.$langs->trans("SeeInMarkerPlace").'</span></a>
|
||||
|
||||
//output template
|
||||
$html .= '<tr class="app '.$parity.' '.$compatible.'">
|
||||
$html .= '<tr class="app oddeven '.$compatible.'">
|
||||
<td class="center" width="210"><div class="newAppParent">'.$newapp.$images.'</div></td>
|
||||
<td class="margeCote"><h2 class="appTitle">'.$product->name->language[$this->lang - 1]
|
||||
.'<br/><small>'.$version.'</small></h2>
|
||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang - 1].'</td>
|
||||
<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>
|
||||
<td class="margeCote center">'.$price.'
|
||||
</td>
|
||||
<td class="margeCote">'.$download_link.'</td>
|
||||
</tr>';
|
||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang - 1].'</td>';
|
||||
// do not load if display none
|
||||
//$html .= '<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>';
|
||||
$html .= '<td class="margeCote center">'.$price.'</td>';
|
||||
$html .= '<td class="margeCote">'.$download_link.'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user