Category Archives: CMS

Drupal – Enable Quantity Field for Ubercart Add to cart form

Update @ 2015-04-27: There is a simpler way to achieve this without coding. Please refer to this comment.

In the Ubercart product page, the product quantity option in the add to cart form is hidden by default. If you want to allow user modifying the product quantity in the order, create a custom module and implement the following hook. Continue reading Drupal – Enable Quantity Field for Ubercart Add to cart form

Drupal – “Paypal does not allow your country of residence to ship to the country you wish to” in Ubercart Paypal Payment

If you get the following error whenever u try to complete the payment of PayPal Website Payment Standard.

  • Paypal does not allow your country of residence to ship to the country you wish to

Continue reading Drupal – “Paypal does not allow your country of residence to ship to the country you wish to” in Ubercart Paypal Payment

Drupal – Delete all orders in Ubercart

I have created so many testing orders in the Ubercart during the development. So before i migrate the site to production, i have to clear all the testing orders. This could be done by deleting the order one by one through the View orders page.

But i got more than 100 testing orders and obviously the above method is not clever enough. Continue reading Drupal – Delete all orders in Ubercart

Drupal – Cron problem with drupal_goto() in hook_nodeapi()

One day, i found the the Drupal cron job failed to run. There was no error log and after i clicked the run cron manually in the status report, it was redirected to a specific node. This redirection was previously added by me in hook_nodeapi() such that under certain conditions, that specific node is displayed. Continue reading Drupal – Cron problem with drupal_goto() in hook_nodeapi()