php - Rewrite Drupal product title select list -


i run popular drupal website caters clubbing market. retail events on site using drupal commerce

to create event(product) have set these fields :

  • event title
  • event date
  • event price

when creating events, each event separate product different date.

now on node lists particular event, title products in way when select event drop down select list reads;

product title(event name) -- event date

eg

  • boat party - 12/07/15
  • boat party - 13/07/15
  • boat party - 14/07/15
  • boat party - 15/07/15
  • boat party - 16/07/15

what need rewrite function:

instead of adding date in product title every time, correct function rewrite product title in drop down include date variable , price follows;

day,month -- product title(event title) -- price

eg;

  • 14th, may -- boat party -- £10
  • 15th, may -- boat party -- £10
  • 16th, may -- boat party -- £10
  • 17th, may -- boat party -- £10
  • 18th, may -- boat party -- £10

thank you.

you can try automatic entity label module. can used automatically generate, example, node title, or product title, using tokens. need token module well.

you need use pattern product title (pseudocode):

[product:event_date] -- [product:event_title] -- [product:price] 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -