Zen Cart Logo
Forums / All Other Contributions/Addons / Display Multiple Prices on Product

Display Multiple Prices on Product

Views: 538

Results 1 to 3 of 3
20 Apr 2011, 5:51 AM
#1
dizzy49 avatar

dizzy49

New Zenner

Join Date:
Apr 2011
Posts:
1
Plugin Contributions:
0

Display Multiple Prices on Product

I've looked in the Add-Ons at the price Add-Ons, and I can't seem to find something to fit my needs, and was hoping someone could point me in the direction of something, or help me out.

I need to display two prices for a product, and allow someone to add the product to the cart with either price.

We sell art work, and we sell it two ways. You can buy the original, and no reproductions will be made, or they can buy reproductions, and then the original will no longer be sold. (I've notice a lot of web template sites use a similar scheme)

I ran a osCommerce site many years ago, so I can figure how to add the price to the database, and display it on the product screen. However, I'm at a loss on how to display an Add To Cart for each price and get them to work correctly.

Here's some quasi-code I figure would go into the product page. Where would it go in ZenCart? In one of the files in the template folders, or one of the main files? ZC has me totally screwed up when it comes to that.

$qry = SUM(SELECT products_quantity FROM orders_products WHERE products_id = $pid)

if $qry < 1
{
Original Art Price: $product['original_art_price']
-= Display Add To Cart Image/Link =-
}
-= Normal Price and Add To Cart Stuff

}

20 Apr 2011, 6:12 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Display Multiple Prices on Product

Use attributes ... tutorials/faq link top right of this page.

20 Apr 2011, 7:28 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Display Multiple Prices on Product

You would still need some custom code to disable the "original" option after a repro has been sold, or disable the product entirely when the original has been sold.
If you used the Stock by Attributes mod, you could set a quantity of 1 on the original and many on the repro. Then your customization would have useful info at hand to work from. At order completion, when the db is being decremented, you would reduce stock in the option not chosen to 0.