duananyu9231 2015-04-24 23:15
浏览 30
已采纳

重写Drupal产品标题选择列表

I run a popular Drupal website that caters for the clubbing market. I retail events on my site using Drupal Commerce

To create an event(product) I have set up these fields :

  • Event Title
  • Event Date
  • Event Price

When creating events, each event is a separate product with a different date.

Now on the node that lists that particular event, I title my products in a way so when select the event from the drop down select list it 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 I need is rewrite function:

Instead of adding the date in the product title every time, is the correct function to rewrite the product title in the drop down as to include the date variable and price like as 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.

  • 写回答

1条回答 默认 最新

  • dousi2553 2015-04-25 15:31
    关注

    You can try Automatic Entity Label module. It can be used to automatically generate, for example, node title, or product title, using tokens. You will need Token module as well.

    You will need to use something like that as a pattern for product title (pseudocode):

    [product:event_date] -- [product:event_title] -- [product:price]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失