Quote Originally Posted by gilby View Post
You have extra single quotes (shown in red) which are causing problems in at least 2 places
Thank you so much. I look inside the file that contains the information but I am not sure if you see what's wrong below. I have pasted the three areas that could potentially have issues.
PHP Code:
if(zen_get_products_price_is_free($products_id)==false || REWARD_POINTS_ALLOW_ON_FREE=='1'// Allow RP on free items (Admin settable)
    
{
        
$sql "SELECT prp.point_ratio*p.products_price AS reward_points, prp.point_ratio, p.products_price, p.products_priced_by_attribute 
                FROM "
.TABLE_REWARD_MASTER." prp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c 
                WHERE p.products_id='" 
$products_id "'
                AND p2c.products_id='" 
$products_id "'
                AND ((prp.scope_id=p.products_id AND prp.scope='"
.SCOPE_PRODUCT."') 
                OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='"
.SCOPE_CATEGORY."')
                OR (prp.scope='"
.SCOPE_GLOBAL."'))
                ORDER BY prp.scope DESC LIMIT 1;"
;
    
        
$result=$db->Execute($sql); 
PHP Code:
$sql "SELECT prp.point_ratio 
            FROM "
.TABLE_REWARD_MASTER." prp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c 
            WHERE p.products_id='" 
$products_id "'
            AND p2c.products_id='" 
$products_id "'
            AND ((prp.scope_id=p.products_id AND prp.scope='"
.SCOPE_PRODUCT."') 
            OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='"
.SCOPE_CATEGORY."')
            OR (prp.scope='"
.SCOPE_GLOBAL."'))
            ORDER BY prp.scope DESC LIMIT 1;"
;
    
    
$result=$db->Execute($sql); 
PHP Code:
$sql "SELECT redeem_ratio 
            FROM "
.TABLE_REWARD_MASTER." prp, ".TABLE_CUSTOMERS." as c
            LEFT JOIN("
.TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing)
            WHERE c.customers_id='"
.(int)$customers_id."'
            AND ((prp.scope_id='"
.$customers_id."' AND prp.scope='".SCOPE_CUSTOMER."')
            OR (gp.group_id=c.customers_group_pricing AND prp.scope_id=gp.group_id AND scope='"
.SCOPE_GROUP."')
            OR (prp.scope='"
.SCOPE_GLOBAL."'))
            ORDER BY prp.scope DESC LIMIT 1;"


    
$result=$db->Execute($sql); 
I hope you or someone else sees what's wrong in the above and can guide me.

Thanks!