| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product Variants - Show Price in Drop-Down | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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? |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() 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
__________________
Version 4.1.8 & 4.1.9 ezcheckout4.1.x cdseolinks2 product_metatags41x shipping_per_product41x http://www.earthsmagic.com |
|||||||
#4
|
|||||||
|
|||||||
![]() Perfect, Thank you!!
|
|||||||
#5
|
|||||||
|
|||||||
![]() 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.
|
|||||||
#6
|
|||||||
|
|||||||
![]() Sorry Liz, in that case it isn't going to work for you.
Steve
__________________
Version 4.1.8 & 4.1.9 ezcheckout4.1.x cdseolinks2 product_metatags41x shipping_per_product41x http://www.earthsmagic.com |
|||||||
#7
|
|||||||
|
|||||||
![]() 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
__________________
Darren X-Cart Gold 4.3.1 |
|||||||
#8
|
|||||||||
|
|||||||||
![]() (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.
__________________
Marcello Canitano New Site: X-Cart v4.5.5 GOLD X-Cart Mobile v1.4.3 X-Payments v1.0.6 CDSEO Pro v2 Total Server Solutions xCDN www.silverhorseracing.com |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|