| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Show Price in Price Variant As Price | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Show Price in Price Variant As Price
Is there a simple code I can add so that on the products page the price variant shows the actual price of the product price variant instead of how much the variant will add to the price? It's really annoying for the customer to have to use a calculator to add the variant to the base price to get the total price.
Thanks. 4.4.4 Gold
__________________
4.4.5 Gold |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Show Price in Price Variant As Price
What do you mean by simple code? If you find some "simple" code out there, let me know. Most code is not "simple"!
I'm not sure if this applies to variants and I haven't tested it at all, but for regular product options that are a price modifier look here: /common_files/modules/Product_Options/customer_options.tpl Near line 58: {if $o.modifier_type ne '%'} {currency value=$o.price_modifier display_sign=1 plain_text_message=1} {else} {$o.price_modifier}% {/if} So you could edit this and do some math: {math equation="price_modifier+current_price" price_modifier=$o.price_modifier current_price=$product.taxed_price format="%.2f" assign=total_variant_price} {currency value=$total_variant_price plain_text_message=1} Place the code above in place of: {currency value=$o.price_modifier display_sign=1 plain_text_message=1} There might be another way, but this will get the job done I think. Hope that helps,
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Show Price in Price Variant As Price
I believe only the Price Modifier shows the amount added by the option (not variants).
Variants can be tricky. If there is just one variant option then in the same file totaltec mentioned the following code adds the total price for the variants to the drop-down menu. Before </option>: PHP Code:
|
|||||||||
#4
|
|||||||
|
|||||||
Re: Show Price in Price Variant As Price
Thanks for the replies. I am talking about the price modifier. I have an item that is $65.00. My price modifier is: (for sizes)
A. B. +44 C. +154 D. +264 E. +374 So when you select the dropdown, it shows the above (which can be misleading to a customer). What I would like the dropdown to show is the total price: A. $65.00 B. $109.00 C: $219.00 D. $329.00 E. $439.00 I just can't figure out the code.
__________________
4.4.5 Gold |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Show Price in Price Variant As Price
Is my solution above not working? Or do I still not understrand what you want?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#6
|
|||||||
|
|||||||
Re: Show Price in Price Variant As Price
I tried the code above, but it didn't do anything. So I'm probably doing something wrong.
__________________
4.4.5 Gold |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Show Price in Price Variant As Price
Are you using a skin other than light and lucid 3 column? If so you may need to make the modification to the corresponding template in your skin directory. You can make sure you are affecting the right template by placing a small character or phrase somewhere and checking for that in the source of the page. You can also use Webmaster mode to determine the right template.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#8
|
|||||||
|
|||||||
Re: Show Price in Price Variant As Price
Ah...Webmaster Mode. Forgot about using that. Used that, inserted the code, and bingo! Thanks so much. Perfect!
__________________
4.4.5 Gold |
|||||||
#9
|
|||||||
|
|||||||
Re: Show Price in Price Variant As Price
{math equation="price_modifier+current_price" price_modifier=$o.price_modifier current_price=$product.taxed_price format="%.2f" assign=total_variant_price}
{currency value=$total_variant_price plain_text_message=1}[/code] The code above by totaltec works great but it doesn't show the cost of the first option in the list. This code will show the cost of first option in list also: {if $v.is_modifier eq 'Y' and $o.price_modifier ne 0} ( {if $o.modifier_type ne '%'} {math equation="price_modifier+current_price" price_modifier=$o.price_modifier current_price=$product.taxed_price format="%.2f" assign=total_variant_price} {currency value=$total_variant_price plain_text_message=1} {*** disable orig code currency value=$o.price_modifier display_sign=1 plain_text_message=1***} {else} {$o.price_modifier}% {/if} {else} ({currency value=$product.taxed_price plain_text_message=1} {/if} )
__________________
X-Cart Gold 4.7.5 |
|||||||
#10
|
|||||||
|
|||||||
Re: Show Price in Price Variant As Price
What a great piec of code Mike SSL. Now the modifiers will make sense to my customer. Maybe this piece of code should be integrated as a display option in the next Xcart update? Or maybe just a repost to common changes post?
Thanks so much for this.
__________________
xcartgold 4.5.4 xcartgold 4.5.5 |
|||||||
|
|||
X-Cart forums © 2001-2020
|