Characteristics, Bulk Discount and Totals is it possible

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
7 years 9 months ago #261173

-- HikaShop version -- : 2.6.2

Hi

I have been trying to figure this out but I cant seem to find a solution.

My problem is this:
The site offers a range of different course that we sell.
I am trying to add an event registration "Product"
The main purpose of this is to allow a corporate to book a workshop for X number of people.
The info I am wanting to get from them is the following.

  • numebr of peole attending
  • Do they have their own venue or should we rent one
  • Do they want us to supply food

Till this point, I am fine cause I can use custom fields, characteristics or options to do this.
What I can't manage to get right is I want to give bulk discount on entry fee based on number of people at the same time venue cost must increase per 10 extra people and food must remain a flat rate per person.

This is still reasonably fine but where the problem comes in is displaying the cost, what I want is the following.
Eg1.
10 People attending, they want us to rent a venue and they want food.
I want to then display on screen without clicking add to cart
Total Cost is 15 000
Basically what I want is to display total cost Live on the product page so as they change the quantity or any characteristics the price must instantly update.

I know you can use java script for this but I have no idea how to get the Price, Quantity and other Hikashop values to do this.

any solution you can come up with would be great

Hope I explained myself well enough

Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 9 months ago #261184

Hi,

I indeed do think it would be better to do that with javascript.
Getting the quantity, price, etc should only require basic javascript.

For example, to get the quantity entered by the customer in the quantity field, you should be able to use such js:
var qty = document.getElementById('hikashop_product_quantity_field_1').value;
The variants prices are stored in a hidden input hikashop_price_product_XX where XX is the id of the variant.
The id of the current variant can be retrieved by looking at the value of the input in the span with the id hikashop_product_id_XX_YY where XX and YY are the values of each characteristic dropdown.
etc.
A seasoned javascript developer should be able to come up with a solution fairly easily.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum