Dynamic Drupal Dynamic Trading Positions

Is there a way by which I can programmatically update the list of LineItems selection options?

I am trying to create rows from data provided by site administrators.

If you go to http://178.79.128.76/coronet/node/78 , you will see 4 types of data: Date View , View Options , Add to Cart strong> and Show Times .

Show Times data is unique to each product. Each entry consists of a date and one or more times.

View options is the position, and I'm trying to populate it with data extracted from the Show Times field in the following format:

  • View Date 1 + ShowTime 1
  • Date Viewed 1 + ShowTime 2
  • Date Viewed 2 + ShowTime 1

Just to demonstrate my purpose, I filled out the above example data in my view position position using hook_form_alter - they actually do not work when you select and try to add a product.

+4
source share
1 answer

You can customize tables using the LineItem table, ViewDate table, and ShowTimes table. This will allow you to have a ViewDate collection with a foreign key in LineItem and a ShowTimes collection with a foreign key in ViewDate.

+1
source

Source: https://habr.com/ru/post/1483009/


All Articles