So, who am I ? Posted September 28, 2018 Share Posted September 28, 2018 Hello 😊 I'd like to edit orderforms template .css file, I copied the orderform folder that I want to use. I see form the browser that orderforms styles come from all.min.css file, I tried to edit there but it didn't work, then I found here that I should edit style.css file in orderforms folder but it doesn't work. Any help will be much appreciated 😊 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2018 Share Posted September 28, 2018 4 minutes ago, So, who am I ? said: then I found here that I should edit style.css file in orderforms folder but it doesn't work. it should do - if I edit premium_comparison/css/style.css and change the h3 font size to 64px, I get this... though you could achieve the same result by using /templates/six (or custom)/css/custom.css and slapping an !important to it. #order-premium_comparison h3 { font-size:64px !important; } personally, i'd recommend putting all your css changes in the same place, e.g custom.css, where possible - remembering to keep a backup in case the auto-updater overwrites it. 0 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted September 28, 2018 Author Share Posted September 28, 2018 weird thing is that I wanted to use Universal Slider template, but no matter what I choose, browser still shows Standard Cart .css files, I deleted cache and restarted browser, checked it from another browser but it still shows Standard Cart files. 5 minutes ago, brian! said: personally, i'd recommend putting all your css changes in the same place, e.g custom.css, where possible - remembering to keep a backup in case the auto-updater overwrites it. that's what I was doing, putting all my css in custom.css file, but template styles come from all.min.css and browser shows that file is included after custom.css so it overwrites it. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2018 Share Posted September 28, 2018 3 minutes ago, So, who am I ? said: weird thing is that I wanted to use Universal Slider template, but no matter what I choose, browser still shows Standard Cart .css files, I deleted cache and restarted browser, checked it from another browser but it still shows Standard Cart files. it will depend where you are in the cart ordering process - if at the first stage (products page), then it should be using universal_slider/css/style.css - at all stages after that, it will revert to standard_cart 10 minutes ago, So, who am I ? said: that's what I was doing, putting all my css in custom.css file, but template styles come from all.min.css and browser shows that file is included after custom.css so it overwrites it. it's included *before* it, so custom.css overwrites it - not the other way around. if I add a font size to h2 in custom.css, it works in the browser... #order-universal_slider .group-headlines h2 { font-size: 64px; } 0 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted September 28, 2018 Author Share Posted September 28, 2018 I'm at View Cart page: cart.php?a=view the ones you posted are six template styles and they come first in <head> tag then comes this, orderforms template css <link rel="stylesheet" type="text/css" href="/templates/orderforms/standard_cart/css/all.min.css?v=186983" /> 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2018 Share Posted September 28, 2018 1 minute ago, So, who am I ? said: I'm at View Cart page: cart.php?a=view then as I said previously, it will using standard_cart by the time it gets to viewcart. 9 minutes ago, So, who am I ? said: the ones you posted are six template styles and they come first in <head> tag the ones I posted are from the relevant orderform style.css files - not six/css/all.min.css - check it, they're not mentioned in there! 10 minutes ago, So, who am I ? said: then comes this, orderforms template css <link rel="stylesheet" type="text/css" href="/templates/orderforms/standard_cart/css/all.min.css?v=186983" /> ok then, let's change the font size of a product price shown in the viewcart stage - this *is* defined *only* in templates/orderforms/standard_cart/css/all.min.css ~ line 552 in v7.6.1 #order-standard_cart .view-cart-items .item-price span { font-size: 1.6em; } but if we edit /templates/six/css/custom.css (which is called *before* the orderform css!) and use... #order-standard_cart .view-cart-items .item-price span { font-size: 3.6em !important; } then we get... as long as you're not trying to change something in standard_cart/css/all.min.css that already uses !Important, then you should be able to change it with code in custom.css 0 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted October 1, 2018 Author Share Posted October 1, 2018 ah sorry for confusion, it works now, no idea what happened to it before, but it clearly works now! at domain registration page (cart.php?a=add&domain=register) it uses StandardCart as well, I want to delete some extra html from it, but thought to make copy of StandardCart as StandardCartModified and do all htm editing in it, but how can I make system switch to StandardCartModifeid instead of StandardCart ? for first page I use Universal Slider. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 1, 2018 Share Posted October 1, 2018 13 minutes ago, So, who am I ? said: ah sorry for confusion, it works now, no idea what happened to it before, but it clearly works now! no worries - though I was starting to question my sanity on the topic! 14 minutes ago, So, who am I ? said: at domain registration page (cart.php?a=add&domain=register) it uses StandardCart as well, I want to delete some extra html from it, but thought to make copy of StandardCart as StandardCartModified and do all htm editing in it, but how can I make system switch to StandardCartModifeid instead of StandardCart ? for first page I use Universal Slider. the domain registration page uses the default order form template - which will be standard_cart if you choose any of the slider/comparison orderform templates. once you've duplicated the SC folder, then the duplicate folder icon should appear in setup -> general settings -> ordering -> default order form template so you could make that your default orderform template and the domain reg/trans pages would use it, or if you still want Universal Slider to be the default and use this modified SC, then you'd need to edit the theme.yaml file in the universal_slider folder and change it to... config: parent: standard_cart_modified when you do a WHMCS update, you'll either have to do a file comparison between the two SC folders, or use the link in the changelog that shows the changes made in the release. one other alternative would be to specify your default order form template in settings, e.g SC_modified, and then assign different orderform templates to each product group from the Products/Services page. 0 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted October 2, 2018 Author Share Posted October 2, 2018 (edited) Yes, when I duplicated SC folder, it appeared in General Settings >> Ordering tab. I switched to Premium Comparison and have it as a default orderform template. Edited Premium Comparison's theme.yaml file and now it looks like this: config: parent: standard_cart_modified but browser still shows standard_cart template files at domain registration page (cart.php?a=add&domain=register) Edited October 2, 2018 by So, who am I ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 2, 2018 Share Posted October 2, 2018 2 hours ago, So, who am I ? said: browser still shows standard_cart template files at domain registration page (cart.php?a=add&domain=register) it will do - the reason is that nearly all of the templates in SC have references to files in SC and you'll have to edit these files in your standard_cart_modified folder and change the references of 'standard_cart' to 'standard_cart_modified' - domainregister.tpl (and transfer) have 4 each, common.tpl has 2.. e.g common.tpl would change from... <link rel="stylesheet" type="text/css" href="{$WEB_ROOT}/templates/orderforms/standard_cart/css/all.min.css?v={$versionHash}" /> <script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/standard_cart/js/scripts.min.js?v={$versionHash}"></script> to... <link rel="stylesheet" type="text/css" href="{$WEB_ROOT}/templates/orderforms/standard_cart_modified/css/all.min.css?v={$versionHash}" /> <script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/standard_cart_modified/js/scripts.min.js?v={$versionHash}"></script> though I suppose it's arguable whether to leave common.tpl alone as after updating, at least you know WHMCS will be using the latest orderform css/js files for your installed WHMCS release... swings and roundabouts - I guess it depends on the extent of your planned template modifications and how easy you want the update process to be. 0 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted October 2, 2018 Author Share Posted October 2, 2018 13 minutes ago, brian! said: it will do - the reason is that nearly all of the templates in SC have references to files in SC and you'll have to edit these and change them to 'standard_cart_modified' - domainregister.tpl (and transfer) have 4 each, common.tpl has 2.. Okey, hold on.. I have to edit Standard Cart template files and change all standard_cart to standard_cart_modified wherever there is an include command and then what's the use of editing theme.yaml file ? Does system ignores theme.yaml file ? It seems like even after editing theme.yaml file, system still visits standard_cart templates and then follows include commands in them. What's the job theme.yaml file does here ? I guess I'm missing something... 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 2, 2018 Share Posted October 2, 2018 27 minutes ago, So, who am I ? said: Okey, hold on.. grips desk tightly. 27 minutes ago, So, who am I ? said: I have to edit Standard Cart template files and change all standard_cart to standard_cart_modified wherever there is an include command and then what's the use of editing theme.yaml file ? because editing theme.yaml tells universal slider to use standard_cart_modified and not standard_cart. 27 minutes ago, So, who am I ? said: Does system ignores theme.yaml file ? no - it obeys it. 27 minutes ago, So, who am I ? said: It seems like even after editing theme.yaml file, system still visits standard_cart templates and then follows include commands in them. it will do if you haven't modified the templates in standard_cart_modified, because as I said previously, they're nearly all hardcoded with links to standard_cart - they've been that way since v6... perhaps there is a reason why this is the case and they don't just use {$carttpl} instead, but i've never asked or delved too deeply into the minds of their developers. 😱 27 minutes ago, So, who am I ? said: What's the job theme.yaml file does here ? it tells Universal Slider which orderform template to use for any templates that are missing - basically everything apart from products.tpl... ok, let me give you an example - default orderform template is universal slider; i've modified theme.yaml to use SCM and then I edit the domainregister.tpl file in SCM - i've changed references of SC to SCM and then tweaked the following line to tell me which cart template it's using... <p>{$LANG.orderForm.findNewDomain} (Carttpl = {$carttpl})</p> so I *know* that it's using SCM and not SC. if I look at the browser source code of the page, I see the following... <link rel="stylesheet" type="text/css" href="/templates/orderforms/standard_cart/css/all.min.css?v=aecf76" /> <script type="text/javascript" src="/templates/orderforms/standard_cart/js/scripts.min.js?v=aecf76"></script> <div id="order-standard_cart_modified"> which shows that it's using SC's js/css files (because I haven't modified common.tpl), but the div confirms that it's using the standard_cart_modified template and not standard_cart. 1 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted October 2, 2018 Author Share Posted October 2, 2018 48 minutes ago, brian! said: ok, let me give you an example - default orderform template is universal slider; i've modified theme.yaml to use SCM and then I edit the domainregister.tpl file in SCM - i've changed references of SC to SCM and then tweaked the following line to tell me which cart template it's using... ah now I got it, before I thought I had to edit SC template files and change references of SC to SCM and it got me confused 🙄 1 hour ago, brian! said: though I suppose it's arguable whether to leave common.tpl alone as after updating, at least you know WHMCS will be using the latest orderform css/js files for your installed WHMCS release... swings and roundabouts - I guess it depends on the extent of your planned template modifications and how easy you want the update process to be. so it means, I can leave common.tpl alone and it will work without problems at least before update. since I want update process to be easy, I guess I'll edit common.tpl too 😀 Thanks a lot for your help, as usual! 🙏😊 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 2, 2018 Share Posted October 2, 2018 8 minutes ago, So, who am I ? said: ah now I got it, before I thought I had to edit SC template files and change references of SC to SCM and it got me confused 🙄 sorry - I probably worded it badly... i've edited the post to make it clearer for others. 11 minutes ago, So, who am I ? said: so it means, I can leave common.tpl alone and it will work without problems at least before update. since I want update process to be easy, I guess I'll edit common.tpl too to make the update process easier, i'd be tempted to leave common.tpl alone... that way, even after updating WHMCS, your modified SC template should still be using the latest js/css for the cart and so should cause less errors in the cart... but as I said previously, it depends upon the extent of your changes and I don't think there's any "right" answer for this, just what you feel is best for your situation. 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.