Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Antiarchitect/spree-facebox

Folders and files

NameName
Last commit message
Last commit date
Jan 31, 2011
Jan 31, 2011
Jun 15, 2010
Jan 31, 2011
Jan 31, 2011
Jan 31, 2011
Jun 29, 2010
Jan 31, 2011
Jan 31, 2011
Jan 31, 2011

Repository files navigation

Facebox

This is an extension for Spree, allowing to show zoomed product images to the customer:

It's based on Facebox: http://github.com/defunkt/facebox

A lot of code was taken from this project: http://github.com/eliotsykes/spree-zoom-photos

Installation

Installation is quite simple:

  • Add the gem source to your Gemfile gem 'spree_facebox', :git => 'https://github.com/3months/spree-facebox.git', :branch => 'rails3'
  • Run bundle install and then rake spree_facebox:install:assets

Consequences

New extra large image size of 1000x1000. So when new image uploaded on server it will have a 1000x1000 size in addition to default sizes. There is a way to transform existing images to the larger size, however do make sure that your original images are of a sufficient quality for this to be worthwhile - see the next section for different methods.

#Resizing existing images Resize all images: rake paperclip:refresh:thumbnails Resize only 'Image' images: rake paperclip:refresh:thumnails CLASS=Image (This is the one you want to resize just your Product/Variant images. Resize a selction of Product images:

  • Jump into a console and grab a selection of Products whose images you want to resize (using Array.select, or AR finders, etc).
  • [collection].each { |product| product.images.each { |image| image.reprocess! }}

All wishes, suggestions and improvements are welcome!