PreMadeKB Posted October 16, 2014 Report Posted October 16, 2014 I am using "Winzard List" Template and want to show Pricing from Yearly to Monthly but blesta is showing from monthly to Yearly. Eg: 1 Year - $20 6 Month - $10 3 Month - $5 Currently Blesta is showing pricing by this method: And I want to change this to (Image screenshot taken by high resolution camera, 20MP HD) How can I do this? Thanks. Quote
0 Michael Posted October 16, 2014 Report Posted October 16, 2014 I think (sort of know) it's in /plugins/order/views/templates/wizard/main_packages.pdt however I'm not sure how you can change it from the lowest_price to the highest_price for you. Quote
0 Blesta Addons Posted October 16, 2014 Report Posted October 16, 2014 you can/want edit core files ? PreMadeKB 1 Quote
0 Blesta Addons Posted October 17, 2014 Report Posted October 17, 2014 Sorry for the delay ... open the file /app/models/packages.php search (line 1428) order(array('period' => "ASC", 'term' => "ASC"))->fetchAll(); replace with order(array('period' => "DESC", 'term' => "DESC"))->fetchAll(); you are done .. NOTE :every upgrade of blesta you should do the same . PreMadeKB and Michael 2 Quote
0 ldavies283 Posted August 3, 2017 Report Posted August 3, 2017 Update for this thread - in Version 4.0.1 the line has moved to the function getPackagePricing and constructed in a slightly different way: Before: private function getPackagePricing($package_id) { $fields = ['package_pricing.id', 'package_pricing.pricing_id', 'package_pricing.package_id', 'pricings.term', 'pricings.period', 'pricings.price', 'pricings.setup_fee', 'pricings.cancel_fee', 'pricings.currency']; return $this->Record->select($fields)->from('package_pricing')-> innerJoin('pricings', 'pricings.id', '=', 'package_pricing.pricing_id', false)-> where('package_pricing.package_id', '=', $package_id)-> order(['period' => 'ASC', 'term' => 'ASC'])->fetchAll(); } After: private function getPackagePricing($package_id) { $fields = ['package_pricing.id', 'package_pricing.pricing_id', 'package_pricing.package_id', 'pricings.term', 'pricings.period', 'pricings.price', 'pricings.setup_fee', 'pricings.cancel_fee', 'pricings.currency']; return $this->Record->select($fields)->from('package_pricing')-> innerJoin('pricings', 'pricings.id', '=', 'package_pricing.pricing_id', false)-> where('package_pricing.package_id', '=', $package_id)-> order(['period' => 'DESC', 'term' => 'DESC'])->fetchAll(); } So change the Order clause to DESC instead of ASC (y) Quote
0 fzobitz Posted January 15, 2019 Report Posted January 15, 2019 I made this change (because I also want the Yearly price shown first...) and the drop-down is now displaying it in the correct order, however, the "selected" option is the lowest monthly choice. So where can the "selected" option be changed to the first item in the list (which would be the yearly option)? Quote
0 fzobitz Posted January 17, 2019 Report Posted January 17, 2019 I figured it out. I'm using the wizard template and modified: plugins/order/views/templates/wizard/config.pdt Line 29 was this: $selected_price = $this->Html->ifSet($vars->pricing_id, $item['pricing_id']); I changed it to: $selected_price = 1; Yes it is a core mod which I need to keep in mind during upgrades, but at least the most expensive package is presented and selected first now. Quote
Question
PreMadeKB
I am using "Winzard List" Template and want to show Pricing from Yearly to Monthly but blesta is showing from monthly to Yearly.
Eg:
1 Year - $20
6 Month - $10
3 Month - $5
Currently Blesta is showing pricing by this method:
And I want to change this to
(Image screenshot taken by high resolution camera, 20MP HD)
How can I do this?
Thanks.
7 answers to this question
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.