简体   繁体   English

Typo3 TCA定制表

[英]Typo3 TCA custom table

I have this situation, I have one offer, and that offer have n number of dates, and n number of options. 我有这种情况,我有一个要约,那个要约有n个日期,n个选项。 So I have two additional tables for offer. 因此,我还有另外两个表格要提供。 And third one, which is a price, but price depends of date, and offer. 第三个是价格,但价格取决于日期和要约。 And it is like this: 就像这样:

|         |  date 1  |  date 2  |  date 3  |
| offer 1 | price 11 | price 12 | price 13 |
| offer 2 | price 21 | price 22 | price 23 |
| offer 3 | price 31 | price 32 | price 33 |

Is there any way to create TCA custom field to insert all of this Price values at once? 有什么方法可以创建TCA自定义字段来一次插入所有这些Price值? So, basically I need one table with input fields and to store also uid of date and offer in it as reference. 因此,基本上,我需要一个带有输入字段的表,并存储日期的uid并在其中提供引用。

Make more than one table... Tables with dynamic col count are horrible bad to maintain. 制作多个表...具有动态列数的表很难维护。

Table Offer: 餐桌优惠:

uid | Name    | Desc
1   | offer1  | This is some cool shit
2   | offer2  | dsadsad
3   | offer3  | sdadsdsadsada

Table Date: 表格日期:

uid | date
1   | 12.02.2014
2   | 12.03.2014
3   | 20.03.2014

Table Prices: 价格表:

uid | date | offer | price
1   |    1 |     1 | price11
2   |    1 |     2 | price21
3   |    1 |     3 | price31
4   |    2 |     1 | price12
5   |    2 |     2 | price22
6   |    2 |     3 | price32
7   |    3 |     1 | price13
8   |    3 |     2 | price23
9   |    3 |     3 | price33

And then its straight forward... 然后直截了当...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM