Extending Hikashop

  • Posts: 23
  • Thank you received: 0
13 years 3 months ago #3070

Hi,

First of all I want to congratulate you on the new release 1.4.0 :)

Now to the topic: How much possibilities do you have to extend Hikashop.

For example I made this site in Virtuemart some time ago: www.almahouse.se/shop/1-baeddlinne/2-bae...ott-i-bomullspercale

As you can see the customers can add a monogram to the linens in the shop and the price is updated depending on how many letters you enter.

I was able to do this extension without any core hacks thanks to the possibility to override Virtuemart's core classes.

Do you think I could do something similar in Hikashop?

I really like Hikashop so far and would love to use it for my clients in the future as well.

Nils


Hikashop Essential 1.4.0

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
13 years 3 months ago #3074

Hi,

That is possible as well with HikaShop if you know your way around in PHP :)

To accomplish that, here is what I would do:
Create two characteristics: 1 for Trådfärg and 1 for the number of letters.
And fill them with the possible values
Then, create a product with those two characteristics. For each variant, set a specific price.
Then, edit the file show of the view product in Display->Views. There, add an input box for the text and hide the number of letters characteristics. Upon typing the letters in the input box, update in js the number of letters dropdown and trigger the js function to update the informations of the products with some javascript.
Finally, have a custom order field set in hikashop (business version) where you would be able to insert that text with some additional js and block the edition of it on the checkout. To force the value from the input text you added in the view to the custom field, you would have to edit the fields file of the view checkout to retrieve the value from the post and add it in the object passed to the code generating the custom fields.

The only limitation I see in HikaShop is that you can't have something which generates the price of an item as the price is always recalculated dynamically from the information in the database on each page (for taxes, zones, quantities, etc). So you need to have the price linked to a product in the database before being able to select it. So, for example, this page www.almahouse.se/shop/7-sammetstyger/18-cerise-120-cm where you can specify the number of meters. Either, you have a variant per possibility with a different price (and if you want it up to 200m then you will have 200 variants) or you need some code to generate the variants and the characteristic value dynamically when selected with some ajax. You could add in the view some code to generate dynamically the product variant and the price based on the options entered by the user. That would however require a bit more work as you might need some ajax for that. But that's not impossible either.

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

  • Posts: 23
  • Thank you received: 0
13 years 3 months ago #3085

What about extending Hikashop in general? Have you thought about adding more triggers for plugins so you can extend the shop that way?


Hikashop Essential 1.4.0

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
13 years 3 months ago #3088

There are already several triggers in HikaShop: www.hikashop.com/en/support/documentation/62.html
We also have some triggers which are not yet documented. All in all, about twenty triggers and three different types of plugins.
Of course, it is always possible to add more of them if we feel they are relevant.
For example, since version 1.3.9 of HikaShop the description of products is parsed by content plugins. So you can add in the description of your products normal joomla content tags in hikashop and have them converted by the content plugins.
For version 1.4.1, we are going to add some templates override so that you can redefine hikashop buttons, the popup when adding a product in the cart, the quantity field with the + and -, etc. Those were not yet modifiable without hacking in core files. So we decided to add some triggers for them.

If you tell us your needs we will tell you what we think is the best way of accomplishing it, be it by plugins, edition of views, CSS, options, templates overrides, etc. And if it's really not possible, maybe add some new triggers in following versions.

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

  • Posts: 23
  • Thank you received: 0
13 years 3 months ago #3104

I will do that. It's good to just add things you know you need.


Hikashop Essential 1.4.0

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

Time to create page: 0.072 seconds
Powered by Kunena Forum