View Single Post
  #2  
Old 03-09-2012, 11:50 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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.
Reply With Quote