Alter comments query to order by DESC
Drupal ordinary comment listing under nodes are ordered earliest first.(created ASC)
If you need to make it DESC, without using views:
Alter user profile page password fields in Drupal 7.x
The request seems simple, change the password field title in user edit form to “New Password” (or add placeholder etc)
From:
to:
Drupal commerce - 從代碼建立訂單
Drupal commerce 己經成為 Drupal 電子商務應用的主流了,ubercart 落伍了
Ubercart 是一個源自 Drupal5.x 世代的方案
而為了使用 Drupal7 方便的 entities,和令電子商務方案使用一個「弱品牌化」的名字,Drupal commerce 誕生了
但因為 Drupal commerce 龐大的代碼量,為了方便分散工作,代碼都打散到不同的模組,各自有他們的維護者
再加上為數不少的 dependencies 令上手的難度過大
所以 Drupal commerce kickstart 便將一個完整的電子商務網站包裝起來
只需要下載安裝,匯入範例便可以立即使用了
這次的開發和前一次類似,從代碼建立將貨物放到訂單:
Create Drupal commerce order programatically
Drupal commerce had become the major implementation of all-in-one ecommerce solution, from ubercart.
Ubercart was long from Drupal5.x era
To work with entities that build-in Drupal7, and also make Drupal's commerce solution brand-less, Drupal commerce was born.
Custom feeds tamper plugin
feeds tamper module can map multiple columns inside a CSV to the same field as multiple value
But there is a constraint, each field can only "rewrite" once
For example, convertabc.jpg
tosites/default/files/abc.jpg
and then multiple them intosites/default/files/abc.jpg,sites/default/files/def.jpg
Two rewrite is needed in this case
There is no solution from feeds tamper module, you can only use a full path inside the CSV to skip the first rewrtie
客製自定義 feeds tamper plugin
feeds tamper 是一個可以將多個 CSV column map 到同一個多值欄位 (multiple value) 的 module
但問題是使用 "rewrite" 只可以在一個 column 使用
例如要將:abc.jpg
變為sites/default/files/abc.jpg
再變為多值sites/default/files/abc.jpg,sites/default/files/def.jpg
就需要在 image 欄位使用兩次 rewrite
feeds tamper 無辦法解決,只可以在 CSV 上直接使用 full path
但把心一橫,自己寫一個對應 list 的 prefixer 都不是太難
將abc.jpg,def.jpg
變為sites/default/files/abc.jpg,sites/default/files/def.jpg
就只需要一次 rewrite 了