Announcement

Collapse
No announcement yet.

Displaying GB Pounds and Euros - I'm stuck

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Displaying GB Pounds and Euros - I'm stuck

    I've just tried to add Euros to my site and it works fine for products that don't have permutations. I use permutations extensively and use the Drop down permutations list andand the Basic price with Tax message in brackets.
    However only GB Pound prices appear in the drop down list.
    How do I get Euros to be shown as well please?
    Thanks
    Guy
    Guy Bodger

    Luxury pure wool Duvets, Underblankets, Pillows, Aromatherapy Pillows, Magnetic Therapy Underblankets, Baby Rugs and Pet Beds

    #2
    Hi there - I think this is one for the wish list I'm afraid. There is no variable available for the permutation price which could then be formatted correctly to display in the second currency. I'm sorry about that. The only thing I can suggest is creating a new variable called 'EuroPrice' and making it settable at the Permutation Level. You can then enter a value for EuroPrice in for each permutation and then edit the 'Drop Down Permutation Entry' layout to include the 'EuroPrice' variable.

    Comment


      #3
      Dual Currency Pricing

      Hi Chris,

      I'm a bit frustrated by this, where in the manual or the sales blurb does it you can't use selection items on your site if you wish to show dual currencies.
      I get very frustrated by products that say they do this and that and then when you come to use them they only do part of what they are supposed to do.
      I've just spent a lot of money on a product promotion in the EU and now I can't show product prices on my site in Euros except when in the cart. Surely you would find this unaceptable if you'd bought a product tht offered dual currencies?
      Can you not provide any sort of work around other than mesing up my site by having to create new products for each selection item? I don't think it is reasonable to have to change prices manually when the exchange rate changes.
      Regards
      Guy
      Guy Bodger

      Luxury pure wool Duvets, Underblankets, Pillows, Aromatherapy Pillows, Magnetic Therapy Underblankets, Baby Rugs and Pet Beds

      Comment


        #4
        Try this.

        Create a new variable EuroRate of type: number, place of setting: Site. Set it's value to whatever rate you're using.

        Now replace layout Additional Price in Brackets with
        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e%20%3d%3d%20FALSE" >
           (+<actinic:block PHP='true' SELECTABLE='false'>
        		formattedcurrency(<actinic:variable name="PermutationPriceRaw" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');
        		formattedcurrency(<actinic:variable name="PermutationPriceRaw" /> * <actinic:variable name="EuroRate" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', ' €');
        	</actinic:block>)
        </actinic:block>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e" />
           (+<actinic:block PHP='true' SELECTABLE='false'>
        		formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');
        		formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" /> * <actinic:variable name="EuroRate" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', ' €');
        	</actinic:block>)
        </actinic:block>
        Remember to keep EuroRate in sync with the one you set Business Settings / Options.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          I didn't have time to see if the rate from Business Settings / Options is available in a variable. If so, it would of course make sense to use this instead of the secondary variable EuroRate.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Excellent assistance

            Dear Norman,

            Thanks very much for your help, it was excellent, very prompt and worked first time. I was able to amend the format slightly and it is just what I wanted.
            Many thanks Guy
            Guy Bodger

            Luxury pure wool Duvets, Underblankets, Pillows, Aromatherapy Pillows, Magnetic Therapy Underblankets, Baby Rugs and Pet Beds

            Comment


              #7
              Wonderful stuff.

              I've added it to the knowledge base.
              Last edited by KB2; 23-Mar-2010, 11:13 AM. Reason: Updating kb links

              Comment


                #8
                Wouldn't it be cool if...

                Hi Chris,
                You could add these sorts of things to the Actinic help file as a link e.g. advise on changing the currency format in the related topics and have a link to the knowledge base or have as Microsoft have for their office products an on-line and off-line help facility.
                It would just make the integration of all this useful information very much easier to get out for novices like me!
                Thanks
                Guy
                Guy Bodger

                Luxury pure wool Duvets, Underblankets, Pillows, Aromatherapy Pillows, Magnetic Therapy Underblankets, Baby Rugs and Pet Beds

                Comment


                  #9
                  Okay! Here's how to do this automatically so it picks up the second currency from Actinic and uses the appropriate symbol and money format for that currency. It will display nothing if the alternate currency isn't set.

                  This is quite complex in that it queries the Actinic database for the required values.
                  There may be a performance hit on sites with thousands of pages.

                  Put the following into your Overall Layout, just after the <body ...> tag.
                  Code:
                  <actinic:block php="true" > 
                  	// Prefetch Alternate currency variables
                  	$bDisplayEuroPrice = ''; 
                  	$sAltPriceCurrency = ''; 
                  	$sExchangeRate = '';
                  	$sAltPriceSymbol = '';
                  	$sEuroPriceFormat = '';
                  	$sDecimalSep = '';
                  	$sThousandSep = '';
                  	$nCurrencyDigits = '';
                  	$connect = odbc_pconnect("ActinicCatalog<actinic:variable name="ECMajorVersion" selectable="false" />","","", SQL_CUR_USE_ODBC); 
                  	$query = "SELECT bDisplayEuroPrice, sAltPriceCurrency, sEuroPriceFormat FROM [Setup2] WHERE [bDisplayEuroPrice]"; 
                  	$result = odbc_exec($connect, $query); 
                  	odbc_fetch_row($result);
                  	$bDisplayEuroPrice = odbc_result($result, 1); 
                  	$sAltPriceCurrency = odbc_result($result, 2); 
                  	$sEuroPriceFormat = odbc_result($result, 3); 
                  	if ( $bDisplayEuroPrice )
                  		{ 
                  		$query = "SELECT sExchangeRate, SINTLSYMBOL, sAltPriceSymbol, SMONDECIMALSEP, SMONTHOUSANDSEP, ICURRDIGITS FROM [currencies] WHERE [SINTLSYMBOL]='" . $sAltPriceCurrency . "'"; 
                  		$result = odbc_exec($connect, $query); 
                  		odbc_fetch_row($result);
                  		$sExchangeRate = odbc_result($result, 1); 
                  		$sAltPriceSymbol = odbc_result($result, 3); 		
                  		$sDecimalSep = odbc_result($result, 4);
                  		$sThousandSep = odbc_result($result, 5);
                  		$nCurrencyDigits = odbc_result($result, 6);
                  		odbc_close_all();   
                  		} 
                  </actinic:block>
                  Now replace layout Additional Price in Brackets with
                  Code:
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e%20%3d%3d%20FALSE" >
                     (+<actinic:block PHP='true' SELECTABLE='false'>
                  		formattedcurrency(<actinic:variable name="PermutationPriceRaw" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');
                  		if ( $bDisplayEuroPrice ) 
                  			{
                  			formattedcurrency((<actinic:variable name="PermutationPriceRaw" />* $sExchangeRate), $nCurrencyDigits, $sDecimalSep, $sThousandSep, (' / ' . $sAltPriceSymbol));
                  			}
                  	</actinic:block>)
                  </actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e" />
                     (+<actinic:block PHP='true' SELECTABLE='false'>
                  		formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');
                  		if ( $bDisplayEuroPrice ) 
                  			{
                  			formattedcurrency((<actinic:variable name="AssociatedProduct::ProductPriceRaw" /> * $sExchangeRate), $nCurrencyDigits , $sDecimalSep, $sThousandSep, (' / ' . $sAltPriceSymbol));
                  			}
                  	</actinic:block>)
                  </actinic:block>
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    What a great reply

                    Dear Norman,

                    Sorry for taking so long to reply but I wanted to say thanks for doing this piece of code for me - very much appreciated.

                    BTW - wouldn't it be good if the Actinic Help section could have a hyperlink to the Actinic Community section that relates to that part of the product. e.g. the help page on currencies could point to this thread, a bit like the dreaded Microsoft do for Office products now called on-line Help. Just a thought!
                    Regards

                    Guy
                    Guy Bodger

                    Luxury pure wool Duvets, Underblankets, Pillows, Aromatherapy Pillows, Magnetic Therapy Underblankets, Baby Rugs and Pet Beds

                    Comment


                      #11
                      You're welcome.

                      Also see http://community.actinic.com/showthread.php?t=40018 where I've posted a way to automatically update the exchange rate using the online European Central Bank dataset.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Hi Norman,

                        Many thanks for this. An even better answer than having two numbers to update.... something automatic to save the tedium!!
                        Great stuff
                        Regards

                        Guy
                        Guy Bodger

                        Luxury pure wool Duvets, Underblankets, Pillows, Aromatherapy Pillows, Magnetic Therapy Underblankets, Baby Rugs and Pet Beds

                        Comment

                        Working...
                        X