当前位置: 首页>>代码示例>>PHP>>正文


PHP Model_Order::add_VAT方法代码示例

本文整理汇总了PHP中Model_Order::add_VAT方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Order::add_VAT方法的具体用法?PHP Model_Order::add_VAT怎么用?PHP Model_Order::add_VAT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model_Order的用法示例。


在下文中一共展示了Model_Order::add_VAT方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: action_checkoutfree

 /**
  * confirms a checkout when its a free order
  * @return [type] [description]
  */
 public function action_checkoutfree()
 {
     $order = new Model_Order($this->request->param('id'));
     if ($order->loaded()) {
         //if paid...no way jose
         if ($order->status != Model_Order::STATUS_CREATED) {
             Alert::set(Alert::INFO, __('This order was already paid.'));
             $this->redirect(Route::url('default'));
         }
         //checks coupons or amount of featured days
         $order->check_pricing();
         //adds VAT to the amount
         $order->add_VAT();
         //he needs to pay...little prick
         if ($order->amount > 0) {
             $this->redirect(Route::url('default', array('controller' => 'ad', 'action' => 'checkout', 'id' => $order->id_order)));
         } else {
             $order->confirm_payment('cash');
             $this->redirect(Route::url('oc-panel', array('controller' => 'profile', 'action' => 'orders')));
         }
     } else {
         //throw 404
         throw HTTP_Exception::factory(404, __('Page not found'));
     }
 }
开发者ID:kotsios5,项目名称:openclassifieds2,代码行数:29,代码来源:ad.php

示例2: action_checkout

 /**
  * pay an invoice, renders the paymenthods button, anyone with an ID of an order can pay it, we do not have control
  * @return [type] [description]
  */
 public function action_checkout()
 {
     $order = new Model_Order($this->request->param('id'));
     if ($order->loaded()) {
         //hack jquery paymill
         Paymill::jquery();
         //if paid...no way jose
         if ($order->status != Model_Order::STATUS_CREATED) {
             Alert::set(Alert::INFO, __('This order was already paid.'));
             $this->redirect(Route::url('default'));
         }
         //checks coupons or amount of featured days
         $order->check_pricing();
         //adds VAT to the amount
         $order->add_VAT();
         //template header
         $this->template->title = __('Checkout') . ' ' . Model_Order::product_desc($order->id_product);
         Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Home'))->set_url(Route::url('default')));
         Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Pricing'))->set_url(Route::url('pricing')));
         Breadcrumbs::add(Breadcrumb::factory()->set_title($this->template->title));
         Controller::$full_width = TRUE;
         $this->template->bind('content', $content);
         $this->template->content = View::factory('pages/ad/checkout', array('order' => $order));
     } else {
         //throw 404
         throw HTTP_Exception::factory(404, __('Page not found'));
     }
 }
开发者ID:kotsios5,项目名称:openclassifieds2,代码行数:32,代码来源:plan.php


注:本文中的Model_Order::add_VAT方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。