Shipping method not displayed

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
8 years 7 months ago #235284

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.0
-- PHP version -- : 5.4.29
-- Error-message(debug-mod must be tuned on) -- : No error reported

[Topic moved from Hikamarket Forum ]

I am using the 'Hikashop Manual Shipping' plugin to create a shipping method with 'Price per product' enabled. I am doing this from the Hikamarket vendor control panel.

After setting it up, if I open up a product belonging to the vendor and try to use the new shipping method it is not listed.

If I now log in to the back-end admin area the new shipping method is listed. If I open and save it and then go back to the product edit page the new shipping method now shows up.

Comparing the database record for the shipping method before and after opening in Hikashop it looks like it something to do with the shipping_params and shipping_currency_id fields.

I also notice that the currency isn't displayed correctly on the shipping page in the vendor control panel:
The currency symbol is correct in the list:



but wrong on the form:



regards
Trevor

Attachments:
Last edit: 8 years 7 months ago by trevsmiff.

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #235370

Hello Trevor,

We'll try to test and fix it as fast as we can and get back to you with a fix.

Thanks for your feedback !

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #235731

Hello,
we've made a temporary fix for you, you'll just have to :
- Edit the file "administrator/components/com_hikamarket/classes/shipping.php" and replace these lines

	'link' => 'shipping_currency_id',
	'linkformat' => 'int',
By :
	'link' => 'shipping_currency_id',
	'data' => 'shipping_currency_id',
	'linkformat' => 'int',

- Edit the file "plugins\hikashop\shippingmanual_prices\shippingmanual_prices.php" and change these lines
$query = 'SELECT b.*, a.*, c.currency_symbol FROM ' . hikashop_table('shipping') . ' AS a LEFT JOIN '.
hikashop_table('shipping_price').' AS b ON a.shipping_id = b.shipping_id AND b.shipping_price_ref_id = '.$product_id.' INNER JOIN '.
hikashop_table('currency').' AS c ON c.currency_id = a.shipping_currency_id '.
'WHERE a.shipping_params LIKE '.
$db->Quote('%s:20:"shipping_per_product";s:1:"1"%') . ' AND (b.shipping_price_ref_id IS NULL OR (b.shipping_price_ref_id = ' . $product_id . ' AND b.shipping_price_ref_type = \'product\')) '.
$extra_filters.
'ORDER BY a.shipping_id, b.shipping_price_min_quantity';
By :
$query = 'SELECT b.*, a.*, c.currency_symbol FROM ' . hikashop_table('shipping') . ' AS a '.
	' LEFT JOIN '.hikashop_table('shipping_price').' AS b ON a.shipping_id = b.shipping_id AND b.shipping_price_ref_id = '.$product_id.
	' INNER JOIN '.hikashop_table('currency').' AS c ON c.currency_id = a.shipping_currency_id '.
	' WHERE (a.shipping_params LIKE \'%' . hikashop_getEscaped('s:20:"shipping_per_product";s:1:"1"') . '%\' OR a.shipping_params LIKE \'%' . hikashop_getEscaped('s:20:"shipping_per_product";i:1') . '%\') '.
		' AND (b.shipping_price_ref_id IS NULL OR (b.shipping_price_ref_id = ' . $product_id . ' AND b.shipping_price_ref_type = \'product\')) '.
	$extra_filters.
	'ORDER BY a.shipping_id, b.shipping_price_min_quantity';

Last edit: 8 years 7 months ago by Mohamed Thelji.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
8 years 7 months ago #236054

Thanks for that Mohamed, I am away for a few days but will apply the fix when I return.

Best regards
Trevor

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
8 years 7 months ago #236250

Hi Mohamed

I have applied the changes suggested but there is still a problem. If edit one of the payment methods it no longer appears on the product page. Looking at the database the field shipping_currency_id in the #_hikashop_shipping table is set to zero after editing.

Best regards
Trevor

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #236315

Hello Trevor,

Can you give us more information about it like some step by step instructions through some screenshots for example so that we can reproduce it on our end ?

Thanks.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
8 years 7 months ago #236430

Hi Mohamed

Here is how to reproduce the problem on your demo site:

On the Hikamarket demo site go to the Vendor Control Panel | Shippings and add a new Manual Shipping method



Note that I have set the currency in $USD and 'Use price per product' is selected

Save the new shipping method


Note that the currency has changed to Euro.

Go back to the vendor control panel and open up a product to apply the shipping method.
Scroll down and the new shipping method is not listed as it should be.



Now go to the Hikashop administrator area and go to the Shipping Methods.
The new method is listed with the price in Euros.



Open the new shipping method



Note that the vendor is correct but currency is wrong.
Change the currency to $US and save.

Log out as administrator and log back in as the vendor and go to the vendor control panel.
Open a product.



The shipping method is now listed!

In the Vendor Control panel, try opening and saving the new shipping method and you will find that the currency reverts to Euro and it is no longer displayed on the product edit page.

I think the problem is caused by the currency no being saved properly when edited from the vendor control panel.

Hope that helps.

Best regards
Trevor

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #236470

Hello Trevor,
Even if I reproduce it by following your step by step instructions, I don't have any issue with the fix that I gave you, so you should make sure that you correctly added the fix on your shop files.
If it still not working you should directly create a thread through the HikaMarket category so that the HikaMarket team can directly help you about it.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
8 years 7 months ago #236537

Hi Mohamed

I have reinstalled Hikashop and see that the patch has already been applied in the latest version. Testing again I get the same problem - When the manual shipping method with 'price per product' enabled is edited from the vendor control panel it disappears from the product edit page. Open and save it in the Hikashop back end admin area and the shipping method reappears in the vendors product edit page.

The same happens on your demo site (not sure if it has the fix though!)

If it still not working you should directly create a thread through the HikaMarket category so that the HikaMarket team can directly help you about it.


I thought that it was a Hikamarket problem and started this topic in the Hikamarket forum a week or so ago but was advised that it was a Hikashop poblem:

More than that, the plugin "shipping price per product'" (it is is real name) is not an HikaMarket plugin but an HikaShop one. Even if you're in the HikaMarket context, the plugin is the same and should be compatible with HikaMarket.
If you have issues with that plugin, please contact the HikaShop support (in the HikaShop forum section) for more details.


Do you want me to resurrect the issue in Hikamarket again?

Best regards
Trevor

Last edit: 8 years 7 months ago by trevsmiff.

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #236548

Hello Trevor,
We actually added a fix on the "shipping price per product'" plugin which we didn't added on the demo website. So now that the Hikashop part is fixed the best solution will probably be to ask it to the HikaMarket team so that they can properly advise you about it.

Do you want me to resurrect the issue in Hikamarket again?

Sure.

Thanks.

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

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
8 years 7 months ago #236675

Thanks Mohamed

I will try again on the Hikamarket forum.

Best regards
Trevor

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

Time to create page: 0.104 seconds
Powered by Kunena Forum