View total price of product

  • Posts: 28
  • Thank you received: 0
11 years 10 months ago #84874

Hi there,

I need to display the total price of the product before adding to cart.

For example, if the quantity is changed, the client should see the new total price before adding to cart.

So the total price should display and update if the quantity changes or if any of my custom fields on the product changes, such as width or height.

Any help would be appreciated.

Last edit: 11 years 10 months ago by neil@sm.co.za.

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

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

Hi,

Are the quantities fixed, for example 1 - 5 - 10, or can the user set the quantity he wants ?
Same question for width and height.

Because if the values are fixed, you can use the variants.
Else it will require a good PHP level.

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

  • Posts: 28
  • Thank you received: 0
11 years 10 months ago #84975

No the quantities are not fixed. It will vary according to what the customer wants.

Can you please give me a sort of indication to where I should look in the code or what piece of code handles that part of functionality. I guess I will have to write an override plugin for hikashop to do this, so if there is a method I should use etc....

And again, thank you for your support.

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

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

I think that you will have to edit the view "product / show_default" add a button in the page to refresh the price (or add onMouseOut actions on the quantity, width, height fields) add a trigger which call the plugin, and in this plugin get the informations and calcul the price, then reload the product page with the new price.

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

  • Posts: 28
  • Thank you received: 0
11 years 10 months ago #85050

Thank You for the reply, I will try this.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum