superprg:
What did you try till now?
here i will explain you what i did.
visitor after coming to confirmation page,he sees his order details.let say he order sony camc one unit for $299.99.
what he sees here is
Qty. Item Name Total
1 X sony cam 299.99
when i go to the source of the confirmation page,i have seen these are retrived from the TABLE_ORDERS_PRODUCTS .(this work is done by includes/classes/order.php)
in the confirmation source i have seen there is a loop, in the case the visitor order more products i.e different kind products.
he loop will work to retrieve all product names and qty and total.
uptill here everything is fine.
in this loop i entered this code <?php
echo $order->url[$i]['products_url'];
?>
The above code will try to contact the order.php where i have written another code which will contact the TABLE_PRODUCTS_DESCRIPTION to get the products_url.
here is that code which i have written.
(the bellow code should be in includes/classes/order.php)
i am pasting all the code here the red color one is i have newely written.i am shortening the code,because this form is not allow too long message
<?php
function order($order_id = '') {
$this->info = array();
$this->totals = array();
$this->products = array();
$this->customer = array();
$this->delivery = array();
$this->url = array();
code will go on ,nothing chaged here-------------uptill the below.
$orders_products_query = "select orders_products_id, products_id, products_name,
products_model, products_price, products_tax,
products_quantity, final_price,
onetime_charges,
products_priced_by_attribute, product_is_free, products_discount_type,
products_discount_type_from
from " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . (int)$order_id . "'";
$orders_products = $db->Execute($orders_products_query);
$orders_url_query = "select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_name = '" . $orders_products->fields['products_name'] . "'";
$orders_url = $db->Execute($orders_url_query);
while (!$orders_products->EOF) {
// convert quantity to proper decimals - account history
if (QUANTITY_DECIMALS != 0) {
$fix_qty = $orders_products->fields['products_quantity'];
switch (true) {
case (!strstr($fix_qty, '.')):
$new_qty = $fix_qty;
break;
default:
$new_qty = preg_replace('/[0]+$/', '', $orders_products->fields['products_quantity']);
break;
}
} else {
$new_qty = $orders_products->fields['products_quantity'];
}
$new_qty = round($new_qty, QUANTITY_DECIMALS);
if ($new_qty == (int)$new_qty) {
$new_qty = (int)$new_qty;
}
$this->products[$index] = array('qty' => $new_qty,
'id' => $orders_products->fields['products_id'],
'name' => $orders_products->fields['products_name'],
'model' => $orders_products->fields['products_model'],
'tax' => $orders_products->fields['products_tax'],
'price' => $orders_products->fields['products_price'],
'final_price' => $orders_products->fields['final_price'],
'onetime_charges' => $orders_products->fields['onetime_charges'],
'products_priced_by_attribute' => $orders_products->fields['products_priced_by_attribute'],
'product_is_free' => $orders_products->fields['product_is_free'],
'products_discount_type' => $orders_products->fields['products_discount_type'],
'products_discount_type_from' => $orders_products->fields['products_discount_type_from']);
$subindex = 0;
$this->url[$index] = array('products_url' => $orders_url->fields['products_url']);
$subindex = 0;
$attributes_query = "select products_options_id, products_options_values_id, products_options, products_options_values,
options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
where orders_id = '" . (int)$order_id . "'
and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'";
code goes on uptill the end
------
after i have done this ,nothing is showing up in the confirmation page.
any help?
thanks
jeethoo