How to edit footer generated by spay fancy extension while installing spree 2.0.3 - spree

I installed spree 2.0.3 and then I installed spree_fancy extension....
I want to edit the footer which was generated by spree_fancy extension
Spree generated following folder:
spree_api spree_backend spree_cmd
spree_core spree_dash spree_frontend spree_sample
Can anyone know where the views are located which was generated by spree_fancy extension.

You can find the footer located here:
https://github.com/spree/spree_fancy/blob/1f12308a3562be2cde6c21467942ba07b7c3c536/app/views/spree/shared/_footer.html.erb
You can override the footer by placing a file in your application in the matching path:
app/views/spree/shared/_footer.html.erb
After creating that file and restarting your webserver, content will be read from that file instead of spree_fancy.
Another option is to use the Deface plugin:
https://github.com/spree/deface
You can use this to override portions of the content within the footer, and is more appropriate when making small changes.
You can learn more about both of these techniques by reading the spree customization guide:
http://guides.spreecommerce.com/developer/view.html

Related

Opencart extension not creating files

I have a custom Opencart shipping extension. It has upload/ and install.xml. When I upload extension.ocmod.zip through extension installer, it completes installation. But the extension is not visible under Extensions > Shipping.
I checked the code and none of the files from the extension is present under upload/admin/controller/extension/shipping.
I have refreshed modifications and cache from the dashboard.
Make sure that your file extension.ocmod.zip contains:
the upload folder and install.xml file directly
and there is not another subdirectory contains them
Without knowing the OC version you're using, my guess is that your path structure should be:
install.xml
upload/admin/view/extension/shipping/*
upload/admin/model/extension/shipping/*
upload/admin/controller/extension/shipping/*
upload/admin/language/en-gb/extension/shipping/*
upload/catalog/view/theme/default/extension/shipping/*
upload/catalog/model/extension/shipping/*
upload/catalog/controller/extension/shipping/*
upload/catalog/language/en-gb/extension/shipping/*

Styling Ionic2 templates with local scss

Based on this tutorial I started an ionic2 project from a tutorial template http://ionicframework.com/docs/v2/getting-started/tutorial/adding-pages/.
After successfully adding a new mypage.html and mypage.ts page under /app/pages/mypage I also wanted to align my objects to center on my page, so I created a mypage.scss file with the content:
.centered {
text-align: center;
}
Also note that I added the class centered on the mypage.html <ion-content> tag.
What I found that when I serve my page the gulp won't compile and add my own styles to /www/build/css files. Am I missing something or is it buggy?
You need to include it in your app.core.css file like this:
#import "../pages/mypage/mypage";
The first mypage is the name of the folder, and the second one is the name of the file (the extension is not needed)
Okay so I found that you have to also import your file to /app/theme/app.core.scss. Which I don't really think is a good solution from ionic team (even worse I did not see this mentioned anywhere).
I think you could edit the gulpfile to source all the scss files under app directory so you don't have to import every single file to app.core.scss

Ionic2 - How to import css files for a page component

I have to import some stylesheets residing inside node_modules (bootstrap.css from node_modules, etc).
I tried by
adding styleUrls inside #Page,
putting the styles in the .scss file inside the page component folder,
and finally putting the styles inside the template file itself by creating new style tag... all with no luck, i.e the required styles are not getting applied on tags with appropriate classes.
How to do this ?
PN: I had imported the page scss for my components in app.core.scs.
Anyways, I think putting bootstrap.min.css inside page scss is not a
good way
Adding the above import doesn't seem to work in the latest version of Ionic2 (ionic -version = 2.1.4) that I installed on 10/25/16. There is no longer an app.core.scss file in newly created projects. But rather just variables.scss in src/app/theme.
There is a file app.scss in src/app that says it's for global SASS and importing other files, but adding an import for another page does not seem to make a difference.
I have a page /src/app/pages/about, in which I have about.ts that has styleUrls: ['about.scss']. The file about.scss is in the same directory. Putting #import "../pages/about/about"; at the bottom of that file makes no difference.
UPDATE:
I have finally got it to work with this in about.ts:
styleUrls: ['/pages/about/about.scss']
I'm not sure if this is the best way yet, but it works for now.
#import "../pages/yourpage/yourpage"
Add this line in app/themes/app.core.scss and rebuild. Of course change yourpage expression.

Zurb foundation 6 , what-input.min.js file functionality

Id like to know the relevance of what-input.min.js include in Zurbs foundation-6 framework , in the js/vendor directory , this is because i keep getting an 404 not found error not loading while running the site , ... js/vendor/jquery.min.map file , is there any connection ?
You don't need the .map file which is used to map a minified file back to the original. It is available for download from jquery's site. Source maps are can be ignored in inspector settings which makes sense when you don't plan on debugging minified javascript files
It is unrelated to the source map file 404 but what-input.min.js is a JS library "to watch for mouse, keyboard and touch events"
They have a github page with more documentation: https://github.com/ten1seven/what-input
and a demo:
https://ten1seven.github.io/what-input/
"Tab, click or tap the links and form controls to see how What Input allows them to be styled differently"
I had this exact same problem on every site when using JointsWP with Foundation 6 framework. I finally just figured it out. I turned off css source mapping and still received the error. It turns out that it wasn't lying to me and the js file really does not exist where it is trying to load it from:
/vendor/what-input/what-input.min.js
But it is under the dist folder within that same directory. So if you find your enqueue-scripts.php file where the what-input.min.js is loaded, you can fix the directory path to:
/vendor/what-input/dist/what-input.min.js
And no more 404!

How to package an OpenStack Horizon Dashboard plugin correctly?

I am packaging a Horizon Plugin. I have a bunch of templates, a view, as well as css, js files, and images.
Everything should be contained so that the package is either a .deb or a tarball. So right now I keep all files in /opt/stack/horizon/openstack_dashboard/dashboards/<my-dashboard-name>.
My question is, how do I include js and css files properly? There is /opt/stack/horizon/openstack_dashboard/settings.py file that specifies HORIZON_CONFIG.js_files, however it is always empty! I put a list of files there, it still comes out as empty in the templates. So the question is, how do I include js and css files in a Horizon dashboard plugin, for the purpose of packaging it in either a single tarball or a .deb package?
You should store static files below <my-dashboard-name>/static. It's best to namespace your static files, I use the following directory structure:
<my-dashboard-name>/static/<my-dashboard-name>/js and so on for css and img then I reference the files in the HTML templates with /static/<my-dashboard-name>/js/jsfile.js, that way you won't get any name collisions.
When someone uses your plugin they extract your dashboard and register it in the right places and then additionally they have to run the collectstatic django management command from the base openstack_dashboard directory (in your case /opt/stack/horizon/), either:
$ ./run_tests.sh -m collectstatic
or
$ ./manage.py collectstatic
That should copy your static files to the right places according to how the site has been configured.