martinezfer Posted January 21, 2020 Share Posted January 21, 2020 Hi, I am having trouble figuring out how to diplay the product prices the way I want them I have 4 different shared plans with recurring annual billing options. The problem: The plans (pre-cart) show the total year price instead of the monthly price. While there is an option to add a monthly price, this monthly price changes depending on the annual billing option. For each of the 4 plans the annual billing option gives the customer a much cheaper monthly price, but the customer does not see this because the plans only shows the one monthly price added. In the plan I want customers too see the monthly price according to the annual billing cycle first before they select a plan and be shown monthly billing cycle price after. How can I do this? Thanks 0 Quote Link to comment Share on other sites More sharing options...
jdmefsir Posted January 22, 2020 Share Posted January 22, 2020 so you want to display the monthly breakdown for annual plans? can you share your website? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 22, 2020 Share Posted January 22, 2020 16 hours ago, martinezfer said: How can I do this? that likely depends on the orderform template being used - based on that, it might require changes to the template(s), or action hooks to manipulate the pricing arrays to suit your purposes. 0 Quote Link to comment Share on other sites More sharing options...
gei Posted January 25, 2020 Share Posted January 25, 2020 To be honest this is more of a WHMCS bug than a necessary customization. The way they show pricing by default is very counter intuitive 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 26, 2020 Share Posted January 26, 2020 14 hours ago, gei said: To be honest this is more of a WHMCS bug than a necessary customization. not really a bug (by their definition), just a long standing method of thinking in smallest cycles rather than lowest price, that when you take a step back and look at it clearly, is silly. there are lots of features that are still based on how they were doing it 10+ years ago. 14 hours ago, gei said: The way they show pricing by default is very counter intuitive I agree - though after nearly 7 years of this nonsense, i'm now conditioned to think the WHMCS way of cycles and not prices. 😵 I can't see WHMCS touching this in v7.9, so they're probably going to wait until a future major release with new templates... which I assume is v8 in the Summer but who knows. however, I will guarantee that this issue will be addressed by others outside of WHMCS long before WHMCS themselves get around to doing it - and I can say that based on inside knowledge of some exciting projects that are currently in development. 😉 1 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted January 28, 2020 Share Posted January 28, 2020 BTW there is still missing a slash with a time period... customers complaints etc... and I see why... 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 28, 2020 Share Posted January 28, 2020 4 hours ago, indy0077 said: BTW there is still missing a slash with a time period... customers complaints etc... and I see why... are you modifying that output with my custom Smarty code from years ago? you could add the language string pricingCycleShort.monthly to the output to show "mo" in the clients language - or create a custom language override for all used languages. 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted January 28, 2020 Share Posted January 28, 2020 6 minutes ago, brian! said: are you modifying that output with my custom Smarty code from years ago? you could add the language string pricingCycleShort.monthly to the output to show "mo" in the clients language - or create a custom language override for all used languages. 😁😁😁 Hi Brian, to be honest, I can't remember regarding this problem, but anyway you helped me a lot in the passt!!! 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted January 28, 2020 Share Posted January 28, 2020 (edited) 10 hours ago, indy0077 said: BTW there is still missing a slash with a time period... customers complaints etc... and I see why... 5 hours ago, indy0077 said: 😁😁😁 Hi Brian, to be honest, I can't remember regarding this problem, but anyway you helped me a lot in the passt!!! Ok, I checked all settings and files - the problem happens by the " Monthly Pricing Breakdown " option and the result is above in the screenshot (with the missing "mo." as well) which shows e.g. annualy price of $3,58 and so on... it should be the sume for 12 months and then $3,58/mo. That should be the right output. Edited January 28, 2020 by indy0077 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 29, 2020 Share Posted January 29, 2020 17 hours ago, indy0077 said: Ok, I checked all settings and files - the problem happens by the " Monthly Pricing Breakdown " option and the result is above in the screenshot (with the missing "mo." as well) which shows e.g. annualy price of $3,58 and so on... it should be the sume for 12 months and then $3,58/mo. That should be the right output. are you doing this on a dev site or your main web site ? i'm not seeing this on the main site... my recollection is that I fixed this in another thread, but I can see that it isn't linked to in the original thread... 🙄 1 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted January 29, 2020 Share Posted January 29, 2020 2 hours ago, brian! said: are you doing this on a dev site or your main web site ? i'm not seeing this on the main site... my recollection is that I fixed this in another thread, but I can see that it isn't linked to in the original thread... 🙄 Here is the link... https://www.isixhosting.com/cart.php?a=confproduct&i=0 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 29, 2020 Share Posted January 29, 2020 thanks for the link - it's slightly tweaked from my code, so i'll take a look on Friday when i'm next here. 1 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted January 29, 2020 Share Posted January 29, 2020 30 minutes ago, brian! said: thanks for the link - it's slightly tweaked from my code, so i'll take a look on Friday when i'm next here. thanks! 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 5, 2020 Share Posted February 5, 2020 (edited) Hi, so I couldn't fix the issue on product and order pages with the "Starting from" price by products they have "Annually, Biennially or Triennially discounts. What I would like is to show after the discounted price the discounted monthly price if any (here e.g. for a annually, biennally and triennially) and then as well... ...here on the product page where instead the current monthly price by month to month, should be shown the monthly price for triennally subscription (that is for example 86 USD/36 months= 2,83 USD). Any one to help with? Thanks Edited February 5, 2020 by indy0077 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 7, 2020 Share Posted February 7, 2020 It seems some posts have been deleted from this thread... 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 7, 2020 Share Posted February 7, 2020 (edited) 4 minutes ago, indy0077 said: It seems some posts have been deleted from this thread... ...and why I say this??? Because I'm missing a post, where BRIAN posted his customized file configureproduct.tpl Where is it??? Edited February 7, 2020 by indy0077 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 8, 2020 Share Posted February 8, 2020 (edited) 18 hours ago, indy0077 said: ...and why I say this??? Because I'm missing a post, where BRIAN posted his customized file configureproduct.tpl Where is it??? I found it in an another thread. Edited February 8, 2020 by indy0077 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 9, 2020 Share Posted February 9, 2020 20 hours ago, indy0077 said: I found it in an another thread. did it solve the issue or do you still need me to take a further look at this ? 1 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 9, 2020 Share Posted February 9, 2020 (edited) 36 minutes ago, brian! said: did it solve the issue or do you still need me to take a further look at this ? Unfortunatelly not. I have a custom template and this code is in the configureproduct.tpl text/x-generic configureproduct.tpl ( HTML document, ASCII text, with very long lines, with CRLF line terminators ) {include file="orderforms/$carttpl/common.tpl"} <script> var _localLang = { 'addToCart': '{$LANG.orderForm.addToCart|escape}', 'addedToCartRemove': '{$LANG.orderForm.addedToCartRemove|escape}' } </script> <form id="frmConfigureProduct"> <input type="hidden" name="configure" value="true" /> <input type="hidden" name="i" value="{$i}" /> <div class="main-content"> <div class="order-content"> <div class="section"> <div class="section-header"> <p class="section-desc">{$LANG.orderForm.configureDesiredOptions}</p> </div> <div class="alert alert-danger hidden" role="alert" id="containerProductValidationErrors"> <div class="alert-body"> <p>{$LANG.orderForm.correctErrors}:</p> <ul id="containerProductValidationErrorsList"></ul> </div> </div> <div class="panel panel-default panel-form"> <div class="panel-body"> <div class="domain-information"> <div class="domain-information-title"> <h2>{$productinfo.group_name} - {$productinfo.name}</h2> </div> </div> <div class="product-info"> {$productinfo.description} </div> </div> </div> </div> {if $pricing.type eq "recurring"} {assign var='recurringCount' value=0} {foreach item=cl from=$pricing.cycles name=foo} {assign var='recurringCount' value=$recurringCount + 1} {/foreach} {if $pricing.monthly} {assign var='mincycle' value="monthly"} {assign var='minimalprice' value=$pricing.rawpricing.monthly} {elseif $pricing.quarterly} {assign var='mincycle' value="quarterly"} {math assign="minimalprice" equation="y/3" y=$pricing.rawpricing.quarterly} {elseif $pricing.semiannually} {assign var='mincycle' value="semiannually"} {math assign="minimalprice" equation="y/6" y=$pricing.rawpricing.semiannually} {elseif $pricing.annually} {assign var='mincycle' value="annually"} {math assign="minimalprice" equation="y/12" y=$pricing.rawpricing.annually} {elseif $pricing.biennially} {assign var='mincycle' value="biennially"} {math assign="minimalprice" equation="y/24" y=$pricing.rawpricing.biennially} {elseif $pricing.triennially} {assign var='mincycle' value="triennially"} {math assign="minimalprice" equation="y/36" y=$pricing.rawpricing.triennially} {/if} {if $pricing.quarterly} {math assign="check_discount_quarterly" equation="100-((y/(x*3))*100)" x=$minimalprice y=$pricing.rawpricing.quarterly format="%d"} {else} {assign var='check_discount_quarterly' value="0"} {/if} {if $pricing.semiannually} {math assign="check_discount_semiannually" equation="100-((y/(x*6))*100)" x=$minimalprice y=$pricing.rawpricing.semiannually format="%d"} {else} {assign var='check_discount_semiannually' value="0"} {/if} {if $pricing.annually} {math assign="check_discount_annually" equation="100-((y/(x*12))*100)" x=$minimalprice y=$pricing.rawpricing.annually format="%d"} {else} {assign var='check_discount_annually' value="0"} {/if} {if $pricing.biennially} {math assign="check_discount_biennially" equation="100-((y/(x*24))*100)" x=$minimalprice y=$pricing.rawpricing.biennially format="%d"} {else} {assign var='check_discount_biennially' value="0"} {/if} {if $pricing.triennially} {math assign="check_discount_triennially" equation="100-((y/(x*36))*100)" x=$minimalprice y=$pricing.rawpricing.triennially format="%d"} {else} {assign var='check_discount_triennially' value="0"} {/if} {if $check_discount_quarterly > 0 || $check_discount_semiannually > 0 || $check_discount_annually > 0 || $check_discount_biennially > 0 || $check_discount_triennially > 0} {assign var="show_discount" value=true} {/if} <div class="section {if $recurringCount == 1}hidden{/if}" id="sectionCycles"> <h3>{$LANG.cartchoosecycle}</h3> <div class="row row-eq-height m-b-neg-24" data-inputs-container> {if $pricing.monthly} <div class="col-sm-4"> <div class="panel panel-check {if $billingcycle eq "monthly"} checked{/if} m-b-24" data-virtual-input > <div class="check check-cycle"> <label {if $configurableoptions}data-update-config data-config-i={$i} data-config-val="monthly"{else}data-change-billingcycle{/if}> <input class="icheck-control" type="radio" value="monthly" name="billingcycle" {if $billingcycle eq "monthly"} checked{/if}> <div class="check-content"> <h6 class="check-title">{$LANG.orderpaymenttermmonthly} <br> {$pricing.monthly|replace:$LANG.orderpaymenttermmonthly:""}</h6> {if !$DiscountCenterAddonIsActive && $show_discount} <p class="check-subtitle"></p> {/if} </div> </label> </div> </div> </div> {/if} {if $pricing.quarterly} <div class="col-sm-4"> <div class="panel panel-check {if $billingcycle eq "quarterly"} checked{/if} m-b-24" data-virtual-input > <div class="check check-cycle"> <label {if $configurableoptions}data-update-config data-config-i={$i} data-config-val="quarterly"{else}data-change-billingcycle{/if}> <input class="icheck-control" type="radio" value="quarterly" name="billingcycle" {if $billingcycle eq "quarterly"} checked{/if}> <div class="check-content"> <h6 class="check-title">{$LANG.orderpaymenttermquarterly} <br> {$pricing.quarterly|replace:$LANG.orderpaymenttermquarterly:""}</h6> {if !$DiscountCenterAddonIsActive} {if $mincycle eq "quarterly" && $show_discount} <p class="check-subtitle"></p> {else} {math assign="price_save" equation="100-((y/(x*3))*100)" x=$minimalprice y=$pricing.rawpricing.quarterly format="%d"} {if $price_save > 0} <p class="check-subtitle"> <span class="save">{$rslang->trans('order.price_save')} {$price_save}%</span> </p> {elseif $show_discount} <p class="check-subtitle"></p> {/if} {/if} {/if} </div> </label> </div> </div> </div> {/if} {if $pricing.semiannually} <div class="col-sm-4"> <div class="panel panel-check {if $billingcycle eq "semiannually"} checked{/if} m-b-24" data-virtual-input > <div class="check check-cycle"> <label {if $configurableoptions}data-update-config data-config-i={$i} data-config-val="semiannually"{else}data-change-billingcycle{/if}> <input class="icheck-control" type="radio" name="billingcycle" value="semiannually"{if $billingcycle eq "semiannually"} checked{/if}> <div class="check-content"> <h6 class="check-title">{$LANG.orderpaymenttermsemiannually} <br> {$pricing.semiannually|replace:$LANG.orderpaymenttermsemiannually:""}</h6> {if !$DiscountCenterAddonIsActive} {if $mincycle eq "semiannually" && $show_discount} <p class="check-subtitle"></p> {else} {math assign="price_save" equation="100-((y/(x*6))*100)" x=$minimalprice y=$pricing.rawpricing.semiannually format="%d"} {if $price_save > 0} <p class="check-subtitle"> <span class="save">{$rslang->trans('order.price_save')} {$price_save}%</span> </p> {elseif $show_discount} <p class="check-subtitle"></p> {/if} {/if} {/if} </div> </label> </div> </div> </div> {/if} {if $pricing.annually} <div class="col-sm-4"> <div class="panel panel-check {if $billingcycle eq "annually"} checked{/if} m-b-24" data-virtual-input > <div class="check check-cycle"> <label {if $configurableoptions}data-update-config data-config-i={$i} data-config-val="annually"{else}data-change-billingcycle{/if}> <input class="icheck-control" type="radio" name="billingcycle" value="annually"{if $billingcycle eq "annually"} checked{/if}> <div class="check-content"> <h6 class="check-title">{$LANG.orderpaymenttermannually} <br> {$pricing.annually|replace:$LANG.orderpaymenttermannually:""}</h6> {if !$DiscountCenterAddonIsActive} {if $mincycle eq "annually" && $show_discount} <p class="check-subtitle"></p> {else} {math assign="price_save" equation="100-((y/(x*12))*100)" x=$minimalprice y=$pricing.rawpricing.annually format="%d"} {if $price_save > 0} <p class="check-subtitle"> <span class="save">{$rslang->trans('order.price_save')} {$price_save}%</span> </p> {elseif $show_discount} <p class="check-subtitle"></p> {/if} {/if} {/if} </div> </label> </div> </div> </div> {/if} {if $pricing.biennially} <div class="col-sm-4"> <div class="panel panel-check {if $billingcycle eq "biennially"} checked{/if} m-b-24" data-virtual-input > <div class="check check-cycle"> <label {if $configurableoptions}data-update-config data-config-i={$i} data-config-val="biennially"{else}data-change-billingcycle{/if}> <input class="icheck-control" type="radio" name="billingcycle" value="biennially"{if $billingcycle eq "biennially"} checked{/if}> <div class="check-content"> <h6 class="check-title">{$LANG.orderpaymenttermbiennially} <br> {$pricing.biennially|replace:$LANG.orderpaymenttermbiennially:""}</h6> {if !$DiscountCenterAddonIsActive} {if $mincycle eq "biennially" && $show_discount} <p class="check-subtitle"></p> {else} {math assign="price_save" equation="100-((y/(x*24))*100)" x=$minimalprice y=$pricing.rawpricing.biennially format="%d"} {if $price_save > 0} <p class="check-subtitle"> <span class="save">{$rslang->trans('order.price_save')} {$price_save}%</span> </p> {elseif $show_discount} <p class="check-subtitle"></p> {/if} {/if} {/if} </div> </label> </div> </div> </div> {/if} {if $pricing.triennially} <div class="col-sm-4"> <div class="panel panel-check {if $billingcycle eq "triennially"} checked{/if} m-b-24" data-virtual-input > <div class="check check-cycle"> <label {if $configurableoptions}data-update-config data-config-i={$i} data-config-val="triennially"{else}data-change-billingcycle{/if}> <input class="icheck-control" type="radio" name="billingcycle" value="triennially"{if $billingcycle eq "triennially"} checked{/if}> <div class="check-content"> <h6 class="check-title">{$LANG.orderpaymenttermtriennially} <br>{$pricing.triennially|replace:$LANG.orderpaymenttermtriennially:""}</h6> {if !$DiscountCenterAddonIsActive} {if $mincycle eq "triennially" && $show_discount} <p class="check-subtitle"></p> {else} {math assign="price_save" equation="100-((y/(x*36))*100)" x=$minimalprice y=$pricing.rawpricing.triennially format="%d"} {if $price_save > 0} <p class="check-subtitle"> <span class="save">{$rslang->trans('order.price_save')} {$price_save}%</span> </p> {elseif $show_discount} <p class="check-subtitle"></p> {/if} {/if} {/if} </div> </label> </div> </div> </div> {/if} </div> </div> {/if} {if count($metrics) > 0} <div class="section"> <div class="section-header"> <h3 class="section-title">{$LANG.metrics.title}</h3> <p class="section-desc">{$LANG.orderForm.configureDesiredOptions}</p> </div> <ul class="list-group list-group-bordered"> {foreach $metrics as $metric} <li class="list-group-item d-flex align-center space-between"> {$metric.displayName} - {if count($metric.pricing) > 1} {$LANG.metrics.startingFrom} {$metric.lowestPrice} / {if $metric.unitName}{$metric.unitName}{else}{$LANG.metrics.unit}{/if} <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#modalMetricPricing-{$metric.systemName}"> {$LANG.metrics.viewPricing} </button> {elseif count($metric.pricing) == 1} {$metric.lowestPrice} / {if $metric.unitName}{$metric.unitName}{else}{$LANG.metrics.unit}{/if} {if $metric.includedQuantity > 0} ({$metric.includedQuantity} {$LANG.metrics.includedNotCounted}){/if} {/if} {include file="$template/usagebillingpricing.tpl"} </li> {/foreach} </ul> </div> {/if} {if $configurableoptions} <div class="section message message-no-data hidden" id="productConfigurableOptionsLoader"> <div class="loader"> {include file="$template/includes/loader.tpl"} </div> </div> <div class="section product-configurable-options" id="productConfigurableOptions"> {foreach $configurableoptions as $num => $configoption} {if $configoption.optiontype eq 1} <div class="section"> <h3>{$configoption.optionname}</h3> <div class="panel panel-default panel-form"> <div class="panel-body"> <select name="configoption[{$configoption.id}]" id="inputConfigOption{$configoption.id}" class="form-control"> {foreach key=num2 item=options from=$configoption.options} <option value="{$options.id}"{if $configoption.selectedvalue eq $options.id} selected="selected"{/if}> {$options.name} </option> {/foreach} </select> </div> </div> </div> {elseif $configoption.optiontype eq 2} <div class="section"> <h3>{$configoption.optionname}</h3> <div class="row row-eq-height m-b-neg-24" data-inputs-container> {foreach key=num2 item=options from=$configoption.options} <div class="col-sm-4"> <div class="panel panel-check {if $configoption.selectedvalue eq $options.id}checked{/if}" data-virtual-input> <div class="check"> <label> <input type="radio" class="icheck-control" name="configoption[{$configoption.id}]" value="{$options.id}"{if $configoption.selectedvalue eq $options.id} checked="checked"{/if} /> <div class="check-content"> <h6 class="check-title"> {if $options.nameonly} {$options.nameonly} {else} {$rslang->trans('generals.enable')} {/if} </h6> <p class="check-subtitle"> {if $options.fullprice != "0.00"} {$currency.prefix}{$options.fullprice}{$currency.suffix} {else} {/if} </p> </div> </label> </div> </div> </div> {/foreach} </div> </div> {elseif $configoption.optiontype eq 3} <div class="section"> <h3>{$configoption.optionname}</h3> <div class="row row-eq-height m-b-neg-24" data-inputs-container> {foreach key=num2 item=options from=$configoption.options} <div class="col-sm-4"> <div class="panel panel-check {if $configoption.selectedqty} checked{/if}" data-virtual-input> <div class="check"> <label> <input class="icheck-control" type="checkbox" name="configoption[{$configoption.id}]" id="inputConfigOption{$configoption.id}" value="1"{if $configoption.selectedqty} checked{/if} /> <div class="check-content"> <h6 class="check-title"> {if $configoption.options.0.nameonly} {$configoption.options.0.nameonly} {else} {$rslang->trans('generals.enable')} {/if} </h6> <p class="check-subtitle"> {if $configoption.options.0.recurring != "0.00"} {$currency.prefix}{$configoption.options.0.recurring|string_format:"%.2f"}{$currency.suffix} {else} {/if} </p> </div> </label> </div> </div> </div> {/foreach} </div> </div> {elseif $configoption.optiontype eq 4} <div class="section"> <h3>{$configoption.optionname}</h3> {if $configoption.qtymaximum} <div class="panel panel-default panel-form panel-range-slider"> <div class="panel-body"> <div> {if !$rangesliderincluded} <script type="text/javascript" src="{$BASE_PATH_JS}/ion.rangeSlider.min.js"></script> <link href="{$BASE_PATH_CSS}/ion.rangeSlider.css" rel="stylesheet"> <link href="{$BASE_PATH_CSS}/ion.rangeSlider.skinModern.css" rel="stylesheet"> {assign var='rangesliderincluded' value=true} {/if} <input type="text" name="configoption[{$configoption.id}]" value="{if $configoption.selectedqty}{$configoption.selectedqty}{else}{$configoption.qtyminimum}{/if}" id="inputConfigOption{$configoption.id}" class="form-control" /> <script> var sliderTimeoutId = null; var sliderRangeDifference = {$configoption.qtymaximum} - {$configoption.qtyminimum}; // The largest size that looks nice on most screens. var sliderStepThreshold = 25; // Check if there are too many to display individually. var setLargerMarkers = sliderRangeDifference > sliderStepThreshold; jQuery("#inputConfigOption{$configoption.id}").ionRangeSlider({ min: {$configoption.qtyminimum}, max: {$configoption.qtymaximum}, grid: true, grid_snap: setLargerMarkers ? false : true, onChange: function() { if (sliderTimeoutId) { clearTimeout(sliderTimeoutId); } sliderTimeoutId = setTimeout(function() { sliderTimeoutId = null; recalctotals(); }, 250); } }); </script> </div> </div> </div> {else} <div class="panel panel-default panel-form"> <div class="panel-body"> <div class="input-group"> <input type="number" name="configoption[{$configoption.id}]" value="{if $configoption.selectedqty}{$configoption.selectedqty}{else}{$configoption.qtyminimum}{/if}" id="inputConfigOption{$configoption.id}" min="{$configoption.qtyminimum}" onchange="recalctotals()" onkeyup="recalctotals()" class="form-control form-control-qty" /> <span class="input-group-addon"> x {$configoption.options.0.name} </span> </div> </div> </div> {/if} </div> {/if} {/foreach} </div> {/if} {if $productinfo.type eq "server"} <div class="section"> <h3>{$LANG.cartconfigserver}</h3> <div class="panel panel-default panel-form"> <div class="panel-body"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label for="inputHostname">{$LANG.serverhostname}</label> <input type="text" name="hostname" class="form-control" id="inputHostname" value="{$server.hostname}" placeholder="servername.yourdomain.com"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="inputRootpw">{$LANG.serverrootpw}</label> <input type="password" name="rootpw" class="form-control" id="inputRootpw" value="{$server.rootpw}"> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <input type="hidden" name="ns1prefix" class="form-control" id="inputNs1prefix" value="{$server.ns1prefix}" placeholder="ns1"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input type="hidden" name="ns2prefix" class="form-control" id="inputNs2prefix" value="{$server.ns2prefix}" placeholder="ns2"> </div> </div> </div> </div> </div> </div> {/if} {if $customfields} <div class="section"> <h3>{$LANG.orderadditionalrequiredinfo}</h3> <div class="panel panel-default panel-form"> <div class="panel-body"> <div class="row"> {foreach $customfields as $customfield} <div class="col-sm-6"> <div class="form-group"> {if $customfield.type eq 'tickbox'} <label class="checkbox" for="customfield{$customfield.id}"> {$customfield.input|replace:'type="checkbox"':'type="checkbox" class="icheck-control"'} {$customfield.name} <span class="required"> {$customfield.required}</span> </label> {if $customfield.description}<span class="help-block"> {$customfield.description}</span>{/if} {else} <label class="control-label" for="customfield{$customfield.id}">{$customfield.name} <span class="required">{$customfield.required}</span></label> {if $customfield.type == "link"} <div class="input-group"> {$customfield.input|replace:"<a":"<a class='input-group-addon'"|replace:"www":"<i class='ls ls-chain'></i>"} </div> {else} {$customfield.input} {/if} {if $customfield.description}<span class="help-block">{$customfield.description}</span>{/if} {/if} </div> </div> {/foreach} </div> </div> </div> </div> {/if} {if count($addonsPromoOutput) > 0 && $addonsPromoOutput.0 != ""} <div class="section"> <h3>{$LANG.cartavailableaddons}</h3> {foreach $addonsPromoOutput as $output} {$output|replace:"type='radio'":"class='icheck-control'"} {/foreach} </div> {/if} {if $addons} <div class="section"> <h3>{$rslang->trans('order.additional_services')}</h3> <div class="row row-eq-height m-b-neg-24" data-inputs-container> {foreach $addons as $addon} <div class="col-sm-{if count($addons) > 1}6{else}12{/if}"> <div class="panel panel-check m-b-24 {if $addon.status}checked{/if}" data-virtual-input> <div class="check"> <label> <input class="icheck-control" type="checkbox" name="addons[{$addon.id}]"{if $addon.status} checked{/if} /> <div class="check-content"> <h6 class="check-title">{$addon.name}</h6> <p class="check-subtitle">{$addon.pricing}</p> <p class="check-desc">{$addon.description}</p> </div> </label> </div> </div> </div> {/foreach} </div> </div> {/if} </div> <div class="order-sidebar"> <div id="sticky-sidebar"> <div class="sticky-sidebar-inner"> <div id="orderSummary"> <div class="order-summary"> <div class="loader" id="orderSummaryLoader"> {include file="$template/includes/loader.tpl" classes="spinner-sm spinner-light"} </div> <h2>{$LANG.ordersummary}</h2> <div class="summary-container" id="producttotal"> </div> <div class="order-summary-actions"> <button type="submit" id="btnCompleteProductConfig" class="btn btn-info btn-checkout"> <div class="loader loader-button hidden" > {include file="$template/includes/loader.tpl" classes="spinner-sm"} </div> <span><i class="ls ls-share"></i>{$LANG.continue}</span> </button> </div> </div> <div class="alert alert-info alert-sm alert-panel"> <div class="alert-icon ls ls-info-circle"></div> <div class="alert-body"> {$LANG.orderForm.haveQuestionsContact} <a href="contact.php" target="_blank" class="alert-link">{$LANG.orderForm.haveQuestionsClickHere}</a> </div> </div> </div> </div> </div> </div> </div> <div class="order-summary order-summary-mob" id="orderSummaryMob"> <div class="loader" id="orderSummaryLoaderMob" style="display: none;"> {include file="$template/includes/loader.tpl" classes="spinner-sm spinner-light"} </div> <h2>{$LANG.ordersummary}</h2> <div class="summary-container"> <div class="summary-container" id="producttotalmob"> </div> <div class="order-summary-actions"> <button type="submit" id="btnCompleteProductConfigMob" class="btn btn-info btn-checkout"> <div class="loader loader-button hidden" > {include file="$template/includes/loader.tpl" classes="spinner-sm"} </div> <span><i class="ls ls-share"></i>{$LANG.continue}</span> </button> </div> </div> </div> </form> <script>recalctotals();</script> Can you help me please? Thanks Edited February 9, 2020 by indy0077 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 10, 2020 Share Posted February 10, 2020 On 09/02/2020 at 14:28, indy0077 said: Can you help me please? Thanks ok, leave it with me... not sure i'll get much of a chance tomorrow, but should have more time on Wednesday. though every time I look at this code, I keep thinking it would be quicker for me to rewrite it as a hook than try to fix it in Smarty. as I don't have Lagom locally, what i'll probably do is use Six, switch the billngcycle output from a dropdown to radio buttons and then fix that to work as you intend. 1 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 10, 2020 Share Posted February 10, 2020 26 minutes ago, brian! said: ok, leave it with me... not sure i'll get much of a chance tomorrow, but should have more time on Wednesday. though every time I look at this code, I keep thinking it would be quicker for me to rewrite it as a hook than try to fix it in Smarty. as I don't have Lagom locally, what i'll probably do is use Six, switch the billngcycle output from a dropdown to radio buttons and then fix that to work as you intend. If it helps, I can provide you a Lagom developer license... 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 10, 2020 Share Posted February 10, 2020 28 minutes ago, brian! said: ok, leave it with me... not sure i'll get much of a chance tomorrow, but should have more time on Wednesday. though every time I look at this code, I keep thinking it would be quicker for me to rewrite it as a hook than try to fix it in Smarty. as I don't have Lagom locally, what i'll probably do is use Six, switch the billngcycle output from a dropdown to radio buttons and then fix that to work as you intend. Also I would like to spend you a small donation for you excelent work and help here on the community. Please send me your PayPal email address. 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 14, 2020 Share Posted February 14, 2020 On 2/10/2020 at 7:36 PM, brian! said: ok, leave it with me... not sure i'll get much of a chance tomorrow, but should have more time on Wednesday. though every time I look at this code, I keep thinking it would be quicker for me to rewrite it as a hook than try to fix it in Smarty. as I don't have Lagom locally, what i'll probably do is use Six, switch the billngcycle output from a dropdown to radio buttons and then fix that to work as you intend. I noticed another thing. If I remove the monthly, quartelly, etc. prices and leave e.g. just the triennally price, then the monthly breakdown price will be displayed correctly on the product page and by step one of ordering. When I leave biennaly and triennally enabled, it takes the monthly price for biennally so the most first active brakdown price, in this case biennally. This says that the "function" is present in the template, it needs just to be added to a string. I'm not a PHP programer, but would it be something like this?: if yearly, biennally, triennally show triennally monthly breakdown price if yearly, biennally show biennally monthly breakdown price if yearly show yearly monthly breakdown price else monthly Or just to take from the prices of a product the smallest price which would be the sume divided by months of the subscription (quartelly, semi-annually, annually, biennally, triennally)... 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted February 16, 2020 Share Posted February 16, 2020 I thing, here is the part of the code in 'products.tpl' file which needs to be edited: {if $DiscountCenterAddonIsActive} <div class="price">{$product.pricing.minprice.price}{if $product.pricing.type !=="free" && $product.pricing.type !=="onetime"}<span class="price-cycle">/{if $product.pricing.minprice.cycle eq "monthly"}{$rslang->trans('order.period.short.monthly')}{elseif $product.pricing.minprice.cycle eq "quarterly"}{$rslang->trans('order.period.short.quarterly')}{elseif $product.pricing.minprice.cycle eq "semiannually"}{$rslang->trans('order.period.short.semiannually')}{elseif $product.pricing.minprice.cycle eq "annually"}{$rslang->trans('order.period.short.annually')}{elseif $product.pricing.minprice.cycle eq "biennially"}{$rslang->trans('order.period.short.biennially')}{elseif $product.pricing.minprice.cycle eq "triennially"}{$rslang->trans('order.period.short.triennially')}{/if}</span>{/if}</div> {else} <div class="price">{if $currency.prefix}<span class="price-prefix">{$currency.prefix}</span>{/if}{$product.pricing.minprice.price|replace:$currency.suffix:""|replace:$currency.prefix:""}{if $currency.suffix}{$currency.suffix}{/if}{if $product.pricing.type !=="free" && $product.pricing.type !=="onetime"}<span class="price-cycle">/{if $product.pricing.minprice.cycle eq "monthly"}{$rslang->trans('order.period.short.monthly')}{elseif $product.pricing.minprice.cycle eq "quarterly"}{$rslang->trans('order.period.short.quarterly')}{elseif $product.pricing.minprice.cycle eq "semiannually"}{$rslang->trans('order.period.short.semiannually')}{elseif $product.pricing.minprice.cycle eq "annually"}{$rslang->trans('order.period.short.annually')}{elseif $product.pricing.minprice.cycle eq "biennially"}{$rslang->trans('order.period.short.biennially')}{elseif $product.pricing.minprice.cycle eq "triennially"}{$rslang->trans('order.period.short.triennially')}{/if}</span>{/if}</div> Any idea? 0 Quote Link to comment Share on other sites More sharing options...
isixhosting Posted April 4, 2020 Share Posted April 4, 2020 (edited) Now my 'products.tpl' file looks like this: {if $DiscountCenterAddonIsActive} <div class="price">{$product.pricing.minprice.price}{if $product.pricing.type !=="free" && $product.pricing.type !=="onetime"}<span class="price-cycle">/{if $product.pricing.minprice.cycle eq "monthly"}{$LANG.pricingCycleShort.monthly}{elseif $product.pricing.minprice.cycle eq "quarterly"}{$LANG.pricingCycleShort.quarterly}{elseif $product.pricing.minprice.cycle eq "semiannually"}{$LANG.pricingCycleShort.semiannually}{elseif $product.pricing.minprice.cycle eq "annually"}{$LANG.pricingCycleShort.annually}{elseif $product.pricing.minprice.cycle eq "biennially"}{$LANG.pricingCycleShort.biennially}{elseif $product.pricing.minprice.cycle eq "triennially"}{$LANG.pricingCycleShort.triennially}{/if}</span>{/if}</div> {else}<div class="package-starting-from ">{$LANG.startingat}</div> <div class="price">{if $product.pricing.rawpricing.triennially neq -1}<span>{$currency.prefix}{($product.pricing.rawpricing.triennially/36)|string_format:"%.2f"}{$currency.suffix}</span>/mo {elseif $product.pricing.rawpricing.biennially neq -1}<span>{$currency.prefix}{($product.pricing.rawpricing.biennially/24)|string_format:"%.2f"}{$currency.suffix}</span>/mo {elseif $product.pricing.rawpricing.annually neq -1}<span>{$currency.prefix}{($product.pricing.rawpricing.annually/12)|string_format:"%.2f"}{$currency.suffix}</span>/mo{else}{$product.pricing.minprice.cycleText}{/if}</div> {/if} This your code, I have edited it a little bit, so now the product page shows as the "monthly price" the most cheapest price of the highest subscription period, e.g. if there is trienally, then trienally price/36 and so on. The only issue is, that it shows nothing if a product has a "One Time" price or is "Free". P.S. The issue "how to change the $0,00 to FREE" by free products is an another issue, but for now I will get fixed the common issue above. Thanks Brian Edited April 4, 2020 by indy0077 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.