Quantity Discounts

Locked

Started by zenlova on 21 May 2006, 1:14 AM · Views: 36,198

Results 21 to 40 of 73
This thread is locked. New replies are disabled.
15 Jun 2006, 1:15 AM
#21
zenlova avatar

zenlova

New Zenner

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

Quantity Discounts

Linda,

You are awesome!!!!!!
I am soooo very thankful....I spent most of the night reading up on PHP and mySQL:)

But this is awesome you are awesome!!!

Thanks!!

15 Jun 2006, 1:29 AM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Quantity Discounts

ZenLova:

Linda,

You are awesome!!!!!!
I am soooo very thankful....I spent most of the night reading up on PHP and mySQL:)

But this is awesome you are awesome!!!

Thanks!!

I thought I made a neat little function like that ... but did not see it the first go 'round ... :cry:

When I peeked again ... I finally found it and thought gee ... why reinvent the wheel ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Jun 2006, 1:31 AM
#24
zenlova avatar

zenlova

New Zenner

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

Re: Quantity Discounts

I did this with the code you gave me!!!

$cheapest = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
$cheapest = number_format($cheapest, 2);
echo 'As low as: $' . $cheapest . '<br>';

Thank you again!!!!

15 Jun 2006, 1:33 AM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Quantity Discounts

Thanks for the update ... this will help others who need to display the lowest price based on discount quantity ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Jun 2006, 1:42 AM
#26
zenlova avatar

zenlova

New Zenner

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

Re: Quantity Discounts

DesignbyDemeter:

I have found a work around to display the lowest price first:

In Price Control Manager:

Product Price: 40.00
Min 25, Units 25

In quantity pricing table: Click on "Actual Price"

25 100.00
50 75.00
75 50.00
100 40.00

What will display is a bit funky but works:

The online display will look like this:

25-24/ 25-49/ 50-74/ 75-99/ 100+
40.00/ 100.00/ 75.00/ 50.00/ 40.00

Now the beauty of this is that even though you have that kludgy first colum showing the 100+ price, when the buyer puts in 25 - the shopping cart calculates it correctly at $100.00 ea. Being that you have your minimum set, buyer won't be able to buy less than 25 anyway.

I can live with it - what I can't live with is my buyers seeing the highest price first.

Best regards,
Laura

Laura,

You will be pleased to know that Linda has given us all a solution for this. Please read this thread and voila you have the fix!!

With or without this ZEN is the best product in the whole world! I have never worked with anything like this. I was able to do so much with no programming background at all. Actually not true...I did take pascal in HS....lol:)

15 Jun 2006, 3:32 AM
#27
zenlova avatar

zenlova

New Zenner

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

Re: Quantity Discounts

Also I added the following to includes\modules\product_listing.php to give you this look with the price displayed on the product listing page (ex. http://www.promo2sell.com/index.php?main_page=index&cPath=25_48)

// case 'PRODUCT_LIST_PRICE':
// $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
// $lc_align = 'right';
// $lc_text = $lc_price;
// I made some mod's below this
case 'PRODUCT_LIST_PRICE':
// $lc_price = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
$lc_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
$lc_price = number_format($lc_price, 2);
$lc_text='<b><font color="red">As low as: $' . $lc_price . '</font></b><br>';

5 Jul 2006, 6:35 PM
#28
ajeh avatar

ajeh

Oba-san

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

Re: Quantity Discounts

Zenlova ...

I was playing on your site ...

You gotta do something with those images ... they are gonna kill off your customers ... :cry:

128k x 15+ images = customers packing up their credit cards and going home ... :eek:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Jul 2006, 9:11 PM
#29
zenlova avatar

zenlova

New Zenner

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

Re: Quantity Discounts

Laura,

I am so honored that you are browsing my site!!!!!!

Did you mean that the images are too big? Is it taking too much time toload?

What do you recommend the image sizes to be?

Thanks for helping me with this venture!!!!!!!!!!

6 Jul 2006, 9:12 PM
#30
zenlova avatar

zenlova

New Zenner

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

Re: Quantity Discounts

Linda!!!!!!!!!!!!!!!!!!!!!!

NOT

LAURA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am sooooo sorryyyyyyyy been helping Laura with Zen a whole lot lately!!!!:)

Sorrryyyyyyyyyyyyy

