简体   繁体   English

如何添加模态对话框形式以显示在Spree电子商务主页上

[英]How to add Modal dialog form to show on Spree commerce homepage

I need to present customers arriving to the homepage of a Spree commerce with a modal dialog form asking them to enter email address to subscribe. 我需要用模态对话框形式向到达Spree商业网站首页的客户展示,要求他们输入电子邮件地址进行订阅。

I have identified fancybox jquery plugin as possible way to accomplish this but don't know where in the spree code to add this to take effect. 我已将fancybox jquery插件标识为完成此操作的可能方法,但不知道在狂欢代码中的何处添加此功能即可生效。

I see different occurrences of spree files in the bundle/ruby/1.9.1/ and in /apps in the project directory and not sure where to add the javascript. 我在bundle / ruby​​ / 1.9.1 /和项目目录的/ apps中看到了不同的狂欢文件,并且不确定在哪里添加javascript。

I will very much appreciate some pointers to solving this and to clarify my confusion as i am quite new to Rails. 我将非常感谢一些指向解决此问题的指针,并澄清了我的困惑,因为我刚接触Rails。

Thanks. 谢谢。

In versions of Spree prior to 2.2.x you would place the javascript under app/assets/javascripts/store/spree_frontend.js 在2.2.x之前的Spree版本中,您可以将javascript放在app / assets / javascripts / store / spree_frontend.js下

In versions of Spree 2.2.x+ you would place under vendor/assets/javascripts/spree/frontend/ 在Spree 2.2.x +版本中,您将放置在vendor / assets / javascripts / spree / frontend /下

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM