Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#1515 by alpin3rocker
30 Mar 2015, 06:42
Hello,

I "played" a little around with Aimeos the last Days, and i'm very impressed. Thank you for this cool System!

How is the best method to make a reservation system for holiday flats or some Equipement to rent?
Is it a mixed form of a Extension and configuration in Typo3 Setup and Plugins? Or Is there any ready solution available?

Thank you for answer
#1516 by aimeos
30 Mar 2015, 09:01
alpin3rocker wrote:I "played" a little around with Aimeos the last Days, and i'm very impressed. Thank you for this cool System!


We are very pleased that it excelled your expectations :-)
What do you like most?

alpin3rocker wrote:How is the best method to make a reservation system for holiday flats or some Equipement to rent?
Is it a mixed form of a Extension and configuration in Typo3 Setup and Plugins? Or Is there any ready solution available?


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.
- In most cases there will be a fixed date or time ranges and only one customer can rent real estates at the same time. Thus, a selection product with one sub-product for each time frame and a stock level of "1" would fit best in this case. The (sub-)products should be created by a script to minimize the manual efforts. This solution also has the advantage that you can use different prices for main seasons like Christmas.

Both solutions can be implemented using only the Aimeos code. An additional TYPO3 extension would be only necessary to host a custom Aimeos extension and it can be generated here: http://aimeos.org/developer/extensions/

We are not aware that besides the last solution (which works out of the box) there's already an open source extension available. There seemed to be at least one web site in the past that offered such functionality but we don't know how they implemented it.
#1517 by aimeos
31 Mar 2015, 17:30
aimeos wrote:- In most cases there will be a fixed date or time ranges and only one customer can rent real estates at the same time. Thus, a selection product with one sub-product for each time frame and a stock level of "1" would fit best in this case. The (sub-)products should be created by a script to minimize the manual efforts. This solution also has the advantage that you can use different prices for main seasons like Christmas.


One more suggestion: To make things easy for customers, it would be best to implement a date selector instead of a drop-down. Details about extending the basket subpart are available at http://aimeos.org/docs/Configuration/Core/client/html/Adapt_catalog_detail#Basket_related_part
#1519 by alpin3rocker
06 Apr 2015, 07:33
Hello,
We are very pleased that it excelled your expectations :-)
What do you like most?

i like the Plugins with the configuration options with Typo-Script most.

i generated a extension and pasted the needed template files with the file structure in
Resources/Extension/myextension/client/html/layouts/catalog/detail/
and installed the Extension in Typo3.
In the Setup of the Shop-Page i made a new type for the selection template:
Code: Select allplugin.tx_aimeos.settings.client.html.catalog.detail.basket.selection.date = input


in the file basket-selection-body-default.html i paste after <?php if( $layout === 'radio' ) : ?>:
Code: Select all<?php   elseif( $layout === 'input' ) : ?>
            <ul class="select-list" data-index="<?php echo $index++; ?>">
<?php      foreach( $attrIds as $attrId => $position ) : ?>
<?php         if( isset( $attributes[$attrId] ) ) : ?>
               <li class="select-entry">
                                            <input class="select-option" id="option-<?php echo $enc->attr( $attrId ); ?>" name="<?php echo $enc->attr( $this->formparam( array( 'b_prod', 0, 'attrvarid', $code ) ) ); ?>" type="radio" value="<?php echo $enc->attr( $attrId ); ?>" <?php echo ( isset( $attrIds[$id] ) ? 'checked="checked"' : '' ); ?> />
                  <!--<input class="select" id="option-<?php echo $enc->attr( $attrId ); ?>" name="<?php echo $enc->attr( $this->formparam( array( 'b_prod', 0, 'attrvarid', $code ) ) ); ?>" type="text" value="" />-->
                  <label class="select-label" for="option-<?php echo $enc->attr( $attrId ); ?>">
                                                ' . $this->media( $item, $contentUrl, array( 'class' => 'media-item' ) ) . '
                                                <span><?php echo $enc->html( $attributes[$attrId]->getName() ); ?><input id="option-<?php echo $enc->attr( $attrId ); ?>" name="Verleihstart1" type="text" value=""></span><!--
                  --></label>
               </li>
<?php         endif; ?>
<?php      endforeach; ?>
            </ul>


