I have never tried to build a Drupal application with paid membership. Both Ubercart and Drupal Commerce provide membership subscription feature. This example is a proof of concept on implementing paid membership on Ubercart.
1. Enable the Roles module in Ubercart.
Continue reading Ubercart – Charge throught membership subscription on Drupal 7
Finally i could use the Go Daddy email account as relay using the SMTP Authentication Support module in Drupal. I can send the testing email but it doesn’t work for those email triggered by the Ubercart module. This is because Ubercart has it own mail system so you have to tweak the setting such that it use the SMTP module to send email. This can be done by the Mail System module.
1. Download and install the Mail System module.
2. Go to the setting page @ admin/config/system/mailsystem.
3. Update the Cart module class, Order module class and Store module class such that they all use the SmtpMailSystem rather than UbercartMailSystem.
Continue reading Drupal – Ubercart and SMTP Authentication Support
You can find the Ubercart invoice email template files @ sites/all/modules/ubercart/uc_order/templates. You could copy and edit the uc-order–customer.tpl.php to fit your needs but you could not select it @ E-mail customer checkout notification > Email an order invoice in Rules. This is because you have to implement the hook_uc_invoice_templates() before the new template is selectable.
Continue reading Drupal 7 – Customize Ubercart invoice email template
I am working on a Hotel Booking website. The booking feature is provided by Hotel Booking System for Ubercart. But this module is not actively maintained so there are some bugs which i have to fix it for myself.
One of the bug is about strtotime(‘+1 month’). Intuitively, you may think you could get a date of next month. But here comes the problem. Assume you are now on 31st Jan. Since February only has 28 days (sometimes 29), strtotime(‘+1 month’) will return 3rd Mar.
Continue reading PHP – Get the next month by strtotime
After you have enable the Product attribute module, you could adjust the SKU for products having different attributes. But there is no validation to check the SKU uniqueness. I try to enforce the checking by creating a custom module.
Continue reading Ubercart – Enforce unique SKUs in Attributes Adjustment
dompdf is a HTML to PDF converter in PHP. In the GShop project, I need it for sending email with PDF attachment by the Ubercart Conditional actions in Drupal. The following example is done in Drupal 6 with Ubercart.
1. Download and extract the dompdf library to <drupal>/sites/all/libraries.
Continue reading Drupal – Create PDF file with dompdf
You can get the product picture by the product node id using the following function
print uc_product_get_picture(<product node id>, 'cart');
you can use any other ImageCache settings by replacing the ‘cart’ parameter.
We can theme the cart page by the theme_uc_cart_view_form() function. Implement it in your theme template.php. Continue reading Ubercart – Theme cart view in cart page
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
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