Specific products listing display for weekly order

  • Posts: 6
  • Thank you received: 0
8 months 1 week ago #369635

-- HikaShop version -- : 6
-- Joomla version -- : 6
-- PHP version -- : 8

Hi,

I would like to create a specific products listing view allowing user to order products per week. Each day, the user can pick-up products (croissant, bread..) he wants to order for breakfast delivery.

First, the user pick-up a date and then a table is displayed.
- The columns headers are the days of the week,
- The rows headers are the available products.

The user can add quantity of product to the basket on each day.

What do you think is the best way to create this functionality ?
Thank you for your help.

Regards

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

  • Posts: 86050
  • Thank you received: 14178
  • MODERATOR
8 months 1 week ago #369637

Hi,

One solution would be to create two characteristics (menu Products>Characteristics):
- a characteristic "day of the week" with each day of the week as a value of the characteristic
- a characteristic "product" with a product for each value
Then, create your product "weekly order" and add both characteristics to it.
Then, under its "variants" tab, add the necessary variants to construct the table of combinations. You can edit each variant to configure its price, stock, image, etc.
Finally, in the HikaShop configuration page, set the "Characteristics selection method" setting to "Table":
www.hikashop.com/support/documentation/5...html#display_product
You can read more about characteristics / variants here:
www.hikashop.com/support/support/documen...html#characteristics
On the frontend, on the product page of that product, you'll get a 2D table with one radio for each variant, with the column being the days and the rows being the products.
Once you select a radio, you'll be able to enter the quantity and add the variant to the cart.

While this seems to me that it matches your requirements, I see a potential problem:
a product with more than a couple hundred variants will require a lot of resources to load the data on one page.
And since there are 7 days per week, it means that above ~2 dozens products, it will probably take too much to load the page, either taking too long, or crashing in the middle due to the restrictions imposed by the hosting. The number depends on your hosting so I can't say what it could be. Someone might be able to have 500 variants for a product, some will get a page crash above a 100.

An alternative is to use a listing of products like you're talking about in your message. This way, you can have pagination or infinite scroll, avoiding having to load too much data at once on a page.
Here is how I would see it in your case:
You could create a category "weekly order".
Then, create your products (croissant, bread, etc) and in their "categories" setting, select the "weekly order" category.
Then, create a custom field of the table "item" and of the type "single dropdown" via the menu Display>Custom fields. Use its "categories" restriction setting to select the "weekly order" category and make sure its "Front-end Product Listing" display setting is activated.
Then, create a menu item of the type "products listing" via the Joomla menu manager, and under its "products options" select the "weekly order" category in the "main category" setting and make sure the "Custom item fields", "Quantity field" and "Add to cart" display settings are activated.
On the frontend, you'll have a listing of the products and for each product in the listing, you'll have a dropdown to select the day, an input field for the qantity and the add to cart button.

While this doesn't match exactly the layout you envisioned in your message, it will allow you to sell weekly ordered products.

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

  • Posts: 6
  • Thank you received: 0
8 months 1 week ago #369669

Thank's a lot for your answer.

Using products variants could be the right solution. I have only few products (less than 20) so I might try this one. I'll just have to find a way to sepcify the number of the week concerned by the order.

Thank's again for your help.

Regards

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

  • Posts: 86050
  • Thank you received: 14178
  • MODERATOR
8 months 1 week ago #369673

For the number of weeks since you want it to be for the whole cart, I would recommend having a custom field of the table "order":
www.hikashop.com/support/documentation/4...shop-field-form.html
That way, the user will be able to select the number of weeks at the beginning of the checkout.
And you can use the cart fee plugin to calculate the "follow weeks amount" based on the total and the value selected in the custom order field: www.hikashop.com/marketplace/product/279-cart-fee.html

Last edit: 8 months 1 week ago by nicolas.

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

Time to create page: 0.043 seconds
Powered by Kunena Forum