in my "selection" Product assigned 4 Articles (day1, day2, day3, day4) with 2 attributes for each (duration and Startdate), the durations get a price
If the customer choose the duration the fitted field for the Startdate is showing and the user should pic a date.

Now the problem is, that i dont know if it is possible at that way or how i can pass the Value of the Startdate-input-field in to the Database and through the next order Steps.

Is there a possibility for a pdf invoice to the Customer or how would this be handled.


Thank you!
#1520 by aimeos
06 Apr 2015, 10:13
alpin3rocker wrote:in my "selection" Product assigned 4 Articles (day1, day2, day3, day4) with 2 attributes for each (duration and Startdate), the durations get a price
If the customer choose the duration the fitted field for the Startdate is showing and the user should pic a date.


Can you share a bit more information about your requirements? As far as I can see from your description, it wouldn't be possible to assign a stock level to your articles because in the end you only have a start date and a duration along with the product name and its price in your basket. Is that a problem in your case?

The duration is still a drop-down ? This value is already passed to the basket because of the
Code: Select allname="<?php echo $enc->attr( $this->formparam( array( 'b_prod', 0, 'attrvarid', $code ) ) ); ?>"

This creates a form parameter "...[b_prod][0][attrvarid][<code>]" that is understood by the basket. The 0 is the product number so you can add several products at once (0, 1, 2, ...) while the last two parts specify that "<code>" is used for determining the product variant (attrvarid) together with its value.

If the start date is a custom input field with arbitrary values, we have to extend the addProduct() method of the basket controller to allow such values and the basket standard HTML client to pass the data to the basket controller. The start date can be a single attribute of the selection product itself because we only need it displayed once. For the form parameter, the same name structure is used:
Code: Select allname="<?php echo $enc->attr( $this->formparam( array( 'b_prod', 0, 'attrcustid', $code ) ) ); ?>"

I've only used "attrcustid" here so we can distinguish the parameters in the basket standard HTML client.

alpin3rocker wrote:Is there a possibility for a pdf invoice to the Customer or how would this be handled.


Currently, the order is displayed on the confirmation page where it could be printed easily. Alternatively, you could add a section that creates a PDF file for the order on that page too or attach a generated PDF file to the e-mail.
#1521 by aimeos
06 Apr 2015, 17:39
alpin3rocker wrote:Now the problem is, that i dont know if it is possible at that way or how i can pass the Value of the Startdate-input-field in to the Database and through the next order Steps.


We've implemented custom attributes with arbitrary values in the latest core. That should be what you need get your reservation system up and running. The current demo data deals with texts but you can store dates as text as well.
Attachments
basket-detail.png
basket-detail.png (13.63 KiB) Viewed 2192 times
demo-product.png
demo-product.png (13.71 KiB) Viewed 2192 times
admin-interface.png
admin-interface.png (21.33 KiB) Viewed 2192 times
#1522 by alpin3rocker
07 Apr 2015, 13:19
Hello,

this looks good. Thank you a lot!
I tried to update/replace only the arcavias-core in the installed Aimeos extension Typo3 7.1.0.
After that i pressed the green update circle-button of Aimeos in Ext-Manager.
But the Frontend looks like in the Attachment. What is wrong? Or How should i do the update the right way?

Thank you!
Attachments
screen1.jpg
screen1.jpg (35.86 KiB) Viewed 2177 times
#1523 by alpin3rocker
07 Apr 2015, 13:26
from the Log, maybe it is helpful for you...

Core: Error handler (FE): PHP Catchable Fatal Error: Argument 2 passed to MW_View_Helper_Partial_Default::__construct() must implement interface MW_Config_Interface, none given, called in /user/www.domain.at/typo71/typo3conf/ext/aimeos/Resources/Libraries/arcavias/arcavias-core/lib/mwlib/src/MW/View/Default.php on line 57 and defined in /user/www.domain.at/typo71/typo3conf/ext/aimeos/Resources/Libraries/arcavias/arcavias-core/lib/mwlib/src/MW/View/Helper/Partial/Default.php line 32
#1524 by aimeos
07 Apr 2015, 14:23
alpin3rocker wrote:I tried to update/replace only the arcavias-core in the installed Aimeos extension Typo3 7.1.0.
After that i pressed the green update circle-button of Aimeos in Ext-Manager.
But the Frontend looks like in the Attachment. What is wrong? Or How should i do the update the right way?


You need the current TYPO3 code and the latest core because both need to play together.