Jump to content

Client cards order's view doesn't work.


Michael

Recommended Posts

To fix this bug please go to: /plugins/order/views/default/orders_view.pdt

Line 48:

<a href="<?php echo $this->Html->safe($this->base_uri . 'client/invoices/view/' . $invoice->id . '/');?>" class="btn btn-xs btn-default">

Replace with:

<a href="<?php echo $this->Html->safe($this->client_uri . 'invoices/view/' . $invoice->id . '/');?>" class="btn btn-xs btn-default">

Line 106:

<a href="<?php echo $this->Html->safe($this->base_uri . 'client/services/manage/' . $service->id . '/');?>" class="btn btn-xs btn-default">

Replace with:

<a href="<?php echo $this->Html->safe($this->client_uri . 'services/manage/' . $service->id . '/');?>" class="btn btn-xs btn-default">

To fix these bugs please go to: /plugins/order/views/default/orders.pdt

Line: 68:

<a href="<?php echo $this->Html->safe($this->base_uri . 'order/orders/view/' . $order->id . '/');?>" class="btn btn-xs btn-default">

With:

<a href="<?php echo $this->Html->safe($this->base_uri . 'plugin/order/orders/view/' . $order->id . '/');?>" class="btn btn-xs btn-default">

 

Line 74:

<a href="<?php echo $this->Html->safe($this->base_uri . 'order/orders/cancel/' . $order->id . '/');?>" class="btn btn-xs btn-danger">

with:

<a href="<?php echo $this->Html->safe($this->base_uri . 'plugin/order/orders/cancel/' . $order->id . '/');?>" class="btn btn-xs btn-danger">

Line 192:

<a href="<?php echo $this->Html->safe($this->base_uri . 'order/orders/');?>" class="btn btn-default pull-right">

Replace with:

<a href="<?php echo $this->Html->safe($this->base_uri . 'plugin/order/orders/');?>" class="btn btn-default pull-right">

Go to: /plugins/order/controllers/orders.php

Replace line 141-167 with:

public function cancel()
    {
        // Get order or redirect if not given
        if (!($order = $this->OrderOrders->get($this->get[0])) && ($order->client_id !== $this->client->id)) {
            $this->redirect($this->base_uri . 'plugin/order/orders/');
        }

        // Cancel the order
        $this->OrderOrders->cancel($order->id);

        if (($errors = $this->OrderOrders->errors())) {
            $this->flashMessage(
                'error',
                $errors,
                null,
                false
            );
        } else {
            $this->flashMessage(
                'message',
                Language::_('Orders.!success.order_canceled', true),
                null,
                false
            );
        }
        $this->redirect($this->base_uri . 'plugin/order/orders/');
    }

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...