Ubercart tips

Ubercart Error: handler for node_data_field_image_cache > field_image_cache_fid doesn't exist!

Error: handler for node_data_field_image_cache > field_image_cache_fid doesn't exist!

This is annoying thing when I have not enough time to do something..

I want display product image using view...

However, image field and file field have got some issue to display product image using CCK

 

This is googling result and I tried to sort it out... However

Finally, I decided to use

How to create CCK nodetype for Ubercart

Step1. Create class for products

Store administration > Products > Manage classes And then add class name e.g. class name: hardwareclass

Step2. Create Content types

Content type's name and Manage classes' name (not class ID) should be same...!!! Otherwise, taxonomy(category) doesn't show up

When you want to move to different page, you can use drupal_goto()

During developing Ubercart pxaccess code,

I used drupal_goto() function.
The reason of this, I need to redirect from my local server to payment gateway.
I think this is the handy way to redirect. ^^

API looks like this you can go to http://api.drupal.org/api/function/drupal_goto/5

 

How to get the default currency value for Ubercart?

You can grab default currency code from Ubercart easily

variable_get('uc_currency_code', 'USD');

uc_currency_code : this seems like variable's name

'USD' : default ISO
currency code.

if there is no default value, display 'USD'