Jump to content
Sign in to follow this  
grgr

Deal of the Day

Recommended Posts

I am in the process in making a Deal of the Day page and I'm almost there.

 

I have to say that my PHP progamming knowledge is, well, no existant.

 

My Deal of the Day I have based on the Specials module and is mostly a copy of it.

 

I have only a few little problems to solve, the follwing one is the one I have hit a wall with.

 

I have added a bit of code to the catalog/product_info page to try and display the normal price or the special price of the DotD price.

 

This is where I am after a few hours trying different things (the DotD Works but the Specials price does not).

 

	if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
 }else {
  $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
  }
  if ($dotd_price = tep_get_products_dotd_price($product_info['products_id'])) {
 $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($dotd_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
  } else {

 $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
  }

 

Like I say, the above half works in that it currently displays a DotD price but not a Specials price.

 

I'm sure it is probably very easy but I have just hit a wall.

 

Any help greatfuly recieved!

Share this post


Link to post
Share on other sites

Done.

 

I knew it was going to be simple!

 

  if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
 }else {
  if ($dotd_price = tep_get_products_dotd_price($product_info['products_id'])) {
 $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($dotd_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
 $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
  }
  }

Share this post


Link to post
Share on other sites
Do you have a URL for a demo, interested in taking a look at what you did.

 

Thanks,

 

Matt

 

Sorry, didn't see your question earlier.

 

You can see it at puppycages.co.uk - It is an adult toys site, be warned, and the dotd isn't always running.

 

Essentially, all that has been done (from memory) is exactly duplicate everything to do with the specials: boxes, functions, DB tables, queries, admin etc. the only real exception is a dotd landing page which is just a simple php page with the product picture and then this links to the product info page.

Share this post


Link to post
Share on other sites

I'm quite interested in your deal a day script and how it works with OSC ... Can you set up multiple items that will run, changing every day ?

 

Any reply would be greatly appreciated

 

Brandon

Share this post


Link to post
Share on other sites

I think the best deals on www.justek.com.au, as it's also counting down time.

Edited by web-project

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Share this post


Link to post
Share on other sites

Here's how I made my judaica deal a day site with oscommerce... check it out http://www.judaicabargains.com

 

I used the happy hour contribution ( http://www.oscommerce.com/community/contributions,3568 ) with few modification that I would be happy to share with others who need such thing.

 

 

I am totally interested in your contribution. I use the Happy Hours contribution, but have no interest in the TIME - only the DAY since I run a daily deal site. I am looking for a slimmed down version of the Happy Hours contribution that only applies to Daily Deals, not hourly.

 

Please share with us your contribution, I'd love to see what you've done :)

Share this post


Link to post
Share on other sites

I am totally interested in your contribution. I use the Happy Hours contribution, but have no interest in the TIME - only the DAY since I run a daily deal site. I am looking for a slimmed down version of the Happy Hours contribution that only applies to Daily Deals, not hourly.

 

Please share with us your contribution, I'd love to see what you've done :)

 

Does anyone have this updated version of this contribution.

Share this post


Link to post
Share on other sites

Hi all,

 

i need a contribution for deals of the day like morning,afternoon and evening deal .

please any one have this just post it.

 

 

thanks in advance

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×