Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Multiple products with fixed quantity pricing

Multiple products with fixed quantity pricing

Views: 2,859

Results 1 to 20 of 25
10 Jul 2012, 5:32 PM
#1
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Multiple products with fixed quantity pricing

Hi,

We produce promotional merchandising.

We have a wide variety of products, and the pricing is based on quantity. The problem is that the product quantities vary a lot.

I am trying to figure out if and how I can set pricing similar to this :

Product 1

10 = £10.00
20 = £9.00
50 = £8.25

Product 2

100 = £1.00
250 = £0.90
500 = £0.85

Product 3

1 = £190
2 = £170
3 = £160

Product 4

1 = £50
5 = £40
10 = £35

etc.

The pricing is fixed and not based on quantity percentage discounts. Unfortunately, there is no easy way to say group products that have prices for 1,2,5 items or 100,250,500

I guess effectively each product has a set of quantity attributes and a set of price attributes ?

Any thoughts on how to do this ?

11 Jul 2012, 5:05 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Have you tried the Price Manager ... the $ on the Product ...

Click EDIT and Add 5 Blank Discount Qty ...

Select from the Discount Type: Actual Amount ...

Select from the Discount Priced from: Special ...

Now set your Quantity and Actual Price ...

11 Jul 2012, 11:50 PM
#3
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

Have you tried the Price Manager ... the $ on the Product ...

Click EDIT and Add 5 Blank Discount Qty ...

Select from the Discount Type: Actual Amount ...

Select from the Discount Priced from: Special ...

Now set your Quantity and Actual Price ...

Genius..... need I say more ???? Thank you very much. Wish this was explained more clearly somewhere or I have I missed something ? Or is it possible to make a FAQ / Wiki page for this ?

One follow up to this.

If I put nothing in the 'Price' field I get :

Qty Discounts New Price
100 £0.00
100-249 £3.00
250-499 £2.76
500+ £2.70

If I put a figure in the 'Price' field I get :

Qty Discounts New Price
100 £3.00
100-249 £3.00
250-499 £2.76
500+ £2.70

Should I put a base price in ?

Either way, as it is superflous, is there any way to get rid of it from the table, beside hacking the code ?

e.g. the table should show :

Qty Discounts New Price

100-249 £3.00
250-499 £2.76
500+ £2.70

If that makes sense ? :-)

Regarding Minimum Quantities it seems silly that if I enter say 50 when the minimum is 100 you just get a message saying 'you haven't ordered enough' on the cart page. Surely it would be better to have some slightly different logic to this ? e.g. rather than setting a notice on the cart page, it would be better to do it on the product page and force the user to add a correct figure before proceeding to the cart/checkout ?

Perhaps this is something in 1.5.x that I haven't seen yet.

TIA

John

12 Jul 2012, 12:44 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Enter the Product Price as: 3.00
Minimum: 100

On the discounts, just add:
250 2.76
500 2.70

12 Jul 2012, 3:34 PM
#5
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

Enter the Product Price as: 3.00
Minimum: 100

On the discounts, just add:
250 2.76
500 2.70

Ever felt stupid before ????

The only thing I don't get is why something so simple is not easier / better explained (in the documentation - your explanation was easy !)

Can I or someone create an FAQ for this ?

Something I have just noticed that when on the product info page, it has the minumum quantity filled in the box, but on the list view page the quantites are set to zero, though it does have the minumum quantity specified just below. Can this be changed somewhere in Admin or does it need a code hack ??

Another point I then discovered (should this be a new thread ?) was that I wanted to effectively make it an 'enquiry' basket rather than an actual purchase - at the minute we have way too many complicated add-ons to price it accurately unfortunately (I hope we can get it simplified in the future hence I would like to get this first part working). The pricing is there as a base guide and I need to add text to the effect that other charges will apply.

I originally got stuck on the payments section with the "Sorry, we are not accepting payments from your region at this time. " but managed to resolve that, but it still had the shipping section. I then twigged to set "Product is Virtual: Yes, Skip Shipping Address" and that the cured and removed the shipping page, but the payments error came back to haunt me again ! I have tried so many different settings my head hurts !

Essentially all I am trying to do is show the prices, have the customer enter a required quantity for an enquiry which will show them a base price, and email us the results. We don't need shipping or payment. When I did get the payment part working I think I had COD for payment and a shipping flat rate of £0 as an experiment.

I did wonder if it was to do with Zones.

I have the following set :

Zones : None
Zone Defs : Zone Name VAT | Zone Description UK VAT
Tax Classes : Taxable Goods
Tax Rates : Class : Taxable Goods | Zone VAT | Rate 20%

