Jump to content

Looking to hire someone for those 2 changes


soamz

Recommended Posts

Hello, we have just started up and we need 2 small changes in our WHMCS product listing page.

 

1. I need the billing cycle drop down shown in my products listing page, https://tinyurl.com/kakcdkw

right now, it shows the monthly price, which I need to remove and place the billing cycle dropdown right there.

 

 

2. I need a currency tab like this, http://prntscr.com/fbikf5

 

on my products listing page.

 

Kindly give me your quote to do the needful.

I need it done today only.

Payment by PayPal or indian bank transfer.

Link to comment
Share on other sites

if you don't want to show pricing, then you could try removing the entire <div> block

 

                                    <div class="price" id="product{$product@iteration}-price">
                                       {if $product.bid}
                                           {$LANG.bundledeal}
                                           {if $product.displayprice}
                                               <br /><br /><span>{$product.displayPriceSimple}</span>
                                           {/if}
                                       {elseif $product.paytype eq "free"}
                                           {$LANG.orderfree}
                                       {elseif $product.paytype eq "onetime"}
                                           {$product.pricing.onetime} {$LANG.orderpaymenttermonetime}
                                       {else}
                                           {if $product.pricing.hasconfigoptions}
                                               {$LANG.from}
                                           {/if}
                                           {$product.pricing.minprice.cycleText}
                                           <br>
                                           {if $product.pricing.minprice.setupFee}
                                               <small>{$product.pricing.minprice.setupFee->toPrefixed()} {$LANG.ordersetupfee}</small>
                                           {/if}
                                       {/if}
                                   </div>

and replace it with code similar to the above thread...

 

                                    <select name="billingcycle" onchange="window.location=this.value">
                                       {foreach $product.pricing.cycles as $cycle => $cycleprice}
                                           {assign billcycle value="orderpaymentterm"|cat:$cycle}
                                           <option value="{$smarty.server.PHP_SELF}?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}&billingcycle={$cycle}">{$LANG.$billcycle}</option>
                                       {/foreach}
                                   </select>

 

gT5Mj5Y.png

Link to comment
Share on other sites

No, I need to show prices too sane like you see http://prntscr.com/fblqn4

So, that customer can clearly see what price he will get if he goes for annual or whatever

so when you said...

 

right now, it shows the monthly price, which I need to remove and place the billing cycle dropdown right there.

try the following...

                                    <select name="billingcycle" onchange="window.location=this.value">
                                       {foreach $product.pricing.cycles as $cycle => $cycleprice}
                                           <option id="inputBillingcycle" value="{$smarty.server.PHP_SELF}?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}&billingcycle={$cycle}">{$cycleprice}</option>
                                       {/foreach}
                                   </select>

Link to comment
Share on other sites

Now, I need to format this text a bit.

 

Right now it shows,

 

1 Month Price - ₹350.00 INR

12 Month Price - ₹300.00 INR

24 Month Price - ₹250.00 INR

36 Month Price - ₹200.00 INR

 

 

I want it to show like,

 

1 Month at ₹350.00/mo

1 Year at ₹300/mo

2 Years at ₹250/mo

3 Years at ₹200/mo

 

 

 

Also, I need that, when someone goes to the products pages, this drop down should be auto selected to the last option - 3 Years at ₹200/mo

 

 

Can we achieve this two ?

Link to comment
Share on other sites

Now, I need to format this text a bit.

Right now it shows,

1 Month Price - ₹350.00 INR

12 Month Price - ₹300.00 INR

24 Month Price - ₹250.00 INR

36 Month Price - ₹200.00 INR

I want it to show like,

1 Month at ₹350.00/mo

1 Year at ₹300/mo

2 Years at ₹250/mo

3 Years at ₹200/mo

for the first half of this, you'll need to use Language Overrides and replace the appropriate strings...

$_LANG['orderpaymentterm12month'] = "12 Month Price";
$_LANG['orderpaymentterm1month'] = "1 Month Price";
$_LANG['orderpaymentterm24month'] = "24 Month Price";
$_LANG['orderpaymentterm3month'] = "3 Month Price";
$_LANG['orderpaymentterm6month'] = "6 Month Price";
$_LANG['orderpaymentterm36month'] = "36 Month Price";

with...

$_LANG['orderpaymentterm12month'] = "1 Year Price";
$_LANG['orderpaymentterm1month'] = "1 Month Price";
$_LANG['orderpaymentterm24month'] = "2 Years Price";
$_LANG['orderpaymentterm3month'] = "3 Months Price";
$_LANG['orderpaymentterm6month'] = "6 Months Price";
$_LANG['orderpaymentterm36month'] = "3 Years Price";

Also, I need that, when someone goes to the products pages, this drop down should be auto selected to the last option - 3 Years at ₹200/mo

try using...

<option id="inputBillingcycle" value="{$smarty.server.PHP_SELF}?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}&billingcycle={$cycle}" {if $cycle eq 'triennially'} selected{/if}>{$cycleprice|replace:' - ':' @ '|replace:$currency.suffix:''}/mo</option>

 

hKKzxmj.png

 

or if you wanted the prices shown in the reverse order (e.g starting with 3 years and descending in cycle length), you could do this instead...

 

                                    <select name="billingcycle" onchange="window.location=this.value">
                                       {foreach $product.pricing.cycles|@array_reverse as $cycle => $cycleprice}
                                           <option id="inputBillingcycle" value="{$smarty.server.PHP_SELF}?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}&billingcycle={$cycle}">{$cycleprice|replace:' - ':' @ '|replace:$currency.suffix:''}/mo</option>
                                       {/foreach}
                                   </select> 

 

