Closed (fixed)
Project:
Ubercart Discounts (Alternative)
Version:
6.x-1.0-beta27
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 May 2009 at 01:15 UTC
Updated:
2 Apr 2012 at 09:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
adrianmak commentedor $product_table .= '' . uc_currency_format($product->$discounted_price) . '';
I got
Fatal error: Cannot access empty property in C:\wamp\www\roundbaby2\sites\all\modules\ubercart\uc_catalog\uc_catalog.module on line 719
I tried to print_r($product) and cannot find a discounted_price and another codeless field in $product object
Comment #2
ryangroe commentedThe discounted price is always calculated. Use this:
$discounted_price = theme("get_discounted_price", $node);
if ( is_null($discounted_price) )
{
//no discount
}
Comment #3
adrianmak commentedI tried your code but nothing print out.
I simplified the code for no checking and print variable no matter is null.
nothing output even the product has discounted.
Comment #4
ryangroe commentedThis seemed to work for me:
function phptemplate_uc_catalog_product_grid($products)
{
$s = "";
foreach ($products as $nid)
{
$product = node_load($nid);
$discounted_price = theme("get_discounted_price", $product);
$s .= $nid . ":" . $discounted_price . "<br/>";
}
return $s;
}
Can you drop this in and see if it works? If it doesn't we debug further to figure out why.
Comment #5
adrianmak commentedryangroe,
code works now.
I'm very appreciate your efforts made on this module.
Comment #6
ryangroe commentedI'm happy to help :)
Comment #7
ryangroe commentedI'm going to mark this closed. If you have any more problems please re-open it.
Comment #8
vmed commentedhi there,
... i need the discount price in the field prijs ! , any idea how ???, i use the danland theme !
see attached image for my catalog page
thanks
johan