Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
SuperSewist

new contribution to add multiple incremental gifts based on order total

Recommended Posts

I'm working on a new MOD which will allow multiple gifts to the customer, based on the original Dangling Carrot MOD, which allows one and only one gift.

 

In the original, there are multiple gift choices based on your order total, each one bigger than the last, as your order total grows you can get a bigger carrot. But, you're only allowed one. I want to allow mulitples, you know like the seed catalogs do: spend $15.00 get "A", spend $25.00 get "A" and "B", spend $50.00 get "A" and "B" AND "C".

 

I've made many changes which worked out great (product_info.php; classes/shopping_cart.php, application_top.php). I'm working in catalog/shopping_cart.php now and keep getting a blank page (about a hundred times, I'm sure). I've checked all my () and {} and [] and ' and " and ; (I am prone to missing those). I'd like to start by asking if there's anything else that would cause a blank page. I figure certain mistakes would give an error page instead of a blank page. This is a new section at the top (same as Dangling Carrots) but revised (a lot) to allow multiples and (attempting) to use more of the OSC built-in functions like $cart->in_cart($products_id). Most of my many hours so far over these 50 lines of code involve staring at the screen looking for mismatched brackets and missing ' or ; etc.; the logic flow seems right, but maybe I've missed a rule about how to do things in php or mysql.

 

I consider myself pretty good at program flow (in my dreams :blush: ) but know I'm a hacker when it comes to the code: I just hunt around OSC until I find a section that looks right, copy, paste & modify the variables. So far, I've modded my site up real nice. But at the moment I think I've reached my limit. I even tried Pizza and CupNoodles, but No Joy.

 

Any and all advice, ideas, and resources appreciated. Happy to PM code upon request.


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites

OK here's an update, I found out that php builds an error log file on the server! and I found it! Well OK, it's exciting to ME. Turns out I still missed a = a ; a } and a ). "jeez".

So it "works", if that means I don't get a blank page. But it's not doing what I want, so back to the code board.


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites

Alright, I give! This brick wall is just not seein' things my way :'( HELP!!

 

I really want to be able to offer some nice gifts to my customers when their order reaches a certain level, and not be limited to offering only one as it is in Dangling Carrot, which has some other limitations as well (no downloads as gifts). I've been at this all day every day for the last week and I'm pretty sure I'm just tilting at windmills now. hack, upload, no joy. hack, upload, no joy. ad infinitum.

 

So I'm asking for help to develop this mod from someone who's been around osC long enough to know the interactions between files, and if a thingy is changed here it will also need changed there. Also needs to understand attributes and their little 1{2}3 system. Also preferrably one who has their own store modded with SPPC w/PB, but who would also be able to adjust the code for stock _if_ this turns into a contribution.

 

I do not want to turn it over to a developer who will "just do it" as that won't help me learn how & why thingys work & don't work. I can "code" (depending on your definition) if I know what code is supposed to go where and why and how it interacts. And I 'm a good install instruction writer. Will you help bring all these pieces I've been working on into a working whole?

 

I have the following in my bribe sharing bag: money, cookies, pizza, appreciation. cap-feathers.

 

<cross posted to "support - dangling carrots" and "contribution development">


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites

No comments, no interest, no assistance - I'm going to let this one slide on down the road and move on to something else.


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites
Guest

have you tried taking out the restriction from catalog\shopping_cart of the dangling carrot?

	 if ($gift_exists == 0) {

 

As I see the contribution's code should be fairly easy to modify it for multiple gifts in the cart.

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  

×