show shipping cost on product page

  • Posts: 57
  • Thank you received: 1
10 years 11 months ago #172795

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.4
-- PHP version -- : 5.5.14-1

Hi
How do i show shipping cost on product page

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

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #172812

Hi,

The shipping cost depend generally on the selected shipping method, so there can be a lot of shipping methods based on different restrictions like zones, prices, weights, etc...

Do you have many shipping methods ?
Are you using the "price per product" option in the shipping method ?

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

  • Posts: 57
  • Thank you received: 1
10 years 11 months ago #173064

3 shipping method all HikaShop manual shipping plugin price per product
and all are free but vendors add inn Shipping prices in produgt.

1. pickup in store
2. virtualbox (my download)
3. home delivery

I need to get this and show on product page
from table hikashop_shipping_price -> shipping_price_value

It would be really nice if vendors could choose / mark
ignore quantity in shipping prices so the shipping price
are fix as 1 shipping price per order. Regardless of quantity

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173205

Hi,

For your HikaMarket requests, it is easier (and better) to use the HikaMarket forum section.
I noted your feature request about the plugin "shipping price per product" and his integration with HikaMarket.

As you have already notice, the prices are stored in the table "shipping_price".
It means that you have to perform an SQL query in the product page in order to load the shipping prices (and why not, some shipping data in the same time), in order to be able to display them.
Something like :

$db = JFactory::getDBO();
$query = 'SELECT sp.*, s.* FROM #__hikashop_shipping_price AS sp INNER JOIN #__hikashop_shipping AS s ON sp.shipping_id = s.shipping_id WHERE sp.shipping_price_ref_id = '.(int)$this->element->product_id.' AND sp.shipping_price_ref_type = ' . $db->Quote('product').' ORDER BY s.shipping_id ASC, s.shipping_price_min_quantity ASC';
$db->setQuery($query);
$shipping_prices = $db->loadObjectList();

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.
Last edit: 10 years 11 months ago by Jerome.

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

  • Posts: 57
  • Thank you received: 1
10 years 11 months ago #173269

HI
I'm using show_tabular and did add your SQL query in but I got a blank page
I'm doing something wrong can you give me some more hints so i can add SQL query to the correct line and pages

and thank you Xavier and Jerome for being so efficient to answer

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173277

Hi,

If you got a blank page it means that you have a PHP fatal error.
Please check your PHP error log ; I may have made a mistake in the PHP code I gave you (just write it like 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: 57
  • Thank you received: 1
10 years 11 months ago #173301

hi
PHP code did have small error in 1 line $db = JFactory::getDBO(): i did fix like $db = JFactory::getDBO();
but now i have error 1054

Regards,

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173305

Hi,

Error 1054 is a SQL error ; you should be able to see the error details by activating the debug mode with the "mysqli" driver (if you are using the "mysql" driver in Joomla 3, please use the "mysqli" one)

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.

Time to create page: 0.077 seconds
Powered by Kunena Forum