(My thought was I should have different Zones for Europe as VAT rates differ, but started with the UK)

Payment (these are the last experiments) :
COD : Payment Zone None
Zen Cart Free Charge : Payment Zone none

For testing I only have two products with pricing. Both have Tax Class set to Taxable Goods

The other thing to note is in the Total box I get :

Your Total
Sub-Total: £175.00
Free Shipping: £0.00
UK VAT: £35.00
Total: £175.00

So the VAT is not applied to the Total.

Tempted to go back to square one and do it all over again but I wondered if you had any further thoughts. I can probably send a login for my test site if need be.

B. Rgds
John

12 Jul 2012, 4:08 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Virtual Products cannot be paid for with COD ... perhaps Check/Moneyorder moneyorder is a better test ... you can change the language file for moneyorder.php to read what you want it to ...

On Shipping, are you just trying to make ALL Products have Free Shipping for ALL customers?

If so, try using the:

Product is Virtual: No, Shipping Address Required

Always Free Shipping: Yes, Always Free Shipping

And install the Shipping Module for FREE SHIPPING! freeshipper ...

If you are just wanting to get rid of the checkout_shipping page, then the Virtual Products, as you have it, is the only solution ...

As to the FAQs, we try to think of everything on the examples we create, but sometimes the obvious to use is not obvious to you ...

We keep refining them, and hope they will include, over time, enough examples to make these things easier to understand ...

12 Jul 2012, 11:05 PM
#7
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

Virtual Products cannot be paid for with COD ... perhaps Check/Moneyorder moneyorder is a better test ... you can change the language file for moneyorder.php to read what you want it to ...

That cured it :-) You are truly brilliant.

Will hack the wording about accordingly.

On Shipping, are you just trying to make ALL Products have Free Shipping for ALL customers?

If you are just wanting to get rid of the checkout_shipping page, then the Virtual Products, as you have it, is the only solution ...

Yes, as we aren't giving any real shipping information. However I seem to have that under control.

As per my earlier post, I still can't figure out why it won't add the VAT to give the total. Any thoughts on this ?

As to the FAQs, we try to think of everything on the examples we create, but sometimes the obvious to us is not obvious to you ...

We keep refining them, and hope they will include, over time, enough examples to make these things easier to understand ...

:-) In general they are very good. Quick question on the forums search - it is very frustrating on the global search that it defaults to pulling up an entire thread and not a particular post. It can be daunting thinking you have to read 100+ pages to find the bit of info that you may be after. I can see you can save search preferences, but then you have to be logged in.....

B. Rgds
John

12 Jul 2012, 11:42 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

What are your settings on the Locations / Taxes ... Tax Rate ...

What are your settings on the Zone Definition for the DETAILS ...

13 Jul 2012, 10:47 AM
#9
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

What are your settings on the Locations / Taxes ... Tax Rate ...

What are your settings on the Zone Definition for the DETAILS ...

Zones - no zones defined

Zones Defintion :

Name - VAT
Description - UK VAT
Status - Green

Detail (not noticed this before and not sure what it does !!)
Country - United Kingdom
Zone - All Zones

Tax Classes - Taxable Goods
Descript : The following types of products are included: non-food, services, etc

Tax Rates
Class : Taxable Goods
Zone : VAT
Rate : 20%
Descrip : UK VAT

Payment :

Only have this one enabled:

Check / Money Order

Text : Please make your check or MO payabale to blah blah blah.

Enable Module : True
Payment Zone : --none--
Order status : default
Display : 0
Make payable to : Changed from Default to our company name

Order total modules enabled :

Shipping
Sub-Total
Tax
Total

Hope this makes sense.

B, Rgds
John

13 Jul 2012, 12:59 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

And I am assuming that you have your Products marked as Taxable Goods on each ...

On the Tax Rate, what is the priority set to if you edit it?

Have you a link to your site that we could perhaps peek at?

13 Jul 2012, 4:01 PM
#11
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

And I am assuming that you have your Products marked as Taxable Goods on each ...

Yes

On the Tax Rate, what is the priority set to if you edit it?

Priority 0

Have you a link to your site that we could perhaps peek at?

Try this :

http://home.reetspetit.net/testbay/ZenCart

Only two products have prices - Look for Badges, Button Badges, 32mm and 38mm

If you want an admin login I'll set one up for you when I'm back as I have to go out for a couple of hours.

B. Rgds
John

13 Jul 2012, 4:04 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Change the Priority to 1 ...

