HikaMarket Product options in random order

  • Posts: 23
  • Thank you received: 0
10 years 9 months ago #141733

-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.2.0
-- PHP version -- : 5.4.22
-- Browser(s) name and version -- : Mozilla Firefox 20.0.1

Hi guys,

I have an issue with Hikamarket in combination with Hikashop business.
When customers order a product with specific options its fine, when the only order one product.

But lets say, the customer orders more products with various options in it.
When I go to Hikamarket and have a look on the order, all products and options display in kind of an random order.
So I cannot tell which product belongs to which option. That is really an big issue here. I cannot deliver the right product if I cant
exactly connect the product with the options!

Could you please have a look on this?
Thanks.

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

  • Posts: 23
  • Thank you received: 0
10 years 9 months ago #141734

Oh no, I just saw, that I even cant tell from the backend -> orders which product belongs to which option...

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 9 months ago #141735

Hi,

There is an option in HikaShop to "group options".
At this moment, the "option" won't be a product in the cart but a sub element of the main product.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 23
  • Thank you received: 0
10 years 9 months ago #141738

Hi Jerome,

thanks for your lightning fast support!
The option: Configuration ->Cart-> Group options with product is already set to yes.

May you have another idea?

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 9 months ago #141771

Hi,

I am working on a view modification for that.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 23
  • Thank you received: 0
10 years 9 months ago #141772

Hey,

that would be great Jerome.
Because now I'am afraid that I cannot satisfly my costumers without that.

Do you have an idea how long it would take? So I can prepare myself and the costumers?
Its really an big issue for us.

Thank you Jermoe,
Regards

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 9 months ago #141774

Hi,

In the file "components/com_hikamarket/view/ordermarket/view.html.php".
Replace :

		if(empty($order->customer)) {
			$userClass = hikamarket::get('shop.class.user');
			$order->customer = $userClass->get($order->order_user_id);
		}
		$this->assignRef('order', $order);
By:
		if(empty($order->customer)) {
			$userClass = hikamarket::get('shop.class.user');
			$order->customer = $userClass->get($order->order_user_id);
		}
		if(!empty($order->products)) {
			$options = false;
			$products = array();
			foreach($order->products as &$product) {
				if(!empty($product->order_product_option_parent_id)) {
					if(empty($products[$product->order_product_option_parent_id]))
						$products[$product->order_product_option_parent_id] = array();
					if(empty($products[$product->order_product_option_parent_id]['options']))
						$products[$product->order_product_option_parent_id]['options'] = array();
					$products[$product->order_product_option_parent_id]['options'][] = &$product;

					$options = true;
				} else {
					if(empty($products[$product->order_product_id]))
						$products[$product->order_product_id] = array();
					$products[$product->order_product_id]['product'] = &$product;
				}
			}
			unset($product);

			if($options) {
				$order->products = array();
				foreach($products as &$product) {
					if(!empty($product['product']))
						$order->products[] = $product['product'];
					if(!empty($product['options'])) {
						foreach($product['options'] as &$opt) {
							$order->products[] = $opt;
						}
						unset($opt);
					}
				}
				unset($product);
			}
		}
		$this->assignRef('order', $order);

In the file "components/com_hikamarket/views/ordermarket/tmpl/show_products.php".
Replace:
foreach($this->order->products as $k => $product) {
?>
		<tr>
			<td class="hikamarket_order_item_name_value">
By:
foreach($this->order->products as $k => $product) {
	$td_class = '';
	if(!empty($product->order_product_option_parent_id))
		$td_class = ' hikamarket_order_item_option';
?>
		<tr>
			<td class="hikamarket_order_item_name_value<?php echo $td_class; ?>">

And you can add some CSS like :
table.hikam_table td.hikamarket_order_item_option {
	padding-left: 10px;
	border-left: 2px solid;
}
In order to see the product options.

These modifications will be in the next HikaMarket release.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 23
  • Thank you received: 0
10 years 9 months ago #141779

Hey Jerome,

awesome! Now the products get sorted.
Would be cool, if the products get shown like in the cart on the homepage. (So you can identify them really as group)

But awesome, now I can at least identify the products and options!

-Super support -fast and what I needed!

Cheers,

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

Moderators: Obsidev
Time to create page: 0.067 seconds
Powered by Kunena Forum