Show shipping costs on product detail page

  • Posts: 2
  • Thank you received: 0
8 years 2 months ago #229314

-- url of the page with the problem -- : 46.17.6.79/~xpozai/index.php/nl/all-hats/product/3-hat-3
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.4.z

Using hika shop essentials for my wife's website. I like the majority of the code, but since i'm just starting not everything is totally clear.

I would like to display the shipping costs on the product page (show_default.php). Can somebody point me in the right direction on how to do this?

i'm a good php back-end programmer (5+ years laravel and symfony) and now joomla very well. So i'm not scared of making plugin or something like that.

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

  • Posts: 12953
  • Thank you received: 1778
8 years 2 months ago #229347

Hello,

I would like to display the shipping costs on the product page (show_default.php). Can somebody point me in the right direction on how to do this?

There is actually no option to do that as shipping methods can also have restrictions on the order details as the "Shipping address/Order total weight/...".
If you already know the price of your shipping price the solution will be to directly add it on the description of your product, or display a shipping price regarding the ID of the product through the "Show_default" file of the "Product" view of your front-end template via "Hikashop->Dispay->Views"

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

  • Posts: 2
  • Thank you received: 0
8 years 2 months ago #229376

Dear Mohamed,

Thanx for your reply, how unsatisfying it may be. Can you at least point me to the files that are used during the checkout to calculate the shipping. It should be possible to use the information that is available from the hikashop database tables.

I'm thinking: retrieve the shipping data and create a select element with the shipping options. In our case this would be a simple list of 3 options: Netherlands, Europe, Rest of the world. At the moment the size and weight do not matter for us. (We ship everything a bit more expensive because the products are then insured).

Now i could implement this in my own crappy way, but i would rather do it nicely so it can be used by other people as well.

If you could point me to the files / functions used by the checkout to calculate the shipping costs that would probably save me at least an hour of searching :)

All the best,

Perry

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

  • Posts: 4502
  • Thank you received: 610
  • MODERATOR
8 years 2 months ago #229406

Hello,

I attached a plugin file, that can help you to develop a plugin.
There are lots of comments, in order to help you get required data and understand easily.

I'm still here, if you have any question.

Regards,


File Attachment:

File Name: shippingmanual.zip
File Size:3 KB

Attachments:
Last edit: 8 years 2 months ago by Philip.

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

  • Posts: 6
  • Thank you received: 0
7 years 7 months ago #249742

You really need to add this as an option for your customers. For some people it seems dishonest to NOT show shipping costs in the actually cart calculations - BEFORE they get to the payment section.

This would be a very good option for us.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
7 years 7 months ago #249744

Hi,

The thing is that there is already this option. The plugin that Philippe gave is actually by default in HikaShop.
It can display the shipping prices of the product on the product page.
This only requires configuring the shipping prices in the products.
So there is no code to add.
However, that is to be used for when you have shipping prices per products. If the shipping prices are calculated dynamically by Fedex/UPS/USPS/etc or that it depends on the total weight/dimensions of the cart and/or the address of the customer, you can automatically display shipping prices on the product page as you don't know the fees in advance.
In such cases, you can potentially create custom product fields to enter an approximate for each product and have it displayed on the product page.
So these solutions cover most needs already.
And for something more advanced which could display the shipping prices based on dynamic calculations, I'm afraid that the only possible solution is to develop a custom plugin on a case by case basis.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
4 years 3 weeks ago #316817

Hi,

Note that there is now a "shipping estimation" plugin which can do dynamic display of shipping fees with shipping plugins like UPS/UPS/Fedex, etc:
www.hikashop.com/marketplace/product/244...tion-by-obsidev.html

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

Time to create page: 0.085 seconds
Powered by Kunena Forum