Feature Requests
Share ideas, discuss and vote on requests from other users in community
 
This object is in archive! 

Change to "templates" directory structure and select template at product group level

CDJ HOSTING shared this idea 6 years ago
Under Consideration

I am sure this would be very much welcomed by the WHMCS community as a whole.

There are a couple of factors to make it work but as a whole package would ultimately simplify the template management

Currently the templates are added intotemplates/templatename and templates/orderforms/templatename.Here are my suggestions

  • Allow us to set the path to the templates directory
  • Move templates and order forms into one single directory.
  • Allow us to set the template to use at product group level

in this way we could simply have something like this: WHMCS/templatedir

With this change i believe it would be a huge improvement to the templates and also the order linking all in one go.

The file naming in the templates directory would be as simple as,

  • slider_name.tpl
  • comparison_name.tpl
  • clientarea_name.tpl

Now, with this we can link to a product, whmcs does its thing and sends out the right template. no need to define it in the url any more.

Comments (4)

photo
1

I missed a section on this and just want to correct it now while im reviewing my post.

The product template should be set at the product group level in the admin area. In this way, The product group using one template would not affect that of another.

I will give you an example:

Using the existing system, if you link into say, the VPS product group using the slider template, they you switch to web hosting which normally uses comparison, or ssl certs which normally use modern then what happens is this.

Slider is set and vps shown. You switch to another product group and the linking has no way of knowing you use another template, So now your using slider throughout your order forms. The only time where this changes is if you go back to product listings probably main page, then click another link that has a template defined.

If the cart template is set at the product group the system wont need those extra carttpl=x variables in the url and here is nothing to stop there being a default template just as there is now all you are doing is changing the way in which the templates are switched from the url, to the groups.

photo
1

CDJ Hosting wrote:

I missed a section on this and just want to correct it now while im reviewing my post.

The product template should be set at the product group level in the admin area. In this way, The product group using one template would not affect that of another.

I will give you an example:

Using the existing system, if you link into say, the VPS product group using the slider template, they you switch to web hosting which normally uses comparison, or ssl certs which normally use modern then what happens is this.

Slider is set and vps shown. You switch to another product group and the linking has no way of knowing you use another template, So now your using slider throughout your order forms. The only time where this changes is if you go back to product listings probably main page, then click another link that has a template defined.

If the cart template is set at the product group the system wont need those extra carttpl=x variables in the url and here is nothing to stop there being a default template just as there is now all you are doing is changing the way in which the templates are switched from the url, to the groups.

Which version of WHMCS are you using? Currently in the 5.2 branch, you can define the order form/template by the product group for individual product groups.

photo
1

Thanks for the response chris, I have not yet dared to venture past the 5.1 branch, im holding off for a little while until i feel more sure its stable. I know it is released as so. So in that case, my later comment might be void.

Im not sure having different "order forms" is the way to go I would have to look at it properly to see how its working, I prefer a unified process across the board personally, but the opportunity so switch between the base templates per group without altering the order flow is definitely something that i welcome and might just be the push i need. I will have to watch the forums for a little while longer and see how things are panning out.

photo
1

One good thing here is this option

  • Allow us to set the path to the templates directory

I couldn't find a way to set new template folder in PHP, something like

$ca->setTemplate('my-new-template-file','my-new-template-folder');