8 Jul 2006, 6:31 PM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Quantity Discounts

tiny ...

teeny ... weeny ... tiny ... mini honey sized images are the goal ...

Your Medium should be resonably small too ...

Large can be bigger ... the customer is asking for you to show them something of higher quality and size ...

But little images spread throughout the site should be small as it burns up your bannwidth and will burn up your customers who are forced to wait for them ... :eek:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Jul 2006, 9:38 PM
#32
cherylkemp avatar

cherylkemp

Zen Follower

Join Date:
Mar 2006
Posts:
179
Plugin Contributions:
0

Re: Quantity Discounts

Ajeh:

tiny ...

teeny ... weeny ... tiny ... mini honey sized images are the goal ...

Your Medium should be resonably small too ...

Large can be bigger ... the customer is asking for you to show them something of higher quality and size ...

But little images spread throughout the site should be small as it burns up your bannwidth and will burn up your customers who are forced to wait for them ... :eek:
yeah...I even have a cable connection where I usually get around 6meg speed and it took forever for your first page to load. A great little free program for resizing pics into thumbnail is Easy Thumbnails It allows you to set the size, quality and there is even an option to have it append the current filename all in one big batch :)

Zen Cart: Diva Knitting

20 Jul 2006, 10:18 PM
#33
zenlova avatar

zenlova

New Zenner

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

Re: Quantity Discounts

Hey Linda......took your advice.

Made them all smalll!!!!!!!!

http://www.promian.com

Your feedback is very much appreciated!!!

Is there any good documentation on writing a product type?

21 Jul 2006, 11:53 PM
#34
denliv avatar

denliv

Zen Follower

Join Date:
Jul 2004
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts

Can a products price & quantity discounts be copied from one product to another product or group of products?

21 Jul 2006, 11:55 PM
#35
ajeh avatar

ajeh

Oba-san

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

Re: Quantity Discounts

There is nothing built in for this at this time ...

But you could look at how they are made in the table: products_discount_quantity

And the associated settings in the products table for the fields:
products_discount_type
products_discount_type_from

And build them that way ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

22 Jul 2006, 12:00 AM
#36
denliv avatar

denliv

Zen Follower

Join Date:
Jul 2004
Posts:
103
Plugin Contributions:
0

Re: Quantity Discounts

I was afraid that may be the case - I had just peeked at both tables. Many thanks for the quick reply.
Dennis

2 Feb 2007, 2:22 AM
#37
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Quantity Discounts

What I want to do is have the lowest price shown in the Product Listing page.

Also having the price on top saying "Price as low as..." would be great too.

There is some code posted on this thread... Just not sure where it goes....

2 Feb 2007, 2:30 AM
#38
ajeh avatar

ajeh

Oba-san

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

Re: Quantity Discounts

Peek at post #27 it shows where and how to make a change to the code to display the lowest discounted price vs the regular price ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Feb 2007, 1:25 AM
#39
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Quantity Discounts

I've applied the code at post 27 and all is well... more or less.

What I want to do is only display the cheapest price (and accompanying text) when there ARE quantity discounts, but just the regular price when that's all there is.

I just can't work out what the conditional statement should be - I've managed to do it in the tpl_product_info_display.php, but it's got me beat in product_listing.php (mind you, it's waaay past my bedtime here so the brain cells are not really up to it!)

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

13 Feb 2007, 12:45 PM
#40
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Quantity Discounts

Having spent some time in my usual trial and error way, I've come up with the following answer to my own question. There may well be a neater or more elegant way of doing it, but it works for me!

So, to only display the cheapest price (and accompanying text) when there ARE quantity discounts, but just the regular price when that's all there is.

Find around line 107 of includes/modules/product_listing.php

 case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  $lc_price;

and replace with

        case 'PRODUCT_LIST_PRICE':
		
			$lc_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
			$lc_price = '£'.number_format($lc_price, 2);
			$lc_align = 'right';
			if ( zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000) != zen_get_products_actual_price((int)$listing->fields['products_id'])){
                                //Change the next line to your own text/formatting requirements
				$lc_text='<span style="color: red; font-weight: bold;">From only<br />' . $lc_price . ' (ex.VAT)</span><br />';
				}else{
				$lc_text =  $lc_price.'<br />';
				}

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !