Zen Cart Logo

Limited free samples

Views: 2,634

Results 1 to 20 of 21
8 Feb 2011, 9:20 PM
#1
g1powermac avatar

g1powermac

New Zenner

Join Date:
Mar 2004
Posts:
29
Plugin Contributions:
0

Limited free samples

Hi All,

I'm in the process of setting up a new Zen Cart install and I need to figure out a way to limit a single free sample of a physical item per either customer or address. Is there a way to set something like that up in Zen Cart?

Thanks,
J Silverman

8 Feb 2011, 9:26 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

Are the Free Samples actual Products or Attributes of a Product?

If they are Attributes of a Product, do all Products use the same Option Name/Option Value combination or multiple different Option Name/Option Value combinations?

8 Feb 2011, 9:40 PM
#3
g1powermac avatar

g1powermac

New Zenner

Join Date:
Mar 2004
Posts:
29
Plugin Contributions:
0

Re: Limited free samples

They will be actual products.

8 Feb 2011, 9:47 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

The next thing would be the way to identify a Sample vs a Product ...

How are these Sample Products identified from regular Products?

If you have something to identify that something is a Sample, then it can be checked in the orders_products table to ensure that the customer can only get it once ...

You can even go so far as to check customers on these Sample Products and if previously ordered the Add to Cart/Buy Now buttons are removed and show something like "One per Customer" ...

8 Feb 2011, 10:00 PM
#5
g1powermac avatar

g1powermac

New Zenner

Join Date:
Mar 2004
Posts:
29
Plugin Contributions:
0

Re: Limited free samples

Well, I'm thinking of setting up a product specifically to be the sample product. So, there will be all the regularly priced items and one 'sample' free item (samples of all or most of the items will be shipped together via this one sample item).

8 Feb 2011, 11:38 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

You could test for the products_id and see if the Customer has an Order where that products_id is in the orders_products_table and if so, control if they can get it again or not ...

NOTE: if you use the same products_id and just keep changing the Sample, then you cannot tell if they got Sample A vs Sample B ...

20 Sep 2011, 11:49 PM
#7
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Limited free samples

Ajeh:

The next thing would be the way to identify a Sample vs a Product ...

How are these Sample Products identified from regular Products?

If you have something to identify that something is a Sample, then it can be checked in the orders_products table to ensure that the customer can only get it once ...

You can even go so far as to check customers on these Sample Products and if previously ordered the Add to Cart/Buy Now buttons are removed and show something like "One per Customer" ...

Hi,

I'm trying to set one of my products (a free physical sample to be shipped) so that a customer can only ever order one. So I have a unique product id. What next? How do I implement the checking it in the order_products table and returning a "one per Customer" message please?

Which files do I need to edit etc to acheive this?

Any suggestions would be very much appreciated.

25 Sep 2011, 4:39 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

I would edit the buy button function in the functions_general.php just above the line for:

    $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");

And put in a test on the:
(int)$product_id

to see if that product is in the table:
orders_products

for the customers_id using:
$_SESSION['customer_id']

If it is, change the value in the CASES below that so that to add a new case and change the:
$return_button

so it is a message such as:
$return_button = 'You only get 1!';

16 Jul 2012, 5:10 PM
#9
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

Hello, I hope I am putting this post into the appropriate area.

My store is using zen 1.3.9 with super orders.

In my store I have many items and each item has eight options.

I also have both regular shoppers and retailers. Whenever I get a new POTENTAL retailer we send them I free item with free shipping. I would like to be able to track this item in the inventory without having to manually reduce the stock, so that I know whom to I sent. So I think I should set them up as a retailer even if they have not yet signed the contract. Be then when I set a special coupon of 100% off and free shipping the only thing that gets applied is the free shipping. So I tried 50% off with free shipping and the same thing happens.

Does anyone have a suggestion or a way that I might be able to send a free sample to these retailers and still track it in my inventory?

16 Jul 2012, 6:28 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

Discount Coupons are designed to work for 1 of 3 things:

1 Amount Off

2 Percentage Off

3 Free Shipping

The are not designed to work with a combination of 2 of the 3 choices ...

The Discount Coupon code could be customized for this ... but the Free Shipping i for everything in the cart ...

So, there would need to be further customization to manage the Shipping for when there are more Products than just the Product for Free Item and Free Shipping in the cart along with regular Products with Regular shipping ...

While it can be done, it takes quite a but of customization to manage everything for this ...

17 Jul 2012, 6:57 PM
#11
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

Ok, I think I understand what you are saying, but could it be done easily if I had a coupon that could NOT be used with any other orders or products and I would note that on the coupon. My boss is making this a big issue for me.

17 Jul 2012, 7:00 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

You can make it clear that the Discount Coupon is only valid on orders with the 1 sample product, but you would still have to test that the customer is following those instructions as there isn't anything to block the customer from making an order with multiple Products and applying a Discount Coupon that is valid based on the restrictions ...

17 Jul 2012, 7:22 PM
#13
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

I think I am following you.

So the coupon would work if I set the amount to the total of one of my products plus free shipping. And the customer did NOT try and add any other garment to the order.

If the customer tried to add a second garment to the order if might cause an error.

I would be OK with that based off what my boss says to me.

Is it an easy code change?

17 Jul 2012, 10:38 PM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

It is not the amount of the Discount it is the Free Shipping ...

If a Discount Coupon has Free Shipping ... the order gets Free Shipping for everything ...

18 Jul 2012, 5:43 AM
#15
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

My boss understands that and can accept if someone does slightly abuse the free shipping. In her mind even if the get two more items at least they will have bought two more items and she is will too accept the possibility of the free shipping.

With that said. Can you tell me where and what file I would change. thank you for the time in explaining the issues to me, and trying to warn me of the problems.

18 Jul 2012, 1:11 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

What version of Zen Cart is this for?

This requires customization of the ot_coupon.php and not having to worry about the Free shipping for the rest of the Products in the order eliminates a lot of issues ...

Also is your shop in the US?

18 Jul 2012, 10:01 PM
#17
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

I am using version 1.3.9 with super orders, and attributes, I do not know if that matters or not.

I also have USPS addon and FeedEx addon.

19 Jul 2012, 1:09 AM
#18
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

Sorry, I forgot to tell you that my shop is USA California.

19 Jul 2012, 5:01 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limited free samples

Go to your Tools ... Server Info ...

Copy the information from the line that reads:
Server Information

<everything here>

to the line that reads:
PHP Version

including the PHP Version ...

Hate to beat it into the ground, but I need as much info as possible on this ...

19 Jul 2012, 2:12 PM
#20
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Limited free samples

I am happy to give you as much info as I can to help me. I just do not know what is to much on an open forum like this. I know you would not as for to much but I might accidentally give out to much.

I hope this is what you need.

Thank you very much for helping.

Zen Cart 1.3.9h
Database Patch Level: 1.3.9h
v1.3.9h [2012-07-09 20:51:05] (Version Update 1.3.8->1.3.9h)
v1.3.9h [2011-09-26 15:37:47] (Fresh Installation)
PHP Version 5.2.17