public function totalsBox() { $post = $this->wp->getGlobalPost(); /** @var \Jigoshop\Entity\Order $order */ $order = $this->orderService->findForPost($post); Render::output('admin/order/totalsBox', array('order' => $order, 'shippingMethods' => $this->shippingService->getEnabled(), 'tax' => $this->getTaxes($order))); }
public function render() { $cart = $this->cartService->getCurrent(); $content = $this->wp->getPostField('post_content', $this->options->getPageId(Pages::CART)); $content = do_shortcode($content); $termsUrl = ''; $termsPage = $this->options->get('advanced.pages.terms'); if ($termsPage > 0) { $termsUrl = $this->wp->getPermalink($termsPage); } return Render::get('shop/cart', array('content' => $content, 'cart' => $cart, 'messages' => $this->messages, 'productService' => $this->productService, 'customer' => $this->customerService->getCurrent(), 'shippingMethods' => $this->shippingService->getEnabled(), 'shopUrl' => $this->wp->getPermalink($this->options->getPageId(Pages::SHOP)), 'showWithTax' => $this->options->get('tax.price_tax') == 'with_tax', 'showShippingCalculator' => $this->options->get('shipping.calculator'), 'termsUrl' => $termsUrl)); }
/** * Renders page template. * * @return string Page template. */ public function render() { $content = $this->wp->getPostField('post_content', $this->options->getPageId(Pages::CHECKOUT)); $content = do_shortcode($content); $cart = $this->cartService->getCurrent(); $billingFields = $this->getBillingFields($cart->getCustomer()->getBillingAddress()); $shippingFields = $this->getShippingFields($cart->getCustomer()->getShippingAddress()); $termsUrl = ''; $termsPage = $this->options->get('advanced.pages.terms'); if ($termsPage > 0) { $termsUrl = $this->wp->getPageLink($termsPage); } $verificationMessage = $this->options->get('shopping.enable_verification_message') ? $this->options->get('shopping.verification_message') : ''; return Render::get('shop/checkout', array('cartUrl' => $this->wp->getPermalink($this->options->getPageId(Pages::CART)), 'content' => $content, 'cart' => $cart, 'messages' => $this->messages, 'shippingMethods' => $this->shippingService->getEnabled(), 'paymentMethods' => $this->paymentService->getEnabled(), 'billingFields' => $billingFields, 'shippingFields' => $shippingFields, 'showWithTax' => $this->options->get('tax.price_tax') == 'with_tax', 'showLoginForm' => $this->options->get('shopping.show_login_form') && !$this->wp->isUserLoggedIn(), 'allowRegistration' => $this->options->get('shopping.allow_registration') && !$this->wp->isUserLoggedIn(), 'showRegistrationForm' => $this->options->get('shopping.allow_registration') && !$this->options->get('shopping.guest_purchases') && !$this->wp->isUserLoggedIn(), 'alwaysShowShipping' => $this->options->get('shipping.always_show_shipping'), 'verificationMessage' => $verificationMessage, 'differentShipping' => isset($_POST['jigoshop_order']) ? $_POST['jigoshop_order']['different_shipping_address'] == 'on' : false, 'termsUrl' => $termsUrl, 'defaultGateway' => $this->options->get('payment.default_gateway'))); }