![]() |
Product Variants - Show Price in Drop-Down
Hello,
Does anyone know how I can display a variants price in the drop-down box? I think this would make it easier for customers so that they don't have to choose an option and then see what the price changes to. Instead they see a ($price) next to the description in the drop-down. I use product variants extensively in my store, and prefer them over product options because I can assign sku's, images, weights, and price individually. I don't think it would be effective to manually enter the price in the description because that would make price updates a major hassle, and would not work for wholesale pricing. Anyone know how this can be done? |
Re: Product Variants - Show Price in Drop-Down
Product variants and their attributes are populated on page load. You can edit variants.tpl (look in skin1/modules/Product_Options for correct file name) to include price. There is probably foreach or loop that reads all variants. At least that would be the place I would start with
|
Re: Product Variants - Show Price in Drop-Down
Hi,
I had the same issue and added the prices to the end of the variant. Try adding the code below in modules/Product_Options/customer_options.php Find $variants = func_get_product_variants($productid, $user_account['membershipid']); around line 44 and add the following after it. ################################################## ########################################## # Loop through product variants, get the price and add to the end of the drop down name ################################################## ########################################## if ($variants) { foreach ($variants as $k => $v) { foreach($v['options'] as $k1 => $v1) { $product_options[0]['options'][$v1['optionid']]['option_name'] = $product_options[0]['options'][$v1['optionid']]['option_name'] . " $" . $v['price']; } } } ################################################## ########################################## # END price add to variants Steve |
Re: Product Variants - Show Price in Drop-Down
Perfect, Thank you!!
|
Re: Product Variants - Show Price in Drop-Down
Darn, I noticed a problem today. If you have multiple product variants this isn't going to work. It adds three prices to the end of a line, and then an additional few lines of just prices. I'm not sure how you would make this work with multiple variants, would probably get a bit complicated.
|
Re: Product Variants - Show Price in Drop-Down
Sorry Liz, in that case it isn't going to work for you.
Steve |
Re: Product Variants - Show Price in Drop-Down
Has anyone worked out how to achieve this for more than one Product Variant? It's been very useful to get just one, but I would love you long time if you could do this for every Variant available.
Darren |
Re: Product Variants - Show Price in Drop-Down
(Sorry to revive an old thread)
We are curious to see if anyone has mastered this as well, we're using x-cart v4.5.5. Customer's get confused when they select a product variant and it changes the price without truly notifying them unless they are watching the price change. Having (like product modifier) the price listed next to the variant in the dropdown is a must for us. Tried to figure it out today but could not call the correct smarty variable. |
All times are GMT -8. The time now is 06:11 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.