Jump to content
Sign in to follow this  
dianepep

Where can i find variable field names

Recommended Posts

Hi, I am trying to find the variable field names to the elements chosen within the admin control panel, such as my products, categories, etc. that I have created in admin panel. Can anyone tell me in which file and folder I can find all variable field names? I wish to make some major modifications to the foundation and am trying to understand where the variables from the admin panel get passed into the program. I originally started using foundation_mauris but am running into problems with it not updating so I now wish to use the regular foundation and modify it to look how I wish. Thanks

Share this post


Link to post
Share on other sites

The skins are coded against the Smarty templating engine (https://www.smarty.net/docs/en/).

To see what Smarty variables are currently holding, edit the main.php template by adding {debug} at the very end.

When you make a page request, your browser will warn you that there is some javascript that is wanting to open a popup window. Let it. (You may need to re-request the page to get a proper listing.)

(Note: You will find that the $LANG variable is very long, and scrolling down past it takes many mouse scrolls. I have made an edit that suppresses the $LANG variable making examining the list easier.)

Share this post


Link to post
Share on other sites
On 11/5/2019 at 12:46 AM, bsmither said:

The skins are coded against the Smarty templating engine (https://www.smarty.net/docs/en/).

To see what Smarty variables are currently holding, edit the main.php template by adding {debug} at the very end.

When you make a page request, your browser will warn you that there is some javascript that is wanting to open a popup window. Let it. (You may need to re-request the page to get a proper listing.)

(Note: You will find that the $LANG variable is very long, and scrolling down past it takes many mouse scrolls. I have made an edit that suppresses the $LANG variable making examining the list easier.)

Thanks. That's very useful information for debugging, however, I am trying to find where everything is defined. All classes. I did find the classes folder but there are a lot of elements not defined in that. For instance, I am trying to change how the search box looks. I do not want the box and instead just want a line, and am trying to find where I change that. The main.php uses "button postfix nomarg nopad" as a class but i cannot find where that is defined as a starting point to determine how to change the look of the search bar. Of course I could be way off base on how to go about changing it. 

Share this post


Link to post
Share on other sites

If you are looking at the Foundation skin, then the "stock" styling is given in the Foundation /css/foundation.css file. It's an elaborate file.

So, we recommend that you create overriding CSS rules and place them in the cubecart.default.css file. This gets loaded after foundation.css, so it almost always overrules the stock styling.

Browsers have some sort of Developer's Toolkit where one can inspect a page element, where the developer panel shows what CSS rules are in play and gives the file and line number where that rule can be found.

Share this post


Link to post
Share on other sites
21 hours ago, bsmither said:

If you are looking at the Foundation skin, then the "stock" styling is given in the Foundation /css/foundation.css file. It's an elaborate file.

So, we recommend that you create overriding CSS rules and place them in the cubecart.default.css file. This gets loaded after foundation.css, so it almost always overrules the stock styling.

Browsers have some sort of Developer's Toolkit where one can inspect a page element, where the developer panel shows what CSS rules are in play and gives the file and line number where that rule can be found.

Thank you so much for your reply. I did look at foundation.css and cubecart.default.css. I think I started making changes in foundation.css but I will back them out and modify cubecart.default.css per your suggestion. Thank you! Whenever I try to inspect an element it just says 'user agent stylesheet'. When I googled the meaning of that it said basically that means there is no specific style placed on that element so it uses a default style. Is that correct?

Thanks again for you help. It is much appreciated!

Share this post


Link to post
Share on other sites

The term "user agent" is referring to the actual browser. The programmer's of browsers are free to make the page elements display however they want.

That's why you effectively see some differences in how text entry fields, check boxes, and radio buttons look between a Macintosh and a Windows browser, and then also between the Chrome and the Firefox browsers. The Standards specifications give essential details how page elements must act - do's and do not's - but not so much what they must look like.

So, in the absence of a supplied CSS set of rules, the browser incorporates an internal stylesheet that describes what things will look like by default.

You said, "Whenever I try to inspect an element it just says 'user agent stylesheet'." Well, that's odd. Foundation is all about some bits of javascript, and a whole lot of CSS rules. So, I would ask that you make sure the foundation.css file is actually getting loaded. Every element being inspected should have some CSS rule(s) effecting it's display from foundation.css.

Share this post


Link to post
Share on other sites
1 hour ago, bsmither said:

The term "user agent" is referring to the actual browser. The programmer's of browsers are free to make the page elements display however they want.

That's why you effectively see some differences in how text entry fields, check boxes, and radio buttons look between a Macintosh and a Windows browser, and then also between the Chrome and the Firefox browsers. The Standards specifications give essential details how page elements must act - do's and do not's - but not so much what they must look like.

So, in the absence of a supplied CSS set of rules, the browser incorporates an internal stylesheet that describes what things will look like by default.

You said, "Whenever I try to inspect an element it just says 'user agent stylesheet'." Well, that's odd. Foundation is all about some bits of javascript, and a whole lot of CSS rules. So, I would ask that you make sure the foundation.css file is actually getting loaded. Every element being inspected should have some CSS rule(s) effecting it's display from foundation.css.

Thanks again for your help. I will use the debug method you offered in another post to check to see if foundation.css file is getting loaded. I made changes in the file and none of the changes had taken place. I backed the changes out and placed them in cubecart.default.css and none of the changes were made again so maybe I am having an issue with the css files not being loaded. 

Your help is very much appreciated!

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...