13 Jul 2012, 4:12 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Looks like it is working for me:
> Sub-Total: £250.00

Free Shipping: £0.00
UK VAT: £50.00
Total: £250.00

Did you change something?

13 Jul 2012, 4:20 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Scratch the working part ...

Look in the Modules ... Order Totals ...

What happens if you click on each one and do the following:

1 Save settings to NotePad

2 REMOVE

3 INSERT

If there is no change, what happens if you switch to the Classic Template?

13 Jul 2012, 6:07 PM
#15
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

Scratch the working part ...

Look in the Modules ... Order Totals ...

What happens if you click on each one and do the following:

1 Save settings to NotePad

2 REMOVE

3 INSERT

If there is no change, what happens if you switch to the Classic Template?

Changed Priority to 1

No change

Removed Modules, except for Total which wouldn't remove.

Added back Shipping, Sub-Total, Tax

No change.

Changed to 'Classic' template (site curently using it)

No change.

FYI, this was a 1.3.9e site that I was upgrading to 1.3.9h

The original site had various code changes made by someone else. Unfortunately they hadn't used the template system. I cleared out the old code. Did a new install to update the database and then added back the changes into it's own template structure bit by bit. The only core changes made that I remember that could not be templated were some 5 extra fields added to includes/modules/pages/product_info/main_template_vars.php which are picked up and displayed on the (now templated) product info page.

Changed that back to the original file. No change.

Where does it do the calculation for the Total ?

B. Rgds
John

13 Jul 2012, 6:47 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: Multiple products with fixed quantity pricing

Check the order class:
/includes/classes/order.php

Check the order total module for Total ot_total.php
/includes/modules/order_total/ot_total.php

for starters ...

14 Jul 2012, 12:29 PM
#17
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

Ajeh:

Check the order class:
/includes/classes/order.php

Check the order total module for Total ot_total.php
/includes/modules/order_total/ot_total.php

for starters ...

Well I don't pretend to be a PHP guru but I do have the system in svn and can roughly find my way round Eclipse.... I'll try and run it through the debuggerer and see if I can see anything obvious. Clearly neither of us can see quite what the problem is :-) However, there is one, so that's as good a place to start as any !

If you want admin access to the site I can PM you a login. I think I can give you svn access - let me know if you want to try and and I will look further.

Meanwhile, it's the weekend and I think it's beer o'clock :-) Will have a look if I get a chance. If not, Hasta Lunes......

And thanks once again for all your efforts. It is greatly appreciated. It's why I picked ZenCart......

B. Rgds
John

14 Jul 2012, 2:03 PM
#18
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Multiple products with fixed quantity pricing

What is your setting for your admin's Configuration->My Store->Display Prices with Tax? It looks like it might be set to true ...

14 Jul 2012, 11:36 PM
#19
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

lat9:

What is your setting for your admin's Configuration->My Store->Display Prices with Tax? It looks like it might be set to true ...

Display Prices with Tax - false

:-(

Still wouldn't explain why it is not adding the tax to give a Total methinks ??

15 Jul 2012, 2:19 AM
#20
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: Multiple products with fixed quantity pricing

OK, got bored before bedtime. The calculation is done in order.php here

    // Update the final total to include tax if not already tax-inc
    if (DISPLAY_PRICE_WITH_TAX == 'true') {
      $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
    } else {
      $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];

At this point I checked in Eclipse and the outputs were :

$this->info['subtotal'] = 175
$this->info['tax'] = (double) 0
$this->info['shipping_cost'] = null

info Array [16]
order_status (string:1) 1
currency (string:3) GBP
currency_value (string:10) 1.00000000
payment_method null
payment_module_code null
coupon_code null
shipping_method null
shipping_module_code null
shipping_cost null
subtotal (double) 175
shipping_tax (int) 0
tax (double) 0
total (int) 0
tax_groups Array [1]
comments (string:0)
ip_address (string:29) 192.168.100.24 - 192.168.100.24

products Array [1]
0 Array [16]
qty (int) 100
name (string:17) 38mm Button Badge
model (string:6) 338253
tax (int) 0
tax_groups Array [1]
tax_description (string:9) Sales Tax
price (string:6) 1.7500
final_price (double) 1.75
onetime_charges (int) 0
weight (int) 0
products_priced_by_attribute (string:1) 0
product_is_free (string:1) 0
products_discount_type (string:1) 2
products_discount_type_from (string:1) 0
id (int) 222
rowClass (string:7) rowEven

Think the problem is earlier in the file but need some sleep now :-)

B. Rgds
John