Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
3 + 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Olédrion 1.64 > Blocks > oeldrion_top.php
by Rickb on 2009/1/8 16:07:04

Amaranth,

Did that hack work?

Rick
Re: Olédrion 1.64 > Blocks > oeldrion_top.php
by amaranth on 2008/12/31 19:42:08

Thank you trabis, I'll give this a shot.
Re: Olédrion 1.64 > Blocks > oeldrion_top.php
by trabis on 2008/12/28 23:06:17

You would have to hack 3 files to do this the right way but, maybe you can go directly to the source without secondary effects.

Try edit class/oledrion_products.php and add this:
le="color: #000000"><?php function getMostViewedProducts($start = 0, $limit = 0, $category = 0, $sort = 'product_hits', $order = 'DESC') { $tbl_datas = array(); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('product_online', 1, '=')); if(oledrion_utils::getModuleOption('show_unpublished') == 0) { // Ne pas afficher les produits qui ne sont pas publiés $criteria->add(new Criteria('product_submitted', time(), '<=')); } if(oledrion_utils::getModuleOption('nostock_display') == 0) { // Se limiter aux seuls produits encore en stock $criteria->add(new Criteria('product_stock', 0, '>')); } if(is_array($category)) { $criteria->add(new Criteria('product_cid', '('.implode(',',$category).')', 'IN')); } elseif($category != 0) { $criteria->add(new Criteria('product_cid', intval($category), '=')); } $criteria->add(new Criteria('product_hits', 0, '>')); //add this line $criteria->add(new Criteria('product_submitted', time()-7*24*60*60, '>=')); //end $criteria->setLimit($limit); $criteria->setStart($start); $criteria->setSort($sort); $criteria->setOrder($order); $tbl_datas = $this->getObjects($criteria, true); return $tbl_datas; }


Re: Olédrion 1.64 > Blocks > oeldrion_top.php
by amaranth on 2008/12/28 22:35:15

bump
Olédrion 1.64 > Blocks > oeldrion_top.php
by amaranth on 2008/12/21 20:11:51

I've installed Olédrion on my site and it is working great. However, I have one problem with the block called oeldrion_top.php. Currently, it shows the top products of all time. Is there a way to make it only show the top products in the last seven days?

Who's Online

204 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 204


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits