public function get_product_url($product_id, $default = null)
 {
     if (Cms_Theme::is_theming_enabled() && ($active_theme = Cms_Theme::get_active_theme())) {
         $page = Db_DbHelper::scalar("select url from pages inner join cms_page_references cpr on (pages.id = cpr.page_id)\n\t\t\t\t\twhere cpr.object_id=:product_id\n\t\t\t\t\tand object_class_name = 'Shop_Product'\n\t\t\t\t\tand reference_name = 'page_id'\n\t\t\t\t\tand page_id in (select id from pages where theme_id = :theme_id)", array('product_id' => $product_id, 'theme_id' => $active_theme->id));
         return $page;
     } else {
         return $default;
     }
 }