Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Display Buy Now based on time


  • You cannot reply to this topic
No replies to this topic

#1 Iggy

  • Community Member
  • 1,294 posts
  • Real Name:BOFH
  • Gender:Male
  • Location:Seattle, WA

Posted 21 April 2011, 05:59

I shouldn't work on things late at night :-"

In index.php the buy now button is triggered via

<?php
} elseif ($category_depth == 'products' || isset($_GET['manufacturers_id'])) {
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
//bof column product listing with attributes
'PRODUCT_LIST_MULTIPLE' => PRODUCT_LIST_MULTIPLE,
'PRODUCT_LIST_BUY_NOW_MULTIPLE' => PRODUCT_LIST_BUY_NOW_MULTIPLE,
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

I need to wrap 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); in something like
} if(($now) >= '1900' && ($now) <= '2301') {

with now being $now = date(Hi);

So far I'm not nesting that into this statement properly and it keeps chucking me out with syntax errors.

Anyone care to hit me with the clue stick by morning PST? :D

Thanks!
Everything's funny but nothing's a joke...