Jump to content

Child Order Form Template not overriding parent.


Recommended Posts

Hello,

I hope this is the correct community to post this in.

SCENARIO

The below is all explained in this documented article by WHMCS: Order_Form_Templates

I have created a child order form of of the "modern" order form theme.

I have created the theme.yaml file with the following contents as instructed:

config:
    parent: modern

I have created an empty style.css file inside my new child order form template.

I then logged on to my WHMCS backend and navigated to Setup -> General Settings -> Ordering

I selected the new child theme as the Default Order Form Template.

PROBLEM

Adding ANY css to override the parent styling is not taking effect.  It keeps pulling the styles from the original parent style.css completely ignoring my custom css.

If I use the browsers developer tools, I can't even see my style.css loading at all.

If anyone can explain this I would appreciate it.

Thanks
Brett

Link to comment
Share on other sites

Hi Brett,

3 hours ago, bluesteam said:

I have created a child order form of of the "modern" order form theme.

i'm unsure if you can do that with Modern (though i've never tried)... :?:

with it being an old deprecated template, i'd be tempted to use the older method of just copying the folder and modifying.... it should certainly work with standard_cart as the parent though.

Link to comment
Share on other sites

Thanks Brian.  I managed to get it working.  It was the way I was using the parent/child relationship.  The way the parent/child relationship has been implemented seems quite clunky but nevertheless I got it sorted.

It was in the TIP where I figured where I was going wrong:

Quote

TIP: 
The "Standard Cart" order form template is selected under Setup > General Settings > Ordering tab.
Then the "Premium Comparison" order form is selected for the product groups for which we wish to use its product selection page Setup > Products/Services > Products/Services > Edit Group.

QUESTION:

With it being an old deprecated template, which templates are NEW and more "up to date"??  I would hate to do all this work and then the template is removed in future versions or missing features as the versions of WHMCS bring out newer options.

Edited by bluesteam
Link to comment
Share on other sites

3 minutes ago, bluesteam said:

With it being an old deprecated template, which templates are NEW and more "up to date"??  I would hate to do all this work and then the template it removed in future versions or missing features as the versions of WHMCS bring out newer options.

"new" is relative with WHMCS, think of them as least "old"! :P

standard_cart is the one that is updated the most frequently, and is really now the "default" orderform... the other five current templates  (Premium Comparison, Pure Comparison, Supreme Comparison, Universal Slider and Cloud Slider) are children to it...

if you've upgraded from older versions, you've probably still got the older orderform templates in there too (slider, comparison, vertical steps etc) - they're all deprecated and no longer shipped... Boxes & Modern are deprecated, but still shipped and get the occasional minor update, but nothing like SC.

I wouldn't expect to see any new orderform templates before v8 (which looks like being next year now), and I doubt Boxes & Modern will still be included with it (but I have no way to know that for sure, so it's just an opinion).

if you want to choose a default template that will work with the new features, then standard_cart (or one of it's child themes) would be the best choice...

Link to comment
Share on other sites

  • 2 years later...

Well, this is funny. 3 years later I'm having issues with a custom order form template not overwriting the parent standard form. It's pulling code from some files, because I did some changes, but the sidebar-categories-collapsed.tpl is giving me hard times.

Any ideas why this is happening? I confirmed in General Settings > Default Order Form, my custom form Template has been selected. And also all product groups are using this same form template. Folder structure for my custom form is good, based on docs.

Weird thing is, if I go to standard_cart folder and edit sidebar-categories-collapsed.tpl it works.

Please let me know, thank you.

Link to comment
Share on other sites

8 hours ago, brian! said:

are you saying there is a SCC .tpl file in your custom orderform template folder and it's not being called ?

not sure what SCC.tpl file is ... but yes, only one. Actually I have to edit the file within the parent template form in order to make it work ... but just one.

Link to comment
Share on other sites

7 hours ago, edherroj said:

not sure what SCC.tpl file is

I was being lazy - sidebar-categories-collapsed.tpl 🙂

7 hours ago, edherroj said:

but yes, only one. Actually I have to edit the file within the parent template form in order to make it work ... but just one.

to be honest, I think this would be expected behaviour for a child of standard_cart.

the problem that you'll likely be running into is that most of the SC templates are hardcoded to call the standard cart SCC file specifically, e.g from products.tpl

{include file="orderforms/standard_cart/sidebar-categories-collapsed.tpl"}

the simplest solution would probably be to duplicate the other templates that use this include from standard_cart into your custom orderform and change the references of standard_cart in those include URLs to...

{include file="orderforms/{$carttpl}/sidebar-categories-collapsed.tpl"}

or specifically using the name of the custom orderform in the URL instead.

yeah I know that makes updating more of a pain, but this is a known bug (well I suppose more of a design flaw/limitation) and so has to be worked around.

Link to comment
Share on other sites

5 hours ago, brian! said:

I was being lazy - sidebar-categories-collapsed.tpl 🙂

to be honest, I think this would be expected behaviour for a child of standard_cart.

the problem that you'll likely be running into is that most of the SC templates are hardcoded to call the standard cart SCC file specifically, e.g from products.tpl


{include file="orderforms/standard_cart/sidebar-categories-collapsed.tpl"}

the simplest solution would probably be to duplicate the other templates that use this include from standard_cart into your custom orderform and change the references of standard_cart in those include URLs to...


{include file="orderforms/{$carttpl}/sidebar-categories-collapsed.tpl"}

or specifically using the name of the custom orderform in the URL instead.

yeah I know that makes updating more of a pain, but this is a known bug (well I suppose more of a design flaw/limitation) and so has to be worked around.

yep, that was actually the problem. Thank you!

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.

×
×
  • 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