{"action":"created","issue":{"url":"https://api.github.com/repos/mVentory/MVentory_Productivity/issues/19","labels_url":"https://api.github.com/repos/mVentory/MVentory_Productivity/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/mVentory/MVentory_Productivity/issues/19/comments","events_url":"https://api.github.com/repos/mVentory/MVentory_Productivity/issues/19/events","html_url":"https://github.com/mVentory/MVentory_Productivity/issues/19","id":108586260,"number":19,"title":"One-click checkout","user":{"login":"rimutaka","id":5926028,"avatar_url":"https://avatars.githubusercontent.com/u/5926028?v=3","gravatar_id":"","url":"https://api.github.com/users/rimutaka","html_url":"https://github.com/rimutaka","followers_url":"https://api.github.com/users/rimutaka/followers","following_url":"https://api.github.com/users/rimutaka/following{/other_user}","gists_url":"https://api.github.com/users/rimutaka/gists{/gist_id}","starred_url":"https://api.github.com/users/rimutaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimutaka/subscriptions","organizations_url":"https://api.github.com/users/rimutaka/orgs","repos_url":"https://api.github.com/users/rimutaka/repos","events_url":"https://api.github.com/users/rimutaka/events{/privacy}","received_events_url":"https://api.github.com/users/rimutaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-28T04:09:00Z","updated_at":"2015-09-28T04:11:59Z","closed_at":null,"body":"Sometimes merchants are too busy selling in store to put the products through their PoS. They sell, sell, sell, then sit down at the end of the day and take them off the website by adjusting the quantity.\r\nIt would make their life easier if they could add the sold products to cart and then checkout in one click.\r\n\r\nThe process:\r\n\r\n1. The merchant must be logged in to Productivity via a customer login, not the admin.\r\n2. The merchant adds one or more products to cart.\r\n3. The merchant clicks on \"Sold\" button in the productivity menu.\r\n4. The shopping cart is processed and a single order is created with the logged in customer as the buyer.\r\n5. The user is redirected to the order details page.\r\n\r\nCreate and use dummy payment and shipping methods as described below. The rationale is to make sure the order always comes through no matter what payment / shipping methods are configured for the store.\r\n\r\nThere are probably gaps in the requirements. Ask or suggest corrections if you spot any."},"comment":{"url":"https://api.github.com/repos/mVentory/MVentory_Productivity/issues/comments/143636931","html_url":"https://github.com/mVentory/MVentory_Productivity/issues/19#issuecomment-143636931","issue_url":"https://api.github.com/repos/mVentory/MVentory_Productivity/issues/19","id":143636931,"user":{"login":"rimutaka","id":5926028,"avatar_url":"https://avatars.githubusercontent.com/u/5926028?v=3","gravatar_id":"","url":"https://api.github.com/users/rimutaka","html_url":"https://github.com/rimutaka","followers_url":"https://api.github.com/users/rimutaka/followers","following_url":"https://api.github.com/users/rimutaka/following{/other_user}","gists_url":"https://api.github.com/users/rimutaka/gists{/gist_id}","starred_url":"https://api.github.com/users/rimutaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimutaka/subscriptions","organizations_url":"https://api.github.com/users/rimutaka/orgs","repos_url":"https://api.github.com/users/rimutaka/repos","events_url":"https://api.github.com/users/rimutaka/events{/privacy}","received_events_url":"https://api.github.com/users/rimutaka/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T04:11:59Z","updated_at":"2015-09-28T04:11:59Z","body":"Shipping.php\r\n\r\n<?php\r\n/**\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Creative Commons License BY-NC-ND.\r\n * By Attribution (BY) - You can share this file unchanged, including\r\n * this copyright statement.\r\n * Non-Commercial (NC) - You can use this file for non-commercial activities.\r\n * A commercial license can be purchased separately from mventory.com.\r\n * No Derivatives (ND) - You can make changes to this file for your own use,\r\n * but you cannot share or redistribute the changes.  \r\n *\r\n * See the full license at http://creativecommons.org/licenses/by-nc-nd/4.0/\r\n *\r\n * @package MVentory/API\r\n * @copyright Copyright (c) 2014-2015 mVentory Ltd. (http://mventory.com)\r\n * @license http://creativecommons.org/licenses/by-nc-nd/4.0/\r\n */\r\n/**\r\n * Shipping model\r\n *\r\n * @package MVentory/API\r\n * @author Anatoly A. Kazantsev <anatoly@mventory.com>\r\n */\r\nclass MVentory_API_Model_Shipping\r\n  extends Mage_Shipping_Model_Carrier_Abstract\r\n  implements Mage_Shipping_Model_Carrier_Interface {\r\n  protected $_code = 'mventory';\r\n  protected $_isFixed = true;\r\n  public function collectRates (Mage_Shipping_Model_Rate_Request $request) {\r\n    if (!((Mage::getSingleton('api/server')->getAdapter() != null\r\n           || Mage::registry('mventory_allow_shipping'))\r\n          && $this->getConfigFlag('active')))\r\n      return false;\r\n    $method = Mage::getModel('shipping/rate_result_method');\r\n    $method->setCarrier('mventory');\r\n    $method->setCarrierTitle($this->getConfigData('title'));\r\n    $method->setMethod('mventory');\r\n    $method->setMethodTitle($this->getConfigData('name'));\r\n    $method->setPrice('0.00');\r\n    $method->setCost('0.00');\r\n    $result = Mage::getModel('shipping/rate_result');\r\n    $result->append($method);\r\n    return $result;\r\n  }\r\n  public function getAllowedMethods () {\r\n    return array('mventory' => $this->getConfigData('name'));\r\n  }\r\n}"}}