Greetings all,
I would like to display content base on if a salemaker sale is active.
Is there a function I can call that will return a T/F value I can test?
Any suggestions?
Thanks!
Greetings all,
I would like to display content base on if a salemaker sale is active.
Is there a function I can call that will return a T/F value I can test?
Any suggestions?
Thanks!
Experience is what you get when you don’t get what you want…
Is your question whether "any" sale is active?
Or is it whether a "specific" sale is active? And if so, how do you intend to identify which "specific" sale?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks for the reply DrByte,
Since we only do a single "All Item" sale at a time, any sale detection would work.
As a test, I just wrapped my items to display around the following code. It seems to work, but makes a db call:
BTW, the stuff I want to display is in the cart sidebox if that makes a difference!PHP Code:$sale = $db->Execute("select sale_status from " . TABLE_SALEMAKER_SALES . " where sale_status = '1' and sale_categories_all != '' and sale_date_start <= now() and sale_date_end >= now()");
if ($sale->RecordCount() >= 1) {
echo "Stuff to Display";
}
![]()
Experience is what you get when you don’t get what you want…