Spree front-end css and html customisation

83 views
Skip to first unread message

Bartosz Wais

unread,
Aug 9, 2017, 8:52:16 AM8/9/17
to Spree
Hi there,
I am thinking to give Spree a try, thing that I remember from previous attempts is that Spree is using deface gem for html modification, I didn't spend much time on it but I have feeling it is not very enjoyable experience. 
My question is, is there any other way, or how you guys are working with front-end side?

I really liked shoppe gem easiness but projects looks a bit abandoned and far from back-end options Spree has.

Best regards
Bartosz

omair azam

unread,
Aug 9, 2017, 8:57:24 AM8/9/17
to spree...@googlegroups.com
To work with spree views, there are two solutions:
1- overriding view all together, this is done when you have completely different front-end and require to change it completely.
2- Deface- it uses hooks to replace particular sections.

If you want to be comfortable with Spree views you should learn Deface, there are some good blogs available.
To work with Spree like a pro, you must understand Ruby very well, specifically meta-programming.

If you are not familiar with meta-programming of Ruby then you cannot customize Spree on your will but will be dependent on existent extensions and most of those extensions have version clashes and you will have to modify those.

If you don’t know Ruby well and you need a customized store than I don’t recommend Spree to you.

Omair Azam
Software Engineer



Paul Callaghan

unread,
Aug 9, 2017, 8:57:38 AM8/9/17
to spree...@googlegroups.com

Hi


I agree it can take a bit of time to get the effect you want, but generally, the alternative tends to be worse if you need to update Spree several times! 


We use it for quite a few minor page modifications, but for larger stuff we copy the original view and modify that - but only as a last resort. 


Paul




 

 

Paul Callaghan
Web Developer



 

C10 Marquis Court
Team Valley, Gateshead
NE11 0RU
0191 482 0444
www.transcendit.co.uk

 

IT Support & Implementation
Systems & Network Administration
Application Development
Web Design
Cloud Computing & Hosting

 

Please help the environment: if possible do not print this email. Please note: All prices quoted exclude VAT.
The information contained within this email is confidential. It may also be legally privileged. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this email.
Such unauthorised use may be unlawful. If you have received this email in error, please inform us immediately at enqu...@transcendit.co.uk and delete it and all copies from your system.
Transcendit Ltd is a Limited Company registered in England and Wales No.: 4041370. VAT No.: 747 2063 34


From: 'Bartosz Wais' via Spree <spree...@googlegroups.com>
Sent: 09 August 2017 1:39 PM
To: Spree
Subject: [spree-user] Spree front-end css and html customisation
 

Bartosz Wais

unread,
Aug 9, 2017, 11:38:57 AM8/9/17
to Spree
Hi again,
thanks for sharing thoughts, I see Spree as ruby on Rails app, with ORM ActiveSomething.and controllers to create actions(through router), I used to option when I can just edit Views files.
I liked Shoppe but Spree seems to be choice in 2017 for rails app.

Do you have somewhere example with overriding view all together, my guess is, it is somwhere in gem files, didn't bother yet too look, could be nice generate function.

Best regards
Bartosz

dam...@sparksolutions.co

unread,
Aug 9, 2017, 11:42:24 AM8/9/17
to Spree
Hi Bartosz

We're sunsetting deface in future Spree releases. It's way easier and more rails-native way to just copy the views and replace them with your own. 

In future releases, we will split views into smaller partials for easier replacements. 
Reply all
Reply to author
Forward
0 new messages