RE: How to modify specials to only allow one per customer order?

Jaguar <[email protected]>
Newsgroups gmane.comp.web.oscommerce.features
Message-ID <e2f4f4b2f959b680405e7f1467210aa6@osCommerce-Forums>
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=178631#178631
----------------------------------------------------------------

Thanks Linda.

We just installed the updated version of SEC 1.0b using the 5-18-03 release. Other than a problem of the SQL files which we fixed AFTER we downloaded ALL of the files the install worked fine. :D 

 8) My compliments to the chef on some real nasty code! 8) 

Okay getting back to the issue of the specials used as premium products...

Could you point to the right PHP file where this function/class/module might be living out its blissfull life.  I have checked as well as my guys but as yet no luck, of course we have only had the SEC mod up for about two hours and we ran out of pizza 3 hours ago!

What I understand is that their exists a function that  will check for the existence of more than one unique product ID in the shopping cart.  

Based on your response then the following psuedo code may apply: 

( any other developers out there are welcome to contribute their comments/suggestions)


in cart_contents

[code]


If exist_more_than_one_products_id_in_cart then
  check_products_database_for flag_on_products_id
      if flag_set then
          check_for_existence_of_qualifying_product_in_cart
               if true then
                    display_warning_message_about_having_too_many_items
                    remove(products_id)  
                else 
                    display_warning_message_about_not having_qualifying_product
                    remove(products_id)  
                end if 
      end if
end if 
          
       


[/code]

Is this close too what you tried to describe ? Of couse I have no idea what the function is that your are refering too, so I my psuedo code may be off.

Anybody else is free to comment here.


What we are thinking is that this hack might be then tied to a ADMIN section that would allow for the additional setting of a dollar amount associated with an order.  This way you can offer specials based on a specific product and/or having a qualifying order.

First, things first, lets get the above logic working. 

Thanks for the input and suggestions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.