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

tiramizoo/magento-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento Tiramizoo extension

This is the Magento Tiramizoo plugin for integration with Tiramizoo API. The module provides shipping method based on our Webservice. It is compatible with following Magento versions: 1.7 1.8.

Demo

Prerequisites

Installation

  • Switch to master branch and download code

  • Copy all files and folders to Your Magento installations and

  • Add Tracking URL to email templates, check dist files at:

    • locale/en_US/template/email/sales/order_new.html.dist
    • locale/en_US/template/email/sales/order_new_guest.html.dist

    {{layout area="frontend" handle="sales_email_order_tiramizoo_tracking_url" order=$order}}

  • Clear the cache.

  • Copy all files and folders to Your Magento installations and clear the cache.

Configuration of the module

  1. Module configuration (System -> Configuration -> Sales -> Tiramizoo)
- ** Is active:** Turn on/off module

- ** API URL:** The URL of the tiramizoo service endpoint (production version https://api.tiramizoo.com/v1, testing version https://sandbox.tiramizoo.com/api/v1)

- ** Shop URL:** URL used to build the webhook url for order creation. The Tiramizoo service will send a request to the url each time an order status change occurs.

- ** Payment methods:** Selected payment methods which are available for tiramizoo service. Remember that “cash on delivery payment” is currently not supported by Tiramizoo.
Packing strategy: The shop administrator is able to specify what packages are used by the shop. He can do that in 3 ways:

    - **All products have individual dimensions:** That means each product will be packed separately (number of products equals number of packages).

    - **Specific dimensions of packages:** That means that the admin is able to specify all package sizes they use in shop to pack products. Then the packing algorithm starts to pack all products in as smallest number of packages as possible and assumes the resulting package size as the package to deliver. Go to the tiramizoo website configuration to specify these dimensions (Production version, testing version).

    - **All products should fit to one package:** That means every product will go to one package (no matter how many products customer bought there will be only 1 package for courier)

- ** Default product dimensions and weight:** Tiramizoo shipping works only if every article in shoppping cart has specified dimensions and weight. The module allows to specify global dimensions and weight. These values are applied for each product without specified dimensions and weight.

- ** Product width/height/length mapping:** Map any magento attribute with proper dimension. Notice that magento doesn’t have specified default attributes determining product dimensions. This module creates attributes (if aren’t exists matched by code) with following codes: width, height, length.

- ** Synchronize all retail locations:** Configuration options from all retail locations (tiramizoo accounts) are synchronized daily. This process is performed in the first http request to the shop after midnight. It is possible to synchronize configuration directly by pressing the "Synchronize" button

- ** API Locations:** API tokens are available on the user dashboard after registration on the tiramizoo.com site. The API token is required to authenticate api requests. Module offers to connect for up to ten tiramizoo account. Shop can deliver orders from more than one retail location. The decision which api token is going to be used is made by postal codes comparisons.

- ** Debug log:** Enable/Disable module logging
  1. Shipping methods (System -> Configuration -> Shipping methods)

    At Tiramizoo section it is possible to define title of Tiramizoo shipping method and prices for Immediate and Evening shipping type. You can enable and disable shipping method.

  2. Category Edit (Catalog -> Manage Categories -> Select category -> Tiramizoo Tab)

    • Enable: You can set enable/disable Tiramizoo shipping for all products associated with selected category

    • Packed individually: If set to Yes it means that all products associated with selected category will be packed individually in Tiramizoo shipping

    • Weight and dimesnions: These attributes will apply to all products associated with selected category and will not have dimensions specified explicitly.

    All Product's category and all its parents categories need to have Tiramizoo service enabled (or inherited) to let containing products be delivered by Tiramizoo service.

    Also dimensions form enables to specify default product dimensions which will apply to all products which have the category selected and will not have dimensions specified explicitly.

  3. Product Edit (Catalog -> Manage Products -> Click on Product -> Tiramizoo Tab)

    • Enable: You can enable/disable selected product for Tiramizoo shipping

    • Packed individually: If set to Yes it means that product will be packed individually in Tiramizoo delivery

    • Weight and dimesnions: It should be appear on General Tab

    This page contains preview of the effective dimensions

Configure the account (retail location)

The main configuration of tiramizoo delivery is available on the tiramizoo website.

  • Packages presets: (Profile -> Default packages sizes) Retail location admin is able to specify package sizes that they use to pack products.

  • Pickup contact:

    Go to Profile -> Account and click on "New Contact" link

    Add pickup contact step 1

    Fill the required form fields and press the "Create contact" button

    Add pickup contact step 2

    Click on radio button to set selected contact as "Pickup contact"

    Add pickup contact step 3

  • Enable Immediate delivery type: (Profile -> Account -> Immediate time window enabled) Select Yes to enable Immediate delivery type or no to disable.

  • Enable Evening delivery type: (Profile -> Account -> Time window preset) Select time window to enable Evening delivery type or left blank to disable.

  • Business hours: (Profile -> Account -> Business hours) Specify when courier can pick up delivery. Selected days and hours could be extended by special days e.g. 24/12/2013 8:00-14:00 (in this example business hours are reduced).

Minimal configurations and rules

The tiramizoo shipping method is only available if the following rules are met:

  • Tiramizoo account configuration:

    • Pickup contact is selected and has valid postal code
    • Immediate delivery type or Evening delivery type is enabled
    • Package presets are specified if shop use "Specific dimensions of packages" as packing strategy
  • Magento configuration:

    • Shipping method is enabled
    • Immediate and evening delivery have defined prices
    • Module is enabled in Tiramizoo config
    • Shop url is not empty
    • One or more available payment method are selected
    • The API Token (retail location) is added
    • Magento Cron Job is running every 5 minutes
  • Configuration of products in cart:

    • Product has specified dimensions and weight directly or inherited by global / category settings.
    • Product is enabled with Tiramizoo Delivery
    • Product's associated categories and its parent categories are enabled with Tiramizoo Delivery
  • Delivery address and ordering date time:

    • Customer's postal code matches to the retail location's area Service coverage
    • Current date time should be fit with Tiramizoo open hours in specified area and shop business hours

Additional features / Tips / Limitations##

  • WebHook notifications

    The modules is able to receive push notification sent by tiramizoo each time the order status has changed. The order state is then changed on shop level as well. Go to Order tab to check the current order status. Webhook url needs to be accessible for POST request.

  • Disable tiramizoo service for individual product

    Available on product page

  • Mark individual product to not be packed with others - standalone

    Available on product page

  • Disable tiramizoo service for individual category

    Available on category page

  • Mark each product within category as individual product to not be packed with others - standalone

    Available on category page

  • Multishipping checkout

    Tiramizoo is not available on multishipping checkout

  • Multistore support

    Yes

  • Onepage model rewrite

    Onepage model Tiramizoo_Shipping_Model_Type_Onepage was rewrited by the plugin. Event checkout_type_onepage_save_order_before was added at the start of saveOrder method. If any other plugin is rewriting the same core file Tiramizoo Shipping module will not work properly. In this article http://stackoverflow.com/questions/14815717/multiple-modules-overriding-same-core-file-in-magento is explained how to resolve conflicts with multiple modules overriding same core file.

  • Tiramizoo Shipping events (Change cost calculation of delivery, convert product and category dimensions)

    Default price paid by customer for every delivery is set in Shipping methods (System -> Configuration -> Shipping methods) and it could be changed. If needed that price is depended on conditions like product dimensions, cart total price, product amount in cart or any other factor it should be done by using of event tiramizoo_shipping_modify_rates_price.

    Tiramizoo API expects product dimensions in centimeters. So if Your product/category dimensions attributes has another units like meters or inches You can conveert them by using events tiramizoo_shipping_convert_product_dimensions and tiramizoo_shipping_convert_category_dimensions.

    There are some examples in TestObserver class.

  • Product dimensions and weight, packing individually, is enable inheritance

    Tiramizoo API expects that every single product has specified dimensions and weight. If You don't want to specify dimensions for each product You can define dimensions and weight for all products in Tiramizoo module configuration. But if product in some categories has different dimensions You can specified these values for each category. The dimensions of parent category are applied for each subcategory that does not have specified dimensions. Notice that dimensions are inherited down only if all are filled. If product is assigned to some independent category subtree dimensions will be inherited from category that have the biggest volume. In Product edit Tiramizoo Option tab You can check effective product's dimensions.

    Inheritance of Is enable and is packing individually attribute works a little differently.

    Product is disable if any category in categories subtree has Is enable attribute value set to No or directly product Is enable attribute has value no.

    Product is enable if every category in categories subtree has Is enable attribute set to Yes or Inherit and directly product Is enable attribute has value Yes or inherit.

    Product Is packed individually if all nodes of category subtree have Is packed individually attribute set to Yes or inherit (inherit: if Packing strategy is set to value All products have individual dimensions) and directly product Is packed individually attribute has value Yes or inherit.

    Product Is not packed individually if all nodes of category subtree have Is packed individually attribute set to No or inherit (inherit: if Packing strategy is not set to value All products have individual dimensions) and directly product Is packed individually attribute has value No or inherit.

Troubleshooting and bugs

  • Check "Minimal configurations" section of this document
  • Use the newest version of plugin from master branch and Your eShop version is 4.7.x/5.0.x.
  • In case of any issues or suggestions please let us know through github issues

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages