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
Tag Archives: Ubercart
Drupal – Create PDF file with dompdf
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
Ubercart – Get the product picture
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.
Done =)
Ubercart – Theme cart view in cart page
We can theme the cart page by the theme_uc_cart_view_form() function. Implement it in your theme template.php. Continue reading
Drupal – Enable Quantity Field for Ubercart Add to cart form
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 – “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
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 – Add Extra Countries for Ubercart
By default, the Ubercart module provided a list of countries where you can add or remove them in Adminster -> Store administration -> Configuration -> Country settings.
If you cannot find the countries u need, there is an additional list of countries in the Ubercart website. Add them to your Drupal site as follow. Continue reading
Drupal – Disable the Collapsible in Ubercart Checkout Panes
By default, the panes in the checkout form are collapsible. if you want to remove the collapsible features, you could customize the theme_uc_cart_checkout_form($form) function in your theme template.php. Continue reading
Drupal – Fix Ubercart Error Messages
If you get a bunch of error messages after installing Ubercart as follow
- # Notice: Undefined index: #element_validate in summarize_form() (line 27 of /var/www/pressflow-6.20/sites/all/modules/ubercart/uc_store/includes/summaries.inc).
- # Notice: Undefined index: #type in summarize_element() (line 84 of /var/www/pressflow-6.20/sites/all/modules/ubercart/uc_store/includes/summaries.inc).
- # Notice: Undefined index: #type in summarize_element() (line 124 of /var/www/pressflow-6.20/sites/all/modules/ubercart/uc_store/includes/summaries.inc).
- …
No worry, these messages could be removed after modifying the error reporting setting in the php.ini. Continue reading