Grm5Biy.png

Link to comment
Share on other sites

Superb man!

You are a star.

 

Now it shows 200.00/month

can I make it show 200 only ?

 

and hide the decimels ?

 

- - - Updated - - -

 

Also, I can see that, lets say,

he page now loads to default selected at 3 years.

 

But when I click on order now, it goes to cart page, where the 1 month is selected.

 

How do we make it auto fetch from the products listing page decision click ?

Link to comment
Share on other sites

Superb man!

You are a star.

Now it shows 200.00/month

can I make it show 200 only ?

and hide the decimels ?

Also, I can see that, lets say,

he page now loads to default selected at 3 years.

But when I click on order now, it goes to cart page, where the 1 month is selected.

How do we make it auto fetch from the products listing page decision click ?

going back to my post I mentioned previously, I see that i've missed out an important step - the link in that thread is triggered (using js) by the choice from the dropdown, whereas pressing the Order Now button just passes the default URL with no cycle...

 

therefore, the correct code is going to be...

 

                                    <select name="billingcycle" onchange="window.location=this.value">
                                       <option>{$LANG.cartchoosecycle}</option>
                                       {foreach $product.pricing.cycles|@array_reverse as $cycle => $cycleprice}
                                           <option id="inputBillingcycle" value="{$smarty.server.PHP_SELF}?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}&billingcycle={$cycle}">{$cycleprice|replace:' - ':' @ '|replace:$currency.suffix:''|substr:0:-3}/mo</option>
                                       {/foreach}
                                   </select> 

 

yRYQcMU.png

 

when the user makes a choice from the dropdown, the cart will immediate forward to the next step in the ordering process and the chosen billing cycle will be correctly passed on... therefore, you can remove the Order Now button from the page and just use the dropdown.

 

with this method, you'll need to have an option before the 3 Year price, otherwise the js choice won't be triggered if any value is default selected - the first option visible value can be anything - blank, "Choose Billing Cycle" or whatever. :idea:

Link to comment
Share on other sites

Hello Soumendra,

 

Thanks for your reply.

 

That is because your custom theme buttons are only loading https://portal.jetcloud.in/cart.php?a=add&pid=1 they need to also have billingcycle=annually linked to them. You can learn more about this at http://docs.whmcs.com/Linking_to_WHMCS#Order_Links

 

As what you are trying to do is a customisation of the cart, its not something we're able to provide support for however I recommend reviewing developers.whmcs.com for further documentation.

 

Please do let me know if you have any further questions.

 

Best regards,

 

--

Christopher Downs

Technical Analyst I

WHMCS, Ltd.

http://whmcs.com

Link to comment
Share on other sites

That is because your custom theme buttons are only loading https://portal.jetcloud.in/cart.php?a=add&pid=1 they need to also have billingcycle=annually linked to them. You can learn more about this at http://docs.whmcs.com/Linking_to_WHMCS#Order_Links

which is basically what I told you 3 days ago in the previous reply! :)

 

As what you are trying to do is a customisation of the cart, its not something we're able to provide support for however I recommend reviewing developers.whmcs.com for further documentation.

don't waste your time contacting support about customisation - they'll just send you to the docs or pass you back here. :roll:

 

when you want customisation, either come to the forums where i'm sure someone will be able to help... or go direct to a developer.

 

btw - the above solution I gave you does work... even the previous one worked for non 3-year cycles... so feel free to use it. :idea:

Link to comment
Share on other sites

which is basically what I told you 3 days ago in the previous reply! :)

 

 

don't waste your time contacting support about customisation - they'll just send you to the docs or pass you back here. :roll:

 

when you want customisation, either come to the forums where i'm sure someone will be able to help... or go direct to a developer.

 

btw - the above solution I gave you does work... even the previous one worked for non 3-year cycles... so feel free to use it. :idea:

 

actually, i want to change the ORDER URL to 3 year by default, then job done for me.

Link to comment
Share on other sites

actually, i want to change the ORDER URL to 3 year by default, then job done for me.

then hardcode the button to pass a 3 year billingcycle in the URL... :)

 

if you forget about using the "Choose Billing Cycle" line from the above code, then if they choose any cycle apart from 3 years, the JS will automatically forward them to the cart process next step; if 3 year is the fist option in the dropdown and the Order Now button is hardcoded to 3 years, it will pass 3 years to the next step.

 

<a href="{$smarty.server.PHP_SELF}?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}&billingcycle=triennially" class="order-button" id="product{$product@iteration}-order-button">{$LANG.ordernowbutton}</a>

job done! :idea:

Link to comment
Share on other sites

  • 2 months later...

Ouch, dont know how WHMCS auto updated and all of my changes are lost.

 

Styling css and the changes both both.

How to avoid happening this ?

 

 

 

I have backup from last month, which files I need to replace now ?

Link to comment
Share on other sites

you might need to rename your pure_comparison orderform and/or main theme - that would prevent the autoupdater from overwriting existing files.

 

the language overrides should still be there, so you should just need to work backwards in the thread to return your output to how it was.

 

if you have a backup, then you should only need the pure_comparison/products.tpl and wherever you made your custom css changes (custom.css I assume)... there may be others, as i'm not sure how far your modifications went.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated