🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

spree_matkahuolto

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spree_matkahuolto

bundlerRubyGems.org
Version
1.0.8
Version published
Maintainers
1
Created
Source

SpreeMatkahuolto

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'spree_matkahuolto'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spree_matkahuolto

Then, to copy and execute the migrations, run:

$ rails g spree_matkahuolto:install

Then, add this requirement in your application.js.coffee

#= require shipping_method_matkahuolto

And add this requirement to your application.scss

*= require shipping_method_matkahuolto

Usage

Give Rails access to your Matkahuolto credentials (username, password and test_mode) as environment variables:

ENV["#{Rails.env.upcase}_MATKAHUOLTO_USERNAME"]

ENV["#{Rails.env.upcase}_MATKAHUOLTO_PASSWORD"]

ENV["#{Rails.env.upcase}_MATKAHUOLTO_TEST_MODE"]

In the Spree backend, shipping methods which internal names contains the following will be automatically linked to Matkahuolto backend:

matkahuolto_lahella

matkahuolto_jako

In the Spree checkout process, on the delivery method selection page, Matkahuolto Lahella will display a selection of available pickup places

In the Spree backend, any order that used Matkahuolto Lahella or Matkahuolto Jako as a delivery method will now provide a "print labels" link enabling to automatically download the package label PDF generated by Matkahuolto.

The Labels are saved to the file system. This rake tasks cleans up all labels older than 3 weeks:

rake labels:cleanup

You can setup a 'whenever' scheduled job by adding the following lines to your config/schedule.rb

every :sunday, :at => '12pm' do
  rake "labels:cleanup"
end

Don't forget to use the 'whenever' capistrano script to deploy your scheduled job.

Contributing

  • Fork it ( https://github.com/[my-github-username]/spree_matkahuolto/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 20 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts