displaying and selling a plan, which requires a keyword upon purchase

  • Posts: 52
  • Thank you received: 4
3 years 6 months ago #323663

Hello,

I have purchased latest HikaShop Business and HikaSerial.

Right know I have 3 single products in 3 categories. The reason why, is so I can place 1 single product with my start page, using the module. The module only allows a filter for category, but I would like to show a single product with module.

1. Is there a better way?

I would like to sell a Plan with 3 different variants.

Plan A
Plan B
Plan C

2. Should I create only 1 product with 3 variants?

I will need a keyword entered by customer for this plan, so the plan knows what keyword should be used during process of some data.

2. How can I accomplish this kind of task for just one Plan, but not for other plans, which are for different tasks.

Any help appreciated, so I don't work in the wrong direction.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 6 months ago #323711

Hi,

Well, doing it like that is possible. I don't see a problem with it.
An alternative could be to use the content tag system:
www.hikashop.com/support/documentation/1...-product-insert.html
So you could add just the add to cart button of the product in a custom HTML module, or a Joomla article.

You could also have one page with a dropdown to select the variant. If that's what you want it's possible. And you'll still be able to use a content tag to have the add to cart button of a variant somewhere else on the website.

The following user(s) said Thank You: knuffiwuffi

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

  • Posts: 52
  • Thank you received: 4
3 years 6 months ago #323728

Hello,

thank you. I already had a look at the tag system as well.

My initial question:

If a user adds a plan to the card, I need the user to enter a keyword to be attached to the plan. The plan will peform some php calculation based on that very keyword and before adding plan to cart, I will have to to check if the keyword has already been taken by another user with a plan. If the keyword is already attached to the another user (another plan), the plan can't be added with cart.

Any ideas about this.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 6 months ago #323731

Hi,

You'll have to create a custom field of the table "item" via the menu Display>Custom fields so that the custom field is added above the add to cart button.
And you can make it as required so that the customer has to enter something in it.
Then, you should create a custom plugin of the group "hikashop" and implement the onAfterProductQuantityCheck(&$product, &$wantedQuantity, &$quantity, &$cart_products, &$cart_product_id, &$displayErrors) trigger and change the value of $quantity to 0 to refuse the add to cart. And if you use $app->enqueueMessage() to display a error message in that case, it will be displayed automatically by the add to cart notification system.

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

  • Posts: 52
  • Thank you received: 4
3 years 6 months ago #323754

Thank you very much. I will try to build this. Good to know, we can do this.

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

  • Posts: 52
  • Thank you received: 4
3 years 1 month ago #329793

Hello,

it has been some time, but now I can finally try to implement this solution.

I have created a custom field "product_customer_keyword".
The custom field will show in backend with product and is required.

Right now I am trying the next step and show the field with my custom product module.

I have created 4 hikashop product modules, each linked to a different plan.
The custom field does not show.

Do I have to set some option here?

Then I need to create a plugin.
I see 17 different plugins such as "Random - HikaSerial Generator plugin".

Which plugin should I use?

// =====

Another question that just came up.

When I want to edit my product in the backend, I need to fill the custom field I have created in order to save the product. Yes, it is a required field. But a required field for users who would like to book this product/plan. They need to enter a keyword in order to add the product to the cart. Right now my hikashop product module does not show the field, as mentioned above.

And the custom field now shows my custom field with product page "Specifications" tab. It actually shows the value I had to enter in backend, in order to save the product.

Last edit: 3 years 1 month ago by knuffiwuffi.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 1 month ago #329803

Hi,

I understand from your message that you've created a custom field of the table "product". But as I said in my previous message, you need to create a custom field of the table "item" so that it can display on the product details page on the frontend and not in the backend edit page.

There is no free or paid plugin available on our website which implement the onAfterProductQuantityCheck trigger for now.
So you can start with an empty plugin:
www.hikashop.com/support/documentation/6...mentation.html#howto
And if you don't know how to create a joomla plugin, I would recommend starting here:
docs.joomla.org/Portal:Plugin_Development

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

Time to create page: 0.050 seconds
Powered by Kunena Forum