If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Unit price to change based on quantity

Unit price to change based on quantity

Started by dharrison on 20 May 2011, 5:58 AM · Views: 3,725

Results 21 to 28 of 28
6 Jun 2011, 1:44 PM
#22
ajeh avatar

ajeh

Oba-san

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

Re: Unit price to change based on quantity

On the file:
/includes/modules/product_listing.php

you would copy that to your templates and overrides directory, if you have not already, to:
/includes/modules/your_template_dir/product_listing.php

and I think the change you are after is around line 103:

        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text = (zen_products_lookup((int)$listing->fields['products_id'], 'products_discount_type') !=0 ? 'Price from ' : '');
        $lc_text .=  $lc_price;
        // more info in place of buy now

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!

10 Jun 2011, 8:46 AM
#23
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Unit price to change based on quantity

It almost works, but how can I list the lowest price?

Debbie Harrison
DVH Design | Web Design blog

10 Jun 2011, 1:32 PM
#24
ajeh avatar

ajeh

Oba-san

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

Re: Unit price to change based on quantity

Could you check the Attributes on this Product:
/index.php?main_page=product_info&cPath=70&products_id=221

and see if they are all marked as include in base 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!

10 Jun 2011, 4:41 PM
#25
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Unit price to change based on quantity

Hi Ajeh

The attributes are merely labels to show the client how much each price is depending on how many they order.

The actual price set up was setup using the Product price Manager.

The unit price is £275 but the product price manager setup is:

Discount Qty Applies to Mixed Attributes Yes No
Preview Only ... Current Price Status ... Preview Only
Product Discount Info Discount Type: Discount Priced from:
Discount Levels Minimum Qty Discount Value Calculate Price: Extended Price:
Discount 1 £260.00 x 2 = £520.00
Discount 2 £250.00 x 6 = £1,500.00
Discount 3 £240.00 x 12 = £2,880.00
Discount 4 £230.00 x 24 = £5,520.00
Discount 5 £220.00 x 48 = £10,560.00
Discount 6 £200.00 x 100 = 20,000.00

All I want to do now is list the lower price like we have done on the actual product page for http://ergonomiceducationfurniture.co.uk/index.php?main_page=product_info&cPath=70&products_id=221

Hope this helps.

Debbie Harrison
DVH Design | Web Design blog

10 Jun 2011, 5:36 PM
#26
ajeh avatar

ajeh

Oba-san

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

Re: Unit price to change based on quantity

You might see if any of this helps in the product_listing.php module:

        case 'PRODUCT_LIST_PRICE':
//        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_price = $currencies->display_price(zen_get_products_discount_price_qty((int)$listing->fields['products_id'], 999999), zen_get_tax_rate(zen_products_lookup((int)$listing->fields['products_id'], 'products_tax_class_id')));
        $lc_align = 'right';
        $lc_text = (zen_products_lookup((int)$listing->fields['products_id'], 'products_discount_type') !=0 ? 'Price from ' : '');


        $lc_text .=  $lc_price;
        // more info in place of buy now
        $lc_button = '';

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!

12 Jun 2011, 8:00 PM
#27
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Unit price to change based on quantity

It works!!!! Thank you so much again! :clap:

Debbie Harrison
DVH Design | Web Design blog

12 Jun 2011, 10:55 PM
#28
ajeh avatar

ajeh

Oba-san

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

Re: Unit price to change based on quantity

Thanks for the update that this works for you ... :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!