amonn Posted August 20, 2011 Posted August 20, 2011 For tea shop i need different prices for different weight. something like this with quick add: 20grams - $1 [buy now] 50grams - $2 [buy now] 100grams - $3 [buy now] 500grams - $10 [buy now] i need to write prices manually or, for example, i can have 1 basic price (for 100 grams) and another prices should calculate using coefficients: for 50grams: (basic price)/100*50*K1, for 20grams: (basic price)/100*20*K2. is there any standard solution for sold by weight products?
Guest Posted August 20, 2011 Posted August 20, 2011 Dimitry, Use the attributes to set prices for different quantities. Chris
amonn Posted August 20, 2011 Author Posted August 20, 2011 but doesnt works if customer adds (100grams) + (50grams) in cart it looks like 2 products, but not like 1 product with weight 150grams also, customer cannt manually write weight (for example 85 grams)
GemRock Posted August 20, 2011 Posted August 20, 2011 you do things in a non standard way so there is no standard solution but a solution is not difficult to figure out: 1. allow customer to key in any weight; 2. workout the k afactor: if ($weight < 21) then k=1 else if $weight < 51 then k = 0.8; etc. 3. set $basic_price = $0.05; 4. $price = $basic_price * $weight * k; above is for illustration only. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
satish Posted August 21, 2011 Posted August 21, 2011 Use attribute but tweak so that customer can state weight. Now your code should calcualte cost depending on weight added. This is nit a default osc feature and you will have to tweak code for this. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.