vittyc Posted September 18, 2018 Share Posted September 18, 2018 I'm adding products with free domain but when I preview it in the front-end it comes up with; "£2.49 GBP Monthly (Free Domain)" Is there a way so it just shows "£2.49" and not "GBP Monthly (Free Domain)" ? I've tried; {$product.pricing.minprice.cycleText} {$product.pricing.monthly} Any help and tips would be great thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 19, 2018 Share Posted September 19, 2018 Hi Sam, 17 hours ago, vittyc said: I'm adding products with free domain but when I preview it in the front-end it comes up with; "£2.49 GBP Monthly (Free Domain)" Is there a way so it just shows "£2.49" and not "GBP Monthly (Free Domain)" ? the front-end implies the Products page, but I can't recall it displaying 'Free Domain' there before... it will at the Product Configuration stage when it shows the billingcycle dropdown options. where are you seeing it? which orderform template are you using and is this an English-only GBP site ? 0 Quote Link to comment Share on other sites More sharing options...
vittyc Posted September 19, 2018 Author Share Posted September 19, 2018 38 minutes ago, brian! said: Hi Sam, the front-end implies the Products page, but I can't recall it displaying 'Free Domain' there before... it will at the Product Configuration stage when it shows the billingcycle dropdown options. where are you seeing it? which orderform template are you using and is this an English-only GBP site ? Hi Brian, Thanks for getting back and yes sorry, front-end (should've been specific) and i'm using the "Premium Comparison" template attached an image and yeah on my local server, the currency is GBP. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 20, 2018 Share Posted September 20, 2018 in the products.tpl template, you should be able to use any of the following (inside the foreach loop) to show £1.99 GBP... {$product.pricing.minprice.price} {$product.pricing.minprice.simple} the minprice will be the smallest billing cycle (e.g monthly, quarterly, semi, annual etc in that order) - not necessarily the cheapest price. 0 Quote Link to comment Share on other sites More sharing options...
vittyc Posted September 20, 2018 Author Share Posted September 20, 2018 3 minutes ago, brian! said: in the products.tpl template, you should be able to use any of the following (inside the foreach loop) to show £1.99 GBP... {$product.pricing.minprice.price} {$product.pricing.minprice.simple} the minprice will be the smallest billing cycle (e.g monthly, quarterly, semi, annual etc in that order) - not necessarily the cheapest price. Thanks Brian, {$product.pricing.minprice.simple} worked thanks for monthly, but for annually I'm getting "GBP Annually " I tried alternatives but either breaks for stays the same, any ideas? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 20, 2018 Share Posted September 20, 2018 HI Sam, if you wanted to show multiple cycle prices for the same product, you'd either have to take the raw price for the billing cycle (2.49) and add currency prefix and/or suffix to it... {$currency.prefix}{$product.pricing.rawpricing.monthly}{$currency.suffix} e.g the above would show £2.49 GBP... take out the suffix code and it would show £2.49 - same would apply for annual prices and the other billing cycles too... {$currency.prefix}{$product.pricing.rawpricing.annually}{$currency.suffix} if the value of $product.pricing.rawpricing.monthly (or any other cycles) equals -1, then the product isn't priced for that billing cycle. ... or the other way is to take your full text price and strip it after the first space.. {$product.pricing.cycles.monthly} for you, the above code would show £2.49 GBP Monthly (Free Domain)... {$product.pricing.cycles.monthly|strstr:' ':true} and this would show just £2.49 with no additional text. a third way, if you're doing some form of showing multiple prices of a product (list, dropdown etc) would be to loop through the $product.pricing.cycles or $product.pricing.rawpricing arrays and output the prices like that... I did something similar for the Pure Comparison template in a previous post... the code wouldn't be exactly the same, but it wouldn't be a million miles away. note the $product.pricing.cycles array will contain ONLY those cycles for which the product is priced - whereas the rawpricing array contains prices and fees for all cycles whether priced or not. 0 Quote Link to comment Share on other sites More sharing options...
vittyc Posted September 21, 2018 Author Share Posted September 21, 2018 21 hours ago, brian! said: HI Sam, if you wanted to show multiple cycle prices for the same product, you'd either have to take the raw price for the billing cycle (2.49) and add currency prefix and/or suffix to it... {$currency.prefix}{$product.pricing.rawpricing.monthly}{$currency.suffix} e.g the above would show £2.49 GBP... take out the suffix code and it would show £2.49 - same would apply for annual prices and the other billing cycles too... {$currency.prefix}{$product.pricing.rawpricing.annually}{$currency.suffix} if the value of $product.pricing.rawpricing.monthly (or any other cycles) equals -1, then the product isn't priced for that billing cycle. ... or the other way is to take your full text price and strip it after the first space.. {$product.pricing.cycles.monthly} for you, the above code would show £2.49 GBP Monthly (Free Domain)... {$product.pricing.cycles.monthly|strstr:' ':true} and this would show just £2.49 with no additional text. a third way, if you're doing some form of showing multiple prices of a product (list, dropdown etc) would be to loop through the $product.pricing.cycles or $product.pricing.rawpricing arrays and output the prices like that... I did something similar for the Pure Comparison template in a previous post... the code wouldn't be exactly the same, but it wouldn't be a million miles away. note the $product.pricing.cycles array will contain ONLY those cycles for which the product is priced - whereas the rawpricing array contains prices and fees for all cycles whether priced or not. Thanks for the continued help Brian, definately getting there! I used; {$currency.prefix}{$product.pricing.rawpricing.annually}{$currency.suffix} and it came back with £50 GBP which is the right price but don't want GBP there.... 0 Quote Link to comment Share on other sites More sharing options...
vittyc Posted September 21, 2018 Author Share Posted September 21, 2018 I just went into the admin area and found "Currencies" section where I removed 'GBP' from the Suffix section which removed it. Will that have any bad effect, anywhere else? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 22, 2018 Share Posted September 22, 2018 21 hours ago, vittyc said: Will that have any bad effect, anywhere else? no - it's just a bit of optional text... it only becomes awkward when you want to use it there, but not here... but if you're aiming primarily at a UK audience, then it makes sense to remove it entirely as it's only relevant in a multi-currency environment. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.