Page 2 of 2

Re: Reservation System

Posted: 18 Apr 2015, 12:25
by alpin3rocker
Hello,

to make a bookable article i use a selection-article with maybe 20 default-articles, one for each day and a different price for each article.
This is a lot of work to make 10-20 and more selection-articles and a default-article for each day..
How can this effort be minimized?

You wrote in one of your earlier posts:
The (sub-)products should be created by a script to minimize the manual efforts.
How can i do this?

Thank you!

Re: Reservation System

Posted: 18 Apr 2015, 12:48
by aimeos
alpin3rocker wrote: to make a bookable article i use a selection-article with maybe 20 default-articles, one for each day and a different price for each article. How can this effort be minimized?
First, you don't have to attach a price to each article if they are not all different. You can also assign the default price to the selection product itself. Then this priced will used as long as the selected article don't have it's own price.
alpin3rocker wrote: This is a lot of work to make 10-20 and more selection-articles and a default-article for each day..
You wrote in one of your earlier posts:
The (sub-)products should be created by a script to minimize the manual efforts.
How can i do this?
Now you need get a bit deeper into the data structures :-)

If you need to create those products or extend the list regularly, I would suggest to create a job controller in controller/jobs/src/Client/Html/Product/ that does this for you. You can use the MShop_Product_Manager_Factory::createManager() to return a product manager that can create items, populate it with your properties and save it to the database. The setup tasks for the "unitperf" site in lib/mshoplib/setup/unitperf are a good real world example for this.

If you simply want to do this once for a whole year, I would suggest to write a script that creates the SQL statements for inserting the articles into the database.

Re: Reservation System

Posted: 31 Mar 2020, 14:18
by trungdo
Hi @alpin3rocker
You have completed the project? :roll:

Re: Reservation System

Posted: 01 Apr 2020, 01:39
by trungdo
For time based offers, I think there are two ways how to deal with that:
- If the customer can freely choose any date or time range, an option would be to add a date selector as subpart in the catalog detail component and pass the date/dates to the basket as attribute. They should be stored as product attributes in the order.
Hi aimeos, please help me expanse the how to add date time picker or time range in attribute/option of product?
Thanks :roll:

Re: Reservation System

Posted: 01 Apr 2020, 07:29
by aimeos
In the "Options" panel of the product detail view in the admin interface add the "date" type with "custom date" attribute in the "Custom" section. Then, a date picker is shown in the product detail view for that product.

Re: Reservation System

Posted: 01 Apr 2020, 10:01
by trungdo
aimeos wrote: 01 Apr 2020, 07:29 In the "Options" panel of the product detail view in the admin interface add the "date" type with "custom date" attribute in the "Custom" section. Then, a date picker is shown in the product detail view for that product.
Hi,
Thanks for your response

And do you have a solution for case inventory for rental product ?
When a product is rented with the quantity is 2 , so inventory will minus 2. And when product returned, inventory will gain again is 2.

Thanks

Re: Reservation System

Posted: 02 Apr 2020, 15:37
by aimeos
When the products are returned, the shop owner must update the stock level in the admin interface again by adding those 2 items.

Re: Reservation System

Posted: 03 Apr 2020, 01:26
by trungdo
Hi aimeos,
I see that is confusing because the number of product in inventory will gain.
And could you help me expanse the Price type, I added new per day for Price type and set it for the product in Prices tab instead of Standard type. In the frontend, customer cannot Add to card this product and display error: Price item not available.
A don't know and do you have a solution for the price of rental product

Thanks so much.

Re: Reservation System

Posted: 04 Apr 2020, 08:37
by aimeos