Product display with Order Sample

  • Posts: 8
  • Thank you received: 0
9 years 5 months ago #236011

The product is fabric by the yard. The customer also sells small swatches of the fabric. On the page above, we would like to have "Add to Cart" and "Order Sample" buttons. However, it seems when we add variants to the product so the "Order Sample" shows, we have to go to a separate page to select the yards. Why can't both buttons reside intact, on the same layout?

Also, I need to add the characteristic and variants to the products that don't have it yet. I've tried various ways to set it up in mass action, but have yet to succeed. The products are unloaded from a POS system (using a custom plugin) every 15 minutes. Would be great to massaction add characteristic AND variants to every product. If this can't be done, please identify database tables which need to be set to do this. Thank you.

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

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 5 months ago #236046

Hi,

There is no "order sample" button by default in HikaShop, so I'm not entirely sure of what you're talking about.

The system doesn't support characteristics or options selection on the listings of products. In only supports that on the product page.
So if you activate the display of add to cart buttons on the listings, it will either display the add to cart button if the product doesn't have characteristics/options, or it will display a "choose options" button which will direct to the product page when it does have characteristics or options.
Adding that capability on the listing is not impossible, but it would require a huge resources usage increase on the products listing and thus that's why we don't do it because the listing pages would likely crash due to the limitations of resources on the servers.
If you really want it, it's always possible to have a developer add that capability. I've seen it added on a few websites with HikaShop before. It's just not simple as it requires a lot of queries to the database and processing that is done on the product page to be done on the listing, and more importantly, the characteristics/options system don't actually supprot being displayed several times on the same page, so it would require modifications of the HTML ids and javascript handling them.

There is no system to add characteristics to products through mass actions. But if you have a custom plugin, you can always add your own actions to the mass actions system. You can look at the code of the different plugins with "massaction" in their name and you'll see all the triggers of the mass actions system to add your own triggers/filters/actions to the system. You can virtually do any kind of processing with that as all the mass action system is build to work with plugins.
The tables involved are:
- hikashop_characteristic where the characteristics and the values are stored
- hikashop_product where the products data and the variants data are stored
- hikashop_variant which links products/variants with characteristics/characteristic values
There, the product has a link with each characteristic attached to it, and the default value of each of these characteristics. And the vairants have a link to each value of characteristic correspoding to them.

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

  • Posts: 8
  • Thank you received: 0
9 years 5 months ago #236070

If you look at the link, I had a programmer add the "Sample" button to the page. But you did answer the question and saved tons of time trying to configure the page to what we want ideally. So I imagine it's just a matter of configuring the product page to spec at this point. The programmer mentioned it would be possible to use a "related product" as a sample and have that for every product, but I believe this would double the size of the database and calls unnecessarily.

The site already pulls product info and images from the physical store's POS system using a custom plugin, so I will see if the programmer can add that additional function. I thought I could do it from the admin area using massaction but it's fine if I can't do it that way.

I guess I haven't been able to find where the values are located in the product table, which is why my efforts are thwarted when I have attempted to add characteristic/variant to all products through the database. I'll look again and see if I can't locate it, now that I know it's there somewhere. Thank you very much for your help.

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

  • Posts: 8
  • Thank you received: 0
9 years 5 months ago #236076

I added variants to all products using the database. Now it will show "add sample" on the product page, but it displays

Limit reached. You can't add the product:


I went back to the same product, and added variants manually, it now works.

I compared the product tables, before and after getting the "add sample" to work. They are identical. I compared the variant table, it is the same, before and after. The "characteristic" table hasn't changed either. Is there some hidden table I am not seeing? it is not exactly feasible to add variants to all 8,000 products manually, so I must find a solution within the database. Thank you in advance.

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

  • Posts: 8
  • Thank you received: 0
9 years 5 months ago #236078

Nevermind, just answered my own question. I did not realize variations are treated as separate products. So each variation adds a product to the database. Wow.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum