A gift with every offer

Locked

Views: 1,282

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
26 Jul 2007, 12:46 PM
#1
breadfan avatar

breadfan

New Zenner

Join Date:
Jul 2007
Posts:
52
Plugin Contributions:
0

A gift with every offer

Hi everyone.

I have a ZenCart eshop running. But I want every customer to get a 1$ gift for every purchase. The problem is, that I have no idea, how to accomplish this.

When a customer buys all that he wants, he can then choose 1 gift for 1$. This dollar will be added to his order. The gift is basically one certain item, but when the order exceeds a set amount, the client can then pick from a category of gifts.

Now, I have absolutely no idea how to make this work. If anyone could be so kind and show me the right direction, I will be very grateful.

26 Jul 2007, 3:47 PM
#2
brandtim avatar

brandtim

Zen Follower

Join Date:
Apr 2006
Posts:
250
Plugin Contributions:
0

Re: A gift with every offer

I'm not entirely clear on what you desire to accomplish. I really don't understand how the free gift goes from being one certain gift to a choice from a category of gifts.

But I think a good place for you to start is here:
http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#Observer_Class

Look especially at the "A Real World Example". I think it's pretty similar to what you want. If you could clarify what you're trying to do, I might be able to help you further.

BrandTim

26 Jul 2007, 5:02 PM
#3
breadfan avatar

breadfan

New Zenner

Join Date:
Jul 2007
Posts:
52
Plugin Contributions:
0

Re: A gift with every offer

OK I'll put it this way:

I am selling sports nutrition. When a visitor comes and buys stuff, he will get a fitness chocolate bar for only 1$ as a gift. So that gift isn't free, but for only 1$.
If the total value of his order exceeds (for example) 100$, he will be able to choose 1 gift, from a category of several 1$ gifts.

What I would like to achieve is, that when the customer makes and order for less than 100$, the chocolate bar will be automaticaly added to that order and the total value will be 1$ more. But if the value of the order is more than 100$, he will have the possibility of choosing one of several 1$ gifts.

Maybe this whole thing should be taken care of before making the order, while the customer is still putting stuff to his shopping cart.

27 Jul 2007, 5:54 PM
#4
brandtim avatar

brandtim

Zen Follower

Join Date:
Apr 2006
Posts:
250
Plugin Contributions:
0

Re: A gift with every offer

I'd be really cautious about adding items with a cost to a customer's shopping cart automatically. I for one would be miffed if I was ordering a $10 item and had an additional $1 item that I had to pay for but that I hadn't asked for...

Regardless, it's only a marginally hard thing to do.

Basically, you need to create all of the $1 products as regular $1 products but don't make them available on your site. (Or do, not sure how you wanted to handle that.)

Now you need to write the custom code for the $1 gifts. I would create a new page for this. I'd change the 'checkout' links to go to this new page.

On the new page I'd alert the customer that they had qualified for a special $1 price on a product. If the order total exceeded $100, they'd be shown a list of products to choose from, otherwise they'd only have 1 to choose from. Also, I'd be sure to include a 'No, Thanks' option.

I'd also use the NOTIFIER_CART_UPDATE_QUANTITY_END, NOTIFIER_CART_REMOVE_END, and NOTIFIER_CART_REMOVE_ALL_END observers to remove the $1 gift product if the customer's shopping cart drops below the minimum for having the gift and to make sure that they don't go round in a loop and add more than one $1 item. Probably also be good to have a check to see if they've started the checkout process with only enough to qualify for the one-option $1 item, but have subsequently changed their cart to qualify for a choice. Would then need to make sure that they go back to the page where they get to choose.

Is this making any sense?

BrandTim

28 Jul 2007, 2:41 PM
#5
breadfan avatar

breadfan

New Zenner

Join Date:
Jul 2007
Posts:
52
Plugin Contributions:
0

Re: A gift with every offer

Thank you brandtim for your answer :) I appreciate it. But the whole gift-thing is more or less finished. But there is still one thing I would like to know. When I open the Gifts category, there is still an option to choose the qty of gifts and above and below the list of products is the Add products to cart button. How do I remove those qty boxes and the buttons? Simply said, I want a store showcase without prices, but only for that one particular category.

And concerning the 1$ thing, it's the proprietor's problem. I just take care of the technical stuff :lamo: