Jump to content

How to rename Standard_cart orderform?


AndyW

Recommended Posts

WHMCS > Health & Updates ask us to rename orderform Standard_cart and WHMCS documentation says the same if we customize the Standard_cart templates.

But when we do this and select the renamed orderform in WHMCS > General Settings > Ordering , save it and the try to order a product nothing works!

 

On looking at the orderform code (tpl files) we see most of the orderform tpl files ahve hardcode links to Standard_cart files (includes, css, js etc.). So we upload a fresh untouched Standard_cart directory in addition to our renamed Standard_cart directory with our customizations.

 

Now ordering start working BUT the customizations we made are lost as they are not called!!!(customizations reside in renamed_Standard_cart.)

 

What am I missing, how is this supposed to be done?

Edited by AndyW
formatting
Link to comment
Share on other sites

Andy,

 

WHMCS > Health & Updates ask us to rename orderform Standard_cart and WHMCS documentation says the same if we customize the Standard_cart templates.

But when we do this and select the renamed orderform in WHMCS > General Settings > Ordering , save it and the try to order a product nothing works!

personally, i'd leave it as is and just take care when updating, but renaming it is not necessarily bad advice.

 

http://forum.whmcs.com/showthread.php?107939-Copying-order-form-template

 

On looking at the orderform code (tpl files) we see most of the orderform tpl files ahve hardcode links to Standard_cart files (includes, css, js etc.). So we upload a fresh untouched Standard_cart directory in addition to our renamed Standard_cart directory with our customizations.

 

Now ordering start working BUT the customizations we made are lost as they are not called!!!(customizations reside in renamed_Standard_cart.)

 

What am I missing, how is this supposed to be done?

the way I would suggest would be to get a fresh untouched copy of "standard_cart" and upload it to the server.

 

then rename it to something else - for the sake of argument, let's call it "brian_cart" - now replace all references in the template code of "standard_cart" to "brian_cart" (or whatever you want to call it!).

 

i've just quickly done that in a bulk replace and there are 172 references to "standard_cart" in the template - you will have to change them ALL! :idea:

 

the files needed to be modified are...

 

adddomain.tpl
addons.tpl
checkout.tpl
common.tpl
complete.tpl
configuredomains.tpl
configureproduct.tpl
configureproductdomain.tpl
domainrenewals.tpl
error.tpl
fraudcheck.tpl
products.tpl
style.css
viewcart.tpl

i'd then go to setup -> general settings -> ordering and make "brian_cart" the default template.

 

then see if you can go through the order process using this cart - i've tried it here and it seems to work fine. :)

 

for this test, i've temporarily renamed the original "standard_cart" to "standard_cart9", and chosen "brian_cart" as the default and i'm seeing no errors in the logs.

 

if the duplicate "brian_cart" template is working for you, then you can begin applying your modifications again to the templates - i'd suggest editing the "brian_cart" templates directly one-by-one and not reuploading your old files - some of which might contain references to "standard_cart".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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