Using SuiteCommerce Standard and Manor theme, I'd ...
# suitecommerce
e
Using SuiteCommerce Standard and Manor theme, I'd like to tweak the layout of the header, like move the search bar above the categories. What is the best way to accomplish this?
m
You should edit the Manor Theme templates
e
Thanks Martin. Not sure how to do this. Do you mean manipulate layouts using SMT or editing template files directly in the file cabinet? If the latter, I've tried looking for files with .tpl but there is nothing there. All I see are files like shopping-templates.js or .css which are minified and probably shouldn't be touched. (Would they get overwritten after an upgrade?)
m
Yes, the tpl files on file cabinet, the shopping-templates.js is generated by the extension manager
check "Working with SuiteCommerce Themes"
e
Just realised the .tpl files are not in the "web site hosting files" folder but under SuiteScripts/extensions.
s
Just to be clear, you should not edit the files in the file cabinet. They have already been compiled. What Martin is getting at is that you should use the theme developer tools, either to create a custom Manor theme or to modify an existing custom theme based off of Manor.
If all you want to do is move the search bar, then you could also just write an extension to do that as it is one of the few 'global' views.
e
Thanks for the feedback. Looks like I have a learning journey ahead of me. 🙏
Got my node and gulp environment setup. There are two versions of the extension development tools in bundle 521562: v18.2.1 and v24.2.50. Which do I use?
s
24.2.50
e
Thanks, Steve. Did a "gulp extension:deploy" that looked like it was successful judging by the output in the command window. However, the extension is not visible in the extensions sublist under the "activate themes and extensions page". I checked the CUSTOMRECORD_NS_SC_EXTMECH_EXTENSION table and an extension record was created, but I have no idea what else might be missing.
s
The most common reason for why an extension won't show in the list is because it is not version compatible with the site. What have you set in the manifest for applications and versions, and what is your site using?
e
Manifest below. From bundle audit, I have: • suitecommerce 2024.1.30 • suitecommerce extension management 2024.2.40 Both are managed so cannot update manually. When creating the extension, can I target an earlier version to match those above?
Copy code
"name": "MyHeaderCustomisation",
    "fantasyName": "My Header Customisation",
    "vendor": "Acme",
    "type": "extension",
    "target": "SCS",
    "target_version": {
        "SCS": ">=24.2.50"
    },
    "version": "1.0.0",
    "description": "Logo and navigation customisations",
s
Copy code
"target_version": {
        "SCS": ">=24.2.50"
    }
So this is your problem. You are targeting an incorrect version. Target version is of the product itself - SCS means "SuiteCommerce (Standard)" and the version after is the version of SCS that you are targeting, which is 24.2.50. Which doesn't exist. Therefore, it won't show. You can be much more liberal with your version targeting when writing something for SC because sites are constantly updated. In fact, you really only need to set a specific value if you are aware of a specific limitation that in your extension that is not backwards compatible (eg an extensibility method that was introduced in a specific version). For you, I would just set this ">=18.2.0" and try again.
e
Thanks for the explanation.