Print orders from order list

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
7 years 1 month ago #280416

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.1

Hi,

Is there a way to easily print the invoices of a selection of orders? If you go into the order by clicking the order number there's a button to print an invoice. We need these to prepare the orders. It seems a bit inconvenient to click each order to open it, click on the invoice and click the print button. Isn't there a way to make this easier?

And (almost) the same thing, is there a simple wya to select some orders and email the invoices to the customers?

Thanks a lot.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 1 month ago #280421

Hi,

You can look at the PDF invoice plugin:
www.hikashop.com/component/hikashop/product/cid-18.html
It adds a button on the orders listing to generate a PDF with all the invoices of the orders selected.
It can also automatically include the PDF invoice to the order status notification email sent to the customer when the order is paid.
However, there is no system to select some orders and send an invoice to them in one action.

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 6
  • Hikashop Business
3 years 11 months ago #326490

Hi Nicholas.

Different checkout
: ok, understood. I'll do some experiments with views to try to achieve the goal. Maybe I'll ask you about how to extract the correct price from database. (If you have some links about that would be very appreciated!).

About the second question: I've attached two screenshots.
No shipping shows you the cart with no shipping cost + payment cost; in this situation there's no IVA (22%) in the cart, but it should be there as it's still applied on payment cost (5.00 € + 1,10 €) 1.10€ is missing.
The result is correct...but I already know that some customers will claim that there's an error.
Shipping-fees shows a cart with shipping cost + payment cost; in this case, the Iva is correctly shown for both the additional costs.

Thanx!
Davide

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 11 months ago #326497

Hi,

1. From what I understand, you're talking about this:
www.hikashop.com/forum/checkout/901306-d...ifferent-groups.html
If so, then I don't think it's a matter of "extracting the correct price from database". Everyone actually pays the same gross price (which is what is stored in the database really), and some have tax or not tax or another tax. HikaShop actually calculates both the taxed and untaxed price when taxes apply, and you can have tax/no tax based on the user group of the user. So that part is taken care of in HikaShop by default.
However, from what I understand, your question was about changing which calculated price is being displayed based on the user group, and that's what is not available. That's why I suggested view overrides to change the display of the price. Now which view file to change depends on which area you want to change. A good start would be reading this:
www.hikashop.com/support/documentation/1...-display.html#layout
Then, once you find the place displaying the price, you'll usually have something like that:

if(!empty($this->options['price_with_tax']))
						echo $this->currencyClass->format(@$cart->total->prices[0]->price_value_with_tax,@$cart->total->prices[0]->price_currency_id);
					else
						echo $this->currencyClass->format(@$cart->total->prices[0]->price_value,@$cart->total->prices[0]->price_currency_id);
as the system can already display either the taxed prices or the non taxed prices. But it's a global setting for all the user groups.
So you'll usually have to add some code at the beginning of the view to know which display mode to use and then just override the value in
$this->options['price_with_tax']
(or the corresponding variable) to change how the prices are displayed in the whole view.

2. Well, I'm not sure what I'm looking at there. What's the sub total without taxes, what's the payment fee and the shipping fee without taxes ? Is the tax 10% for all the elements (products shipping and payment) ?

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 6
  • Hikashop Business
3 years 11 months ago #326719

Hello again.

I've managed to show the prices I needed, based on Joomla groups, using this code:

$user   = JFactory::getUser();
$groups = JAccess::getGroupsByUser($user->id);
$groups_list = '(' . implode(',', $groups) . ')';

$db = JFactory::getDbo();
$query = $db->getQuery(true)
	->select($db->qn('title'))
	->from('#__usergroups')
	->where($db->qn('id') . ' IN ' . $groups_list);
$db->setQuery($query);
$rows = $db->loadObjectList();
$grossista = false;
$gruppo ='';
$ids = array_column($rows, 'title');
foreach ($ids as $id) {
	switch($id) {
		case 'Grossisti':
			$grossisti = true;
			$gruppo = 'grossisti';
		break;
		case 'Privati':
			$gruppo = 'privati';
		break;
		case 'Guest':
			$gruppo = 'guest';
		break;
	}
}
By this way I can control all via SCSS, simply apllying a new class to the price block.
So, about that I think I'm okay. Maybe that code could be better written, but I'm a php noob...so that's my best at the moment :)

Moving to the second point of the ticket, these are the costs:
-> Payment on delivery: 5.00€ + VAT IT 22% = 6.10
-> Shipping: 4.78€ + VAT IT = 5.83
About the taxes: yes there are two different tax rules as the products, that are seeds, have only 10% applied, while payment and shipping have 22%.

Now, looking at what I sent you, in the first picture there's no shipping cost but there is the payment cost.
in this case we can only see the tax that is related to the products, but not those related to the payment cost. We only see 5.00€ but we should see another row with the VAT amount for the payment method.
Looking at the second screenshot should clear what I mean.
Here we have both, the shipping cost (5.83) and the payment cost. And a new row is appeard with the VAT amount for both.

Why this row doesn't appear in the first situation?
Why the shipping cost is shown as total (base cost + tax) while payment is shown without tax?

davide-strati.it/zoeshop/index.php/it/
This is the Test Site, if you want I can create an user for you or pm the access.

Thanx again!
Davide

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 11 months ago #326758

Hi,

I've done a similar setup on my end and it displays just fine:
monosnap.com/file/O7838ELbGXZa7LwPIE0WEvkfW3qxcf
So I'm not sure if it's a setup issue or a customization of the cart display view issue on your end but at least it seems that it works fine in HikaShop by default.
Could it be that you've made a similar customization with the prices and the user groups in the show_block_cart.php view file and there is a problem with that customization ?

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 6
  • Hikashop Business
3 years 11 months ago #327206

Hi NIcholas.
Sorry but I was completly overwelmed by other works.
Meanwwhile I've made some tests and cleared the customizations on show_block_cart (deleted from hika views).
The problem is still there.
If I've the shipping costs I can see the taxes as separate row, with shhiping costs tax + payment costs tax
If I don't have shipping costs, but only the payment costs, there's no info about taxes.

Now, looking at the code of show_block_cart I've noticed that the payment costs appear AFTER the tax's rows.
So, could it be that IF the shipping costs are ZERO, the taxes seems to be ZERO too, so won't get displayed?

Thank you
Davide

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 11 months ago #327211

No. The taxes amount is calculated before the display of the subtotal with the line:

$taxes = round($displayingPrices->total->price_value_with_tax - $displayingPrices->total->price_value, $this->currencyClass->getRounding($cart->full_total->prices[0]->price_currency_id));
so whether taxes are to be displayed or not won't change based on whether the payment fee is displayed before or after the tax rows.

Besides, if you check my screenshot, you can see that the taxes of both the payment and the shipping fees are taken into account when displaying the tax rows, and that's with a default HikaShop.
So if it's not a customization issue, either you have some specific configuration which leads to this, or there a bug for a specific cases.

However, so far I only have partial information on what you have on your example screenshots. I would need a clear example to be able to reproduce exactly the same situation.
So the example should provide :
- a screenshot of the "taxes" section of the HikaShop configuration
- a screenshot of the taxes listing in the menu System>Taxes
- a screenshot of the all the settings for each product in the cart of the example (ideally, only one product...)
- a screenshot of the settings of the shipping method
- a screenshot of the settings of the payment method
- a screenshot of the settings of the "cart" view in the "checkout workflow" setting of the HikaShop configuration
- a screenshot of the corresponding display with the issue on the checkout so that I can compare what I see on your frontend with what you've configured in the backend.
That will first allow me to check that everything is properly setup. And second, if it's not a setup problem but a bug, I'll be able to try to reproduce the same situation on my end and hopefully end up with the same problem and fix that bug.

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 6
  • Hikashop Business
3 years 10 months ago #328525

Hello Nicholas.
I'm back with the screenshots you asked.
It tooke me a "while" casue of holidays and urgents works right after.

Summarizing the problem: the tax row appears in cart only if shipping costs are different than zero.
Calculations are fine, it's just a visual problem; so take your time as I've done :)

Thank you.
Davide

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 10 months ago #328537

Hi,

Thank you for taking the time to get us the screenshots.
I was able to reproduce the problem thanks to that, debug the situation, find the source of the issue and add a patch for it.
To get the patch, simply download the install package of the latest version of HikaShop on our website and install it on yours.

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 6
  • Hikashop Business
3 years 10 months ago #328580

Hi,
glad I could help!

Thank you.
Davide

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum