|
@@ 246-253 (lines=8) @@
|
| 243 |
|
if (is_object($product)) { |
| 244 |
|
if ($product->getVar('product_online') && $product->getVar('product_stock') > 0) { |
| 245 |
|
$product_price = $product->getVar('product_price'); |
| 246 |
|
if ($h_oledrion_attributes->getProductAttributesCount($product->getVar('product_id')) > 0) { |
| 247 |
|
$criteria = new CriteriaCompo(); |
| 248 |
|
$criteria->add(new Criteria('attribute_product_id', $product->getVar('product_id'))); |
| 249 |
|
$attribute = $h_oledrion_attributes->getObjects($criteria, false); |
| 250 |
|
foreach ($attribute as $root) { |
| 251 |
|
$product_price = $root->getVar('attribute_default_value'); |
| 252 |
|
} |
| 253 |
|
} |
| 254 |
|
$ret = array( |
| 255 |
|
'product_id' => $product->getVar('product_id'), |
| 256 |
|
'product_price' => $product_price |
|
@@ 367-374 (lines=8) @@
|
| 364 |
|
// Get product |
| 365 |
|
$product = $h_oledrion_products->get($product_id); |
| 366 |
|
$product_price = $product->getVar('product_price'); |
| 367 |
|
if ($h_oledrion_attributes->getProductAttributesCount($product->getVar('product_id')) > 0) { |
| 368 |
|
$criteria = new CriteriaCompo(); |
| 369 |
|
$criteria->add(new Criteria('attribute_product_id', $product->getVar('product_id'))); |
| 370 |
|
$attribute = $h_oledrion_attributes->getObjects($criteria, false); |
| 371 |
|
foreach ($attribute as $root) { |
| 372 |
|
$product_price = $root->getVar('attribute_default_value'); |
| 373 |
|
} |
| 374 |
|
} |
| 375 |
|
if ($product->getVar('product_online') && $product->getVar('product_stock') > 0) { |
| 376 |
|
// Set parameter |
| 377 |
|
$password = md5(xoops_makepass()); |