Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

pouyak

Archived
  • Posts

    45
  • Joined

  • Last visited

Posts posted by pouyak

  1. check the folder permissions on all of these folders: /images/products/women/short-sleeves/

    Make sure you have the correct permissions to allow a PHP script to write to it. Ask you host what the correct permissions should be (either 0755 or 0777). FileZilla (freeware) can set permissions for you.

     

    no luck, it doesn't work at all. any other suggestions?

  2. So, I don't understand, is everything fine now?

     

    This replacements make it possible to control via the AI admin the various places where images are displayed

     

    You can find the lightbox "on/off" at the bottom of your AI controls in Admin --> configuration --> additional Images

     

    Well i undo that update, cause that pretty much messed everything up.

    and the funny thing is AI control doesn't have lightbox on/off with it. which thats something i am finding weird.

    also i get a lot of this error, would you know why

     

    Error:

    " Error returned from alterimage class: 5

    Thumb file: ............................................/images/products/women/short-sleeves/D1001s.jpg could not be created.

    Error returned from alterimage class: 5

    Products Info file:.................................../images/products/women/short-sleeves/D1001m.jpg could not be created."

  3. What I see is that there are no images at all in product listings, just in the "whats new" module.

     

    About the product info images, in the women section the lightbox is loading but not showing the image. I can not tell you exactly whats going wrong, since you have a template.

     

    Do you have AI installed? Or just the lightbox effect? Can you turn it off? How is the behavior then?

     

    Hi

    Thank you for your help! your right the problem is from product listings. and i returned the file to original state and it works fine.

    I believe the problem begins when i did this.

     

    "You will need to look for this following text in a variety of files. This allows

    Additional Images better control over how the thumbs are displayed about the site.

     

     

    search for this:

    SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT

     

    Replace with this:

    (ADDIMAGES_RESTRICT_IMAGE_SIZE == 'true'?SMALL_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_IMAGE_SIZE == 'true'?SMALL_IMAGE_HEIGHT:'')

     

     

    You will find most of it in the product list files, box files, and a couple admin file:

    /catalog/products_new.php

    /catalog/reviews.php

    /catalog/shopping_cart.php

    /catalog/specials.php

    /catalog/admin/categories.php

    /catalog/admin/reviews.php

    /catalog/admin/specials.php

    /catalog/includes/boxes/reviews.php

    /catalog/includes/boxes/specials.php

    /catalog/includes/boxes/whats_new.php

    /catalog/includes/modules/also_purchased_products.php

    /catalog/includes/modules/new_products.php

    /catalog/includes/modules/product_listing.php"

     

    thats from upgrade to 2.1.1.....

    I do have have Additional Images installed, i begin from 2.1.0, upgrade to 2.1.1 then installed the lightbox, and then finally i installed lightbox effect in AI version 2.

     

    and btw, if i want to turn of lightbox, how do i do it? i check configuration and i couldn't find it there.

     

    Regards

  4. Hi everyone

    I hope someone would be able to help me, since this situation seems very weird.

    So here is the scoop.

     

    The product images in my Men, subcategories shows fine, but when it comes to Women subcategories it doesn't show.

     

    If you take a peek at www.parsuaclothing.com/store/

     

    you got to men's long sleeves, you will see the images showing there, but now if you were to switch to ladies, dresses or anything else nothing comes.

     

    if someone is able to help me, it would be awesome.

  5. Will installing the template wipe out my products I have entered? will ther be instructions how to install the template from the download

    ?

     

    I use monstertemplate...and at time it could be hard to do modifications on it, and it could be easy.

    From what i heard, from 3 series you can perform update of template without losing data. but then again like everyone says contact MonsterTemplate they will help you very well.

  6. Will installing the template wipe out my products I have entered? will ther be instructions how to install the template from the download

    ?

     

    I use monstertemplate...and at time it could be hard to do modifications on it, and it could be easy.

    From what i heard, from 3 series you can perform update of template without losing data. but then again like everyone says contact MonsterTemplate they will help you very well.

  7. Hi

     

    Thanks for helping. The only Settings I know are these 2 screens.

     

     

    Admin>Modules>Order Total

    ----------------------------------

    Enable discount coupon?

    true

     

    Sort Order

    5

     

    Display discount with minus (-) sign?

    false

     

    Display subtotal with applied discount?

    false

     

    Display tax in discount line?

    None

     

    Exclude product specials?

    false

     

    Random Code Length

    6

     

    Display discount total lines for each tax group?

    false

     

    Allow negative order total?

    false

     

    Use the language file to format display string?

    false

     

    Display Format for Order Total Line

    Discount Coupon

     applied

     

    Debug Mode

    false

     

    Admin>Catalog>Discount coupons

    ----------------------------------------

    Discount Coupons NOTICE: Click here to read the Discount Coupon Codes manual for help editing coupons.

     

    Coupon Code: save05

    Description: Save 5 percent off products

    Discount Amount: .05 Discount Type: percent

    For percentage or shipping discounts, enter a percentage as a decimal. Example: .10 for 10%

    Start Date: 7/16/2009

    End Date: 7/20/2009

    Max Use: 0

    Min Order: 0 Min Order Type:

    Number Available:

     

    Please Help

     

    Thanks!

     

    which package did you install? the latest one?

  8. Hi

     

    Thanks for the contribution, it is very nice and flexible add on.

     

    I am having a problem with the tax being calculated correctly. My state has a 6 percent tax and must be calculated from the subtotal + shipping, before a discount is applied. Taxes are calculated properly when I do not submit a coupon code and works fine with Discount Loyalty contribution.

     

    Here is example of what happens in checkout_confirmation.php using a 5 percent coupon.

     

    Sub-total: 135.20

    Shipping: 16.64

    Tax: 8.70

    Discount: 6.76

    Total: 153.78

     

    As you can see sub-total 135.20 + shipping 16.64 = 151.84. Then 151.84 x .06 tax rate = 9.11. When I use a coupon tax is 41 cents less.

     

    Please help!

     

    Thanks

     

    I am a pretty good code cut and paster and know a liitle programming.

     

    I have

     

    Discount coupon 3.34

    Oscommerce 2rc2a

     

     

    I think is because you have add discount tax...

     

    anyways

    the number is coming from this

    (subtotal + shipping ) - discount = answer

    answer * 0.06 = your tax

  9. anyone knows how to fix the following error caused by discount_coupon.php....

     

    Warning: Illegal offset type in /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php on line 361

     

    Warning: Illegal offset type in isset or empty in /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php on line 364

     

    Warning: Illegal offset type in /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php on line 365

     

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php:361) in /homepages/13/d269723143/htdocs/store/includes/functions/general.php on line 33

     

     

    <?php

    /*

    * discount_coupon.php

    * August 4, 2006

    * author: Kristen G. Thorson

    * ot_discount_coupon_codes version 3.0

    *

    *

    * Released under the GNU General Public License

    *

    */

     

     

    class discount_coupon {

     

    var $messages, $coupon, $applied_discount, $cart_info;

     

    function discount_coupon( $code, $delivery ) {

    $this->messages = array();

    $this->coupon = array();

    $this->applied_discount = array();

    $this->cart_info = array( 'valid_products' => array( 'count' => 0, 'line_items' => 0, 'total' => 0 ),

    'total_products' => array( 'count' => 0, 'line_items' => 0, 'total' => 0 ),

    'exclusions' => array() );

    $this->get_coupon( $code, $delivery );

    //get the module configuration values for debugging

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) {

    $check_values_query = tep_db_query( $sql = "SELECT configuration_key, configuration_value

    FROM " . TABLE_CONFIGURATION . "

    WHERE configuration_key LIKE 'MODULE_ORDER_TOTAL_DISCOUNT_COUPON%'

    OR configuration_key = 'DISPLAY_PRICE_WITH_TAX'

    OR configuration_key = 'MODULE_SHIPPING_TABLE_STATUS'

    OR configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING'" );

    while( $row = tep_db_fetch_array( $check_values_query ) ) {

    $this->message( 'INFO: '.$row['configuration_key'].' = '.$row['configuration_value'], 'debug' );

    }

    }

    }

     

    function verify_code() {

    //check the global number of discounts that may be used

    if( $this->coupon['coupons_number_available'] != 0 ) {

    $this->check_num_available();

    }

    //if coupons_max_use==0, then use is unlimited, otherwise, we need to verify the customer hasn't used this coupon more than coupons_max_use times

    if( $this->coupon['coupons_max_use'] != 0 ) {

    $this->check_coupons_max_use();

    }

    }

     

    function get_coupon( $code, $delivery ) {

    global $customer_id; //needed for customer_exclusions

    $check_code_query = tep_db_query( $sql = "SELECT dc.*

    FROM " . TABLE_DISCOUNT_COUPONS . " dc

    WHERE coupons_id = '".tep_db_input( $code )."'

    AND ( coupons_date_start <= CURDATE() OR coupons_date_start IS NULL )

    AND ( coupons_date_end >= CURDATE() OR coupons_date_end IS NULL )" );

    if( tep_db_num_rows( $check_code_query ) != 1 ) { //if no rows are returned, then they haven't entered a valid code

    $this->message( ENTRY_DISCOUNT_COUPON_ERROR ); //display the error message

    } else {

    //customer_exclusions

    $check_user_query = tep_db_query( $sql = 'SELECT dc2u.customers_id

    FROM '.TABLE_DISCOUNT_COUPONS_TO_CUSTOMERS.' dc2u

    WHERE customers_id='.(int)$customer_id.'

    AND coupons_id="'.tep_db_input( $code ).'"' );

    if( tep_db_num_rows( $check_user_query ) > 0 ) {

    $this->message( ENTRY_DISCOUNT_COUPON_ERROR ); //display the error message

    //use this to debug exclusions:

    //$this->message( 'Customer exclusion check failed' );

    }

    //shipping zone exclusions

    $check_user_query = tep_db_query($sql = 'SELECT dc2z.geo_zone_id

    FROM '.TABLE_DISCOUNT_COUPONS_TO_ZONES.' dc2z

    LEFT JOIN '.TABLE_ZONES_TO_GEO_ZONES.' z2g

    USING( geo_zone_id )

    WHERE ( z2g.zone_id='.(int)$delivery['zone_id'].' or z2g.zone_id = 0 or z2g.zone_id IS NULL )

    AND ( z2g.zone_country_id='.(int)$delivery['country_id'].' or z2g.zone_country_id = 0 )

    AND dc2z.coupons_id="'.tep_db_input( $code ).'"' );

     

    if (tep_db_num_rows( $check_user_query ) > 0 ) {

    $this->message( ENTRY_DISCOUNT_COUPON_ERROR ); //display the error message

    //use this to debug exclusions:

    //$this->message( 'Shipping Zones exclusion check failed' );

    }

    //end shipping zone exclusions

    $row = tep_db_fetch_array( $check_code_query ); //since there is one record, we have a valid code

    $this->coupon = $row;

    }

    }

     

    function check_coupons_min_order() {

    switch( $this->coupon['coupons_min_order_type'] ) {

    //minimum number of products:

    case 'quantity':

    global $cart;

    $total = $this->cart_info['valid_products']['count'];

    if( $this->coupon['coupons_min_order'] > $total ) { //make sure there are enough products in the cart

    $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_QUANTITY_ERROR, $this->coupon['coupons_min_order'] ) );

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $total='.$total, 'debug' );

    return false;

    }

    break;

    //minimum price:

    case 'price':

    default:

    global $order, $currencies;

    $total = $this->cart_info['valid_products']['total'];

    //if we display the subtotal without the discount applied, then just compare the subtotal to the minimum order

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' && $this->coupon['coupons_min_order'] > $total ) {

    $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_PRICE_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) ).'.' );

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $total='.$total, 'debug' );

    return false;

    //if we display the subtotal with the discount applied, then we need to compare the subtotal with the discount added back in to the minimum order

    } else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'true' ) {

    $subtotal = $total;

    foreach( $this->applied_discount as $discount ) {

    $subtotal += $discount;

    }

    if( $this->coupon['coupons_min_order'] > $subtotal ) {

    $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_PRICE_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) ).'.' );

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $subtotal='.$subtotal, 'debug' );

    return false;

    }

    }

    break;

    }

    return true;

    }

     

    function check_coupons_max_use() {

    global $customer_id;

    $check_use_query = tep_db_query($sql = "SELECT COUNT(*) AS cnt

    FROM ".TABLE_ORDERS." AS o

    INNER JOIN ".TABLE_DISCOUNT_COUPONS_TO_ORDERS." dc2o

    ON dc2o.orders_id=o.orders_id

    AND o.customers_id = '".(int)$customer_id."'

    AND dc2o.coupons_id='".tep_db_input( $this->coupon['coupons_id'] )."'");

    $use = tep_db_fetch_array( $check_use_query );

    //show error message if coupons_max_use is equal to the number of times this customer has used the code

    if( $this->coupon['coupons_max_use'] <= $use['cnt'] ) {

    $this->message( sprintf( ENTRY_DISCOUNT_COUPON_USE_ERROR, $use['cnt'], $this->coupon['coupons_max_use'] ) ); //display the error message for number of times used

    return false;

    }

    return true;

    }

     

    function check_num_available() {

    //count the number of times this coupon has been used

    $check_use_query = tep_db_query( $sql = 'SELECT COUNT(*) AS cnt

    FROM '.TABLE_DISCOUNT_COUPONS_TO_ORDERS.'

    WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' );

    $use = tep_db_fetch_array( $check_use_query );

    if( $this->coupon['coupons_number_available'] <= $use['cnt'] ) {

    $this->message( ENTRY_DISCOUNT_COUPON_AVAILABLE_ERROR ); //display error that this coupon is no longer valid

    return false;

    }

    return true;

    }

     

    function is_recalc_shipping() {

    global $order, $language;

     

    //calculate the order total:

    $order_total = $order->info['total'] - $order->info['shipping_cost'];

    if( DISPLAY_PRICE_WITH_TAX != 'true' ) $order_total -= $order->info['tax'];

     

    //check if there is free shipping

    if( strtolower(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING) == 'true' ) {

    include( DIR_WS_LANGUAGES.$language.'/modules/order_total/ot_shipping.php' );

    //if free shipping is enabled, make sure the discount does not bring the order total below free shipping limit

    if( $order->info['shipping_method'] == FREE_SHIPPING_TITLE ) { //if free shipping is the selected shipping method

    if( $order_total < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER ) { //if the discount lowers the total below the free shipping limit

    return true;

    }

    }

    }

     

    //check if table rate shipping has changed

    if( strtolower(MODULE_SHIPPING_TABLE_STATUS) == 'true' ) {

    include( DIR_WS_LANGUAGES.$language.'/modules/shipping/table.php' );

    if( substr($order->info['shipping_method'], 0, strlen(MODULE_SHIPPING_TABLE_TEXT_TITLE)) == MODULE_SHIPPING_TABLE_TEXT_TITLE && MODULE_SHIPPING_TABLE_MODE == 'price' ) {

    $table_cost = split( "[:,]", MODULE_SHIPPING_TABLE_COST );

    for( $i = 0; $i < count( $table_cost ); $i += 2 ) {

    if( $order_total <= $table_cost[$i] ) {

    $shipping = $table_cost[$i+1];

    break;

    }

    }

    if( $order->info['shipping_cost'] != $shipping ) { //if the discount lowers the total below the table rate

    return true;

    }

    }

    }

     

    return false;

    }

     

    function is_allowed_product( $product_id ) {

     

    //category exclusion

    if( !is_array( $this->cart_info['exclusions']['categories'] ) ) { //only create the array when we need to and only once

    //check to see if the product is in one of the limited categories

    $check_category_query = tep_db_query( $sql = 'SELECT categories_id

    FROM '.TABLE_DISCOUNT_COUPONS_TO_CATEGORIES.'

    WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' );

    $this->cart_info['exclusions']['categories'] = array();

    if( tep_db_num_rows( $check_category_query ) > 0 ) {

    //for each category, get all the child categories

    while( $categories = tep_db_fetch_array( $check_category_query ) ) {

    $this->cart_info['exclusions']['categories'][] = $categories['categories_id'];

    tep_get_subcategories( $this->cart_info['exclusions']['categories'], $categories['categories_id'] );

    }

    //$this->excluded_categories are all categories and subcategories excluded from use with the coupon code

    $this->cart_info['exclusions']['categories'] = array_unique( $this->cart_info['exclusions']['categories'] );

    }

    }

    if( count( $this->cart_info['exclusions']['categories'] ) > 0 ) {

    $c_path = tep_get_product_path( $product_id ); //get the product's cPath

    $this_products_catgeory_array = tep_parse_category_path( $c_path ); //convert the product's cPath into an array

    //if the product's cPath and the excluded categories array have elements in common, then the product is excluded

    $intersection = array_intersect( $this_products_catgeory_array, $this->cart_info['exclusions']['categories'] );

    if( is_array( $intersection ) && count( $intersection ) > 0 ) {

    //use this to debug exclusions:

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$category.' failed manufacturer exclusion check', 'debug' );

    return false;

    }

    }

    //end category exclusion

     

    //product exclusion

    if( !is_array( $this->cart_info['exclusions']['products'] ) ) { //only create the array when we need to and only once

    //check to see if the product is in one of the limited categories

    $check_product_query = tep_db_query( $sql = 'SELECT products_id

    FROM '.TABLE_DISCOUNT_COUPONS_TO_PRODUCTS.'

    WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' );

    $this->cart_info['exclusions']['products'] = array();

    if( tep_db_num_rows( $check_product_query ) > 0 ) {

    while( $products = tep_db_fetch_array( $check_product_query ) ) {

    $this->cart_info['exclusions']['products'][] = $products['products_id'];

    }

    }

    }

    if( count( $this->cart_info['exclusions']['products'] ) > 0 ) {

    if( in_array( $product_id, $this->cart_info['exclusions']['products'] ) ) {

    //use this to debug exclusions:

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product_id.' failed product exclusion check', 'debug' );

    return false;

    }

    }

    //end product exclusion

     

    //manufacturer exclusion

    if( !is_array( $this->cart_info['exclusions']['manufacturers'] ) ) { //only create the array when we need to and only once

    //check to see if the product is in one of the limited categories

    $check_manufacturer_query = tep_db_query( $sql = 'SELECT manufacturers_id

    FROM '.TABLE_DISCOUNT_COUPONS_TO_MANUFACTURERS.'

    WHERE coupons_id="'.tep_db_input( $this->coupon['coupons_id'] ).'"' );

    $this->cart_info['exclusions']['manufacturers'] = array();

    if( tep_db_num_rows( $check_manufacturer_query ) > 0 ) {

    while( $manufacturers = tep_db_fetch_array( $check_manufacturer_query ) ) {

    $this->cart_info['exclusions']['manufacturers'][] = $manufacturers['manufacturers_id'];

    }

    }

    }

    if( count( $this->cart_info['exclusions']['manufacturers'] ) > 0 ) {

    $check_manufacturer_query = tep_db_query( $sql = 'SELECT manufacturers_id

    FROM '.TABLE_PRODUCTS.'

    WHERE products_id="'.(int)$product_id.'"' );

    if( tep_db_num_rows( $check_manufacturer_query ) > 0 ) {

    $manufacturers = tep_db_fetch_array( $check_manufacturer_query );

    if( in_array( $manufacturers['manufacturers_id'], $this->cart_info['exclusions']['manufacturers'] ) ) {

    //use this to debug exclusions:

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product_id.' failed manufacturer exclusion check', 'debug' );

    return false;

    }

    }

    }

    //end manufacturer exclusion

     

    //specials exclusion

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_EXCLUDE_SPECIALS == 'true' ) {

    if( ( $special_price = tep_get_products_special_price( $product_id ) ) !== null ) {

    $this->cart_info['exclusions']['products'][] = $product_id;

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product_id.' failed specials exclusion check. Adding product to excluded products array.', 'debug' );

    return false;

    }

    }

    //end specials exclusion

     

    return true;

    }

     

    function is_exists_exclusions() {

    if( $this->cart_info['valid_products']['total'] != $this->cart_info['total_products']['total'] ) return true;

    if( $this->cart_info['valid_products']['count'] != $this->cart_info['total_products']['count'] ) return true;

    return false;

    }

     

    //this function is for tracking the product totals and count so that we can correctly calculate the discount

    function total_valid_products( $products = array() ) {

    global $cart;

    for( $i = 0; $i < count( $products ); $i++ ) {

    if (DISPLAY_PRICE_WITH_TAX == "true"){

    $product_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']);

    $price = ( tep_add_tax($products[$i]['price'], $product_tax) + $cart->attributes_price( $products[$i]['id'] ) ) * $products[$i]['quantity'];

     

    }else{

    $price = ( $products[$i]['price'] + $cart->attributes_price( $products[$i]['id'] ) ) * $products[$i]['quantity'];

    }

    $this->cart_info['total_products']['total'] += $price;

    $this->cart_info['total_products']['count'] += $products[$i]['quantity'];

    $this->cart_info['total_products']['line_items']++;

    if( $this->is_allowed_product( tep_get_prid( $products[$i]['id'] ) ) ) { //not an excluded product

    $this->cart_info['valid_products']['count'] += $products[$i]['quantity'];

    $this->cart_info['valid_products']['total'] += $price;

    $this->cart_info['valid_products']['line_items']++;

    }

    }

    }

     

    function calculate_discount( $product = array(), $current_product = 0 ) {

    if( !$this->is_allowed_product( tep_get_prid( $product['id'] ) ) ) { //check that the product isn't excluded

    $applied_discount = 0; //don't apply a discount

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Excluded product '.$product['id'].'. Discount of '.$applied_discount.' not applied.', 'debug' );

    } else {

    switch( $this->coupon['coupons_discount_type'] ) {

    case 'shipping':

    $applied_discount = 0;

    break;

    case 'fixed':

    //get the percentage of the total discount to apply to this item:

    $percentage_applied = $this->coupon['coupons_discount_amount'] / $this->cart_info['valid_products']['total'];

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Percentage of discount applied to product '.$product['id'].': '.$percentage_applied.'.', 'debug' );

    //calculate the applied discount:

    $applied_discount = $product['final_price'] - $percentage_applied;

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Fixed discount applied to product '.$product['id'].': '.$applied_discount.'.', 'debug' );

    //this section is to make sure that both the fixed discount and the tax are correct:

    if( $this->cart_info['valid_products']['line_items'] == ( $current_product + 1 ) ) {

    $difference = $this->coupon['coupons_discount_amount'] - ( array_sum( $this->applied_discount ) + $applied_discount );

    if( $difference != 0 ) {

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Fixed adjustment for product '.$product['id'].': difference: '.$difference.' unadjusted applied_discount: '.$applied_discount, 'debug' );

    $applied_discount += $difference;

    }

    } //end code to ensure accurate fixed discount and tax

    break;

    case 'percent':

    $applied_discount = $product['final_price'] * $this->coupon['coupons_discount_amount'] * $product['qty'];

    break;

    }

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Product '.$product['id'].' passed exclusion check. Discount '.$applied_discount.' applied. ('.$this->coupon['coupons_discount_type'].')', 'debug' );

    }

     

    //now determine how we need to handle tax:

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_TAX != 'None' ) {

    $discount_tax = $this->apply_tax( $applied_discount, $product['tax'], false, true ) - $applied_discount;

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Tax not applied to product '.$product['id'].': '.$discount_tax, 'debug' );

    } else $discount_tax = 0;

     

    //tally the discount tax amount for each tax group

    if( isset( $this->discount_tax[$product['tax_description']] ) ) $this->discount_tax[$product['tax_description']] += $discount_tax;

    else $this->discount_tax[$product['tax_description']] = $discount_tax;

     

    //tally the discount amount for each tax group

    if( isset( $this->applied_discount[$product['tax_description']] ) ) $this->applied_discount[$product['tax_description']] += $applied_discount;

    else $this->applied_discount[$product['tax_description']] = $applied_discount;

     

    $discount = array('applied_discount' => $applied_discount, 'discount_tax' => $discount_tax);

    return $discount;

    }

     

    function calculate_shown_price( $discount, $product ) {

    $actual_shown_price = null;

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Discount of '.( $discount['applied_discount'] + $discount['discount_tax'] ).' applied to product '.$product['id'].' ($'.$product['final_price'] * $product['qty'].').', 'debug' );

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) {

    //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax

    $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] );

    $applied_discount = 0;

    $shown_price = $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty']; //$product['final_price'] * $product['qty'];

    } else {

    $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] );

    }

    //if we need to display the subtotal without the discount applied, then add the shown price to the subtotal, then change shown price to the price with the applied discount in order to properly calculate taxes

    if( !isset( $actual_shown_price ) ) $actual_shown_price = $shown_price;

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Calculating tax on '.$actual_shown_price.'. Displayed price '.$shown_price.'.', 'debug' );

     

    $shown_price_array = array( 'shown_price' => $shown_price, 'actual_shown_price' => $actual_shown_price );

    return $shown_price_array;

    }

     

    function finalize_discount( $info ) {

    //make sure we meet the order minimum

    if( !$this->check_coupons_min_order() ) {

    $this->applied_discount = array();

    if( $this->is_exists_exclusions() ) $this->message( ENTRY_DISCOUNT_COUPON_EXCLUSION_ERROR ); //add on to the min_order error message since we have excluded items

    }

    if( !$this->is_errors() ) { //if there are no errors, we can apply the discount

    if( $this->coupon['coupons_discount_type'] == 'shipping' ) { //discount shipping if the coupon type is shipping

    //bugfix by xinxi

    if($this->cart_info['valid_products']['count']>0){

    $this->applied_discount['shipping'] = $info['shipping_cost'] * $this->coupon['coupons_discount_amount'];

    $this->applied_discount['shipping'] = $this->applied_discount['shipping'];

    $info['total'] -= $this->applied_discount['shipping'];

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Shipping Discount of '.$this->applied_discount['shipping'].' applied.', 'debug' );

    }//end bugfix by xinxi

    } else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //subtract the discount from the order total if it's not displayed in the subtotal

    foreach( $this->applied_discount as $discount ) {

    $info['total'] -= $discount;

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Discount of '.$discount.' applied to order total.', 'debug' );

    }

    }

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_ALLOW_NEGATIVE == 'false' && $info['total'] < 0 ) $info['total'] = 0;

    }

    return $info['total'];

    }

     

    //this function is for making sure rounding doesn't happen except when desired

    function apply_tax( $price, $tax, $round = false, $force = false ) {

    if( DISPLAY_PRICE_WITH_TAX == 'true' || $force ) {

    if( $tax != 0 ) $price = tep_add_tax( $price, $tax );

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Applied tax of '.$tax.' to: '.$price, 'debug' );

    }

    if( $round ) {

    global $currencies;

    $price = tep_round( $price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'] );

    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Rounded price: '.$price, 'debug' );

    }

    return $price;

    }

     

    function format_display( $tax_group = '' ) {

    global $order, $currencies;

     

    //if using multiple languages, get the language format string from the proper language file, otherwise, use the module configuration field

    $display = ( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_USE_LANGUAGE_FILE == 'true' ? MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_FILE : MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_CONFIG );

     

    switch( $this->coupon['coupons_discount_type'] ) {

    case 'shipping':

    $discount_amount = ( $this->coupon['coupons_discount_amount'] * 100 ).'% '.MODULE_ORDER_TOTAL_DISCOUNT_COUPON_TEXT_SHIPPING_DISCOUNT;

    break;

    case 'percent':

    $discount_amount = ( $this->coupon['coupons_discount_amount'] * 100 ).'%';

    break;

    case 'fixed':

    $discount_amount = $currencies->format( $this->coupon['coupons_discount_amount'] );

    break;

    }

     

    $min_order = ( $this->coupon['coupons_min_order'] != 0 ? ( $this->coupon['coupons_min_order_type'] == 'price' ? $currencies->format( $this->coupon['coupons_min_order'] ) : (int)$this->coupon['coupons_min_order'] ) : '' );

     

    //replace the variables with their proper values:

    $display = str_replace( '

    ', $this->coupon['coupons_id'], $display );

    $display = str_replace( '[discount_amount]', $discount_amount, $display );

    $display = str_replace( '[coupon_desc]', $this->coupon['coupons_description'], $display );

    $display = str_replace( '[min_order]', $min_order, $display );

    $display = str_replace( '[number_available]', $this->coupon['coupons_number_available'], $display );

    $display = str_replace( '[tax_desc]', $tax_group, $display );

    return $display;

    }

     

    function is_errors() {

    if( count( $this->messages['error'] ) > 0 ) return true;

    return false;

    }

     

    function message( $message, $error_level = 'error' ) {

    $this->messages[$error_level][] = $message;

    }

     

    function get_messages( $error_level = 'error' ) {

    if( $error_level == 'debug' ) return $this->messages;

    return $this->messages[$error_level];

    }

     

    }

    ?>

  10. I have bought oscommerce template and as you know they are very well changed around.

    I am having couple problems with installation.

    I appreciate if anyone could help me out.

     

    1. on the My Order History page, for every product, two item list pop up..

     

    EXAMPLE:

    ITEM 1

    ITEM 1 24.99

     

    and i am not able to choose return for any of them?

     

    2. Request for return doesn't return doesn't show up anywhere, other then in admin

     

    3. like i said my oscommerce is a template, so i would like to known for the latest know how to insert TRACK RETURN into a template.

    whats needs to be copied where.

     

    Anyone could help i would highly highly and very highly appreciate it.

     

    Regards

  11. product description is not showing at all...

    can anyone help me?

    i have attached the code.

    Regards

     

    <?php
    /*
     $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $
    
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2003 osCommerce
    
     Released under the GNU General Public License
    */
    
     require('includes/application_top.php');
    
     require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
    
     $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product_check = tep_db_fetch_array($product_check_query);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <script type="text/javascript" src="iepngfix_tilebg.js"></script>
    <style type="text/css">
    .ie6_png			 {behavior: url("iepngfix.htc") }
    .ie6_png img		{behavior: url("iepngfix.htc") }
    .ie6_png input		{behavior: url("iepngfix.htc") }
    </style>
    <!--[if IE]>
      <script type="text/javascript" src="ie_png.js"></script>
      <script type="text/javascript">
       ie_png.fix('.png');
      </script>
    <![endif]-->
    <script language="javascript"><!--
    function popupWindow(url) {
     window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
    izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
    e
    ft=150')
    }
    //--></script>
    </head>
    <body>
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    
    <!-- body //-->
    <table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">
    <tr>
    <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
    </table></td>
    <!-- body_text //-->
    <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
    
    
    
    <?php
     if ($product_check['total'] < 1) {
    ?>
    <?php echo tep_draw_top();?>
    
    <?php echo tep_draw_title_top();?>
    
    			<?php echo TEXT_PRODUCT_NOT_FOUND; ?>
    
    <?php echo tep_draw_title_bottom();?>
    
    <?php echo tep_draw1_top();?>
    
    <?php echo tep_draw_infoBox2_top();?>
    
    		<table border="0" width="100%" cellspacing="0" cellpadding="2">
    			<tr><td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td></tr>
    		</table>
    
    <?php echo tep_draw_infoBox2_bottom();?>
    
    <?php echo tep_draw1_bottom();?>
    
    <?php
     } else {
    // BOF: More Pics 6  Added: , p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    // EOF: More Pics 6
    $product_info = tep_db_fetch_array($product_info_query);
    
    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
    
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price2 = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    } else {
      $products_price2 = '<span class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</span>';
    }
    
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s>   <b class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</b>';
    } else {
      $products_price = '<b class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</b>';
    }
    
    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '<br> <span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }
    // BOF: More Pics 6
    
    $mopics_image_width = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:'');
    $mopics_image_height = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:'');
    
    if (MOPICS_SHOW_ALL_ON_PRODUCT_INFO=='true') {
    
      $mopics_output = '';
      $mo_row = 1;
      $mo_col = 1;
    
      $mopics_images = array();
      if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'true') { $mopics_images[] = $product_info['products_image']; }
      for ( $mo_item=1; $mo_item<7; $mo_item++ ) {
    	if (tep_not_null($product_info['products_subimage'.$mo_item])) { $mopics_images[] = $product_info['products_subimage'.$mo_item]; }
      }
      $mopics_count = sizeof($mopics_images);
    
      if ($mopics_count > 0) { 
    
    	$mopics_output .= '<table border="0" cellspacing="0" cellpadding="6" align="'.MOPICS_TABLE_ALIGNMENT.'">';
    
    	for ( $mo_item=0; $mo_item<$mopics_count; $mo_item++ ) {
    
    	  if ($mo_row<(MOPICS_NUMBER_OF_ROWS+1)) {
    		if ($mo_col==1) {$mopics_output.='<tr>'."\n";}
    
    		$mopics_output .= '			  <td align="center" class="smallText"><script language="javascript"><!--
    			document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>\');
    			//--></script><noscript>
    			  <a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], $product_info['products_name'], $mopics_image_width, $mopics_image_height, 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>
    			  </noscript></td>'."\n";
    
    		if ($mo_col==MOPICS_NUMBER_OF_COLS) { $mo_col=1; $mo_row++; $mopics_output.='</tr>'."\n"; } else { $mo_col++; }
    	  }
    
    	}
    
    	if ($mo_col!=1){ while (($mo_col++)<(MOPICS_NUMBER_OF_COLS+1)) { $mopics_output.='<td> </td>'; } $mopics_output.='</tr>'."\n"; }
    
    	$mopics_output .= '</table>'."\n"; 
    
      }
    
    }
    
    // EOF: More Pics 6
    
    ?>
    
    <?php echo tep_draw_top();?>
    
    <?php echo tep_draw_title_top();?>
    
    			<div class="left_part"><?php echo $breadcrumb->trail(' » ')?> »  <?php echo $products_name; ?></div><div class="right_part"><?php echo $products_price2; ?></div>
    
    <?php echo tep_draw_title_bottom();?>
    
    <?php echo tep_draw1_top();?>
    
    	<?php /*  echo tep_draw2_top();  */?>
    
    <?php /*  echo tep_pixel_trans();  */?>
    
    <?php
    // BOF: More Pics 6	ADDED to if statement:  && MOPICS_GROUP_WITH_PARENT == 'false'
    if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'false') {
    ?>
    	  <table border="0" cellspacing="0" cellpadding="2" align="right">
    		<tr>
    		  <td align="center" class="smallText">
    <script language="javascript"><!--
    document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>'; ?>');
    //--></script>
    <noscript>
    <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>'; ?>
    <?php // EOF: More Pics 6 ?>');
    //--></script>
    <noscript><?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' .  TEXT_CLICK_TO_ENLARGE . '</a>'; ?></noscript></div>	
    <div class="main"><div class="desc2">
    // BOF: More Pics 6
    if (MOPICS_TABLE_LOCATION=='above' && !empty($mopics_output)) {
      echo '		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    		<tr>
    		  <td align="center" class="smallText">'.$mopics_output.'</td>
    		</tr>
    	  </table>
    	   <br>'."\n";
    } else if (MOPICS_TABLE_LOCATION=='sides' && !empty($mopics_output)) {
      echo $mopics_output;
    }
    // EOF: More Pics 6
    
    <?php echo stripslashes($product_info['products_description']); ?></div><br>
    			  <br><div><?php echo $products_price?></div></div><br>
    <div style="clear:both;"></div>
    <?php
    }
    ?>
    
    
    	<?php /*  echo tep_draw2_bottom();  */?>
    
    <div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>
    
    	<?php echo tep_draw2_top(); ?>
    
    <?php
    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
    ?>
    
    
    	  <table border="0" cellspacing="4" cellpadding="2">
    		<tr>
    		  <td class="main" colspan="2"><strong class="strong"><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td>
    		</tr>
    <?php
      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
    	$products_options_array = array();
    	$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
    	while ($products_options = tep_db_fetch_array($products_options_query)) {
    	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
    	  if ($products_options['options_values_price'] != '0') {
    		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
    	  }
    	}
    
    	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
    	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
    	} else {
    	  $selected_attribute = false;
    	}
    ?>
    		<tr>
    		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
    		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
    		</tr>
    <?php
      }
    ?>
    	  </table>
    <?php 
    }
    // BOF: More Pics 6
    if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) {
      echo ' <br>
    	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    		<tr>
    		  <td align="center" class="smallText">'.$mopics_output.'</td>
    		</tr>
    	  </table>'."\n";
    }
    // EOF: More Pics 6
    ?>
    
    
    <?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
    $reviews = tep_db_fetch_array($reviews_query);
    if ($reviews['count'] > 0) {
    ?>
    <table cellpadding="0" cellspacing="4" border="0">
      <tr>
    	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    </table>
    <?php
    }
    
    if (tep_not_null($product_info['products_url'])) {
    ?>
    <table cellpadding="0" cellspacing="4" border="0">
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
      </tr>
    </table>
    
    <?php echo tep_pixel_trans();?>
    
    <?php
    }
    
    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
    ?>
    
    <?php echo tep_pixel_trans();?>
    
    <table cellpadding="0" cellspacing="4" border="0">	
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
      </tr>
    </table>
    <?php
    } else {
    ?>
    
    <?php echo tep_pixel_trans();?>
    
      <table cellpadding="0" cellspacing="4" border="0">   
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
      </tr>
    </table>
    <?php
    }
    ?>
    
    <?php echo tep_draw2_bottom(); ?>
    
    <?php echo tep_pixel_trans();?> 
    
    <div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>
    
    <?php echo tep_draw2_top(); ?>
    
    <?php echo tep_pixel_trans();?>
    <?php echo tep_pixel_trans();?>
    
    <?php  /* echo tep_draw_infoBox2_top(); */ ?>
    
    		<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>
    			<td class="main button_marg"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
    			<td class="main button_marg" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>
    		  </tr>
    		</table>
    
    <?php  /* echo tep_draw_infoBox2_bottom(); */ ?>
    
    	<?php echo tep_draw2_bottom(); ?>
    
    
    <?php echo tep_draw1_bottom();?>
    
    <?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
     }
    ?>
    
    <?php echo tep_draw_bottom();?>	
    
    </form></td>
    <!-- body_text_eof //-->
    <td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
    </table></td>
     </tr>
    </table>
    <!-- body_eof //-->
    
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

  12. production description is now showing at all...

    can anyone help me?

    i have attached the code.

    Regards

     

    <?php
    /*
     $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $
    
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2003 osCommerce
    
     Released under the GNU General Public License
    */
    
     require('includes/application_top.php');
    
     require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
    
     $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product_check = tep_db_fetch_array($product_check_query);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <script type="text/javascript" src="iepngfix_tilebg.js"></script>
    <style type="text/css">
    .ie6_png 			{behavior: url("iepngfix.htc") }
    .ie6_png img		{behavior: url("iepngfix.htc") }
    .ie6_png input		{behavior: url("iepngfix.htc") }
    </style>
    <!--[if IE]>
      <script type="text/javascript" src="ie_png.js"></script>
      <script type="text/javascript">
       ie_png.fix('.png');
      </script>
    <![endif]-->
    <script language="javascript"><!--
    function popupWindow(url) {
     window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
    izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
    ft=150')
    }
    //--></script>
    </head>
    <body>
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    
    <!-- body //-->
    <table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">
    <tr>
    <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
    </table></td>
    <!-- body_text //-->
    <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
    
    
    
    <?php
     if ($product_check['total'] < 1) {
    ?>
    <?php echo tep_draw_top();?>
    
    <?php echo tep_draw_title_top();?>
    
    			<?php echo TEXT_PRODUCT_NOT_FOUND; ?>
    
    <?php echo tep_draw_title_bottom();?>
    
    <?php echo tep_draw1_top();?>
    
    <?php echo tep_draw_infoBox2_top();?>
    
    		<table border="0" width="100%" cellspacing="0" cellpadding="2">
    			<tr><td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td></tr>
    		</table>
    
    <?php echo tep_draw_infoBox2_bottom();?>
    
    <?php echo tep_draw1_bottom();?>
    
    <?php
     } else {
    // BOF: More Pics 6  Added: , p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    // EOF: More Pics 6
    $product_info = tep_db_fetch_array($product_info_query);
    
    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
    
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price2 = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    } else {
      $products_price2 = '<span class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</span>';
    }
    
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s>   <b class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</b>';
    } else {
      $products_price = '<b class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</b>';
    }
    
    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '<br> <span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }
    // BOF: More Pics 6
    
    $mopics_image_width = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:'');
    $mopics_image_height = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:'');
    
    if (MOPICS_SHOW_ALL_ON_PRODUCT_INFO=='true') {
    
      $mopics_output = '';
      $mo_row = 1;
      $mo_col = 1;
    
      $mopics_images = array();
      if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'true') { $mopics_images[] = $product_info['products_image']; }
      for ( $mo_item=1; $mo_item<7; $mo_item++ ) {
    	if (tep_not_null($product_info['products_subimage'.$mo_item])) { $mopics_images[] = $product_info['products_subimage'.$mo_item]; }
      }
      $mopics_count = sizeof($mopics_images);
    
      if ($mopics_count > 0) { 
    
    	$mopics_output .= '<table border="0" cellspacing="0" cellpadding="6" align="'.MOPICS_TABLE_ALIGNMENT.'">';
    
    	for ( $mo_item=0; $mo_item<$mopics_count; $mo_item++ ) {
    
    	  if ($mo_row<(MOPICS_NUMBER_OF_ROWS+1)) {
    		if ($mo_col==1) {$mopics_output.='<tr>'."\n";}
    
    		$mopics_output .= '			  <td align="center" class="smallText"><script language="javascript"><!--
    			document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>\');
    			//--></script><noscript>
    			  <a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], $product_info['products_name'], $mopics_image_width, $mopics_image_height, 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>
    			  </noscript></td>'."\n";
    
    		if ($mo_col==MOPICS_NUMBER_OF_COLS) { $mo_col=1; $mo_row++; $mopics_output.='</tr>'."\n"; } else { $mo_col++; }
    	  }
    
    	}
    
    	if ($mo_col!=1){ while (($mo_col++)<(MOPICS_NUMBER_OF_COLS+1)) { $mopics_output.='<td> </td>'; } $mopics_output.='</tr>'."\n"; }
    
    	$mopics_output .= '</table>'."\n"; 
    
      }
    
    }
    
    // EOF: More Pics 6
    
    ?>
    
    <?php echo tep_draw_top();?>
    
    <?php echo tep_draw_title_top();?>
    
    			<div class="left_part"><?php echo $breadcrumb->trail(' » ')?> »  <?php echo $products_name; ?></div><div class="right_part"><?php echo $products_price2; ?></div>
    
    <?php echo tep_draw_title_bottom();?>
    
    <?php echo tep_draw1_top();?>
    
    	<?php /*  echo tep_draw2_top();  */?>
    
    <?php /*  echo tep_pixel_trans();  */?>
    
    <?php
    // BOF: More Pics 6	ADDED to if statement:  && MOPICS_GROUP_WITH_PARENT == 'false'
    if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'false') {
    ?>
    	  <table border="0" cellspacing="0" cellpadding="2" align="right">
    		<tr>
    		  <td align="center" class="smallText">
    <script language="javascript"><!--
    document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>'; ?>');
    //--></script>
    <noscript>
    <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>'; ?>
    <?php // EOF: More Pics 6 ?>');
    //--></script>
    <noscript><?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' .  TEXT_CLICK_TO_ENLARGE . '</a>'; ?></noscript></div>	
    <div class="main"><div class="desc2">
    // BOF: More Pics 6
    if (MOPICS_TABLE_LOCATION=='above' && !empty($mopics_output)) {
      echo '		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    		<tr>
    		  <td align="center" class="smallText">'.$mopics_output.'</td>
    		</tr>
    	  </table>
    	   <br>'."\n";
    } else if (MOPICS_TABLE_LOCATION=='sides' && !empty($mopics_output)) {
      echo $mopics_output;
    }
    // EOF: More Pics 6
    
    <?php echo stripslashes($product_info['products_description']); ?></div><br>
    			  <br><div><?php echo $products_price?></div></div><br>
    <div style="clear:both;"></div>
    <?php
    }
    ?>
    
    
    	<?php /*  echo tep_draw2_bottom();  */?>
    
    <div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>
    
    	<?php echo tep_draw2_top(); ?>
    
    <?php
    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
    ?>
    
    
    	  <table border="0" cellspacing="4" cellpadding="2">
    		<tr>
    		  <td class="main" colspan="2"><strong class="strong"><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td>
    		</tr>
    <?php
      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
    	$products_options_array = array();
    	$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
    	while ($products_options = tep_db_fetch_array($products_options_query)) {
    	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
    	  if ($products_options['options_values_price'] != '0') {
    		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
    	  }
    	}
    
    	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
    	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
    	} else {
    	  $selected_attribute = false;
    	}
    ?>
    		<tr>
    		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
    		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
    		</tr>
    <?php
      }
    ?>
    	  </table>
    <?php 
    }
    // BOF: More Pics 6
    if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) {
      echo ' <br>
    	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    		<tr>
    		  <td align="center" class="smallText">'.$mopics_output.'</td>
    		</tr>
    	  </table>'."\n";
    }
    // EOF: More Pics 6
    ?>
    
    
    <?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
    $reviews = tep_db_fetch_array($reviews_query);
    if ($reviews['count'] > 0) {
    ?>
    <table cellpadding="0" cellspacing="4" border="0">
      <tr>
    	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    </table>
    <?php
    }
    
    if (tep_not_null($product_info['products_url'])) {
    ?>
    <table cellpadding="0" cellspacing="4" border="0">
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
      </tr>
    </table>
    
    <?php echo tep_pixel_trans();?>
    
    <?php
    }
    
    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
    ?>
    
    <?php echo tep_pixel_trans();?>
    
    <table cellpadding="0" cellspacing="4" border="0">	
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
      </tr>
    </table>
    <?php
    } else {
    ?>
    
    <?php echo tep_pixel_trans();?>
    
      <table cellpadding="0" cellspacing="4" border="0">   
      <tr>
    	<td class="main"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
      </tr>
    </table>
    <?php
    }
    ?>
    
    <?php echo tep_draw2_bottom(); ?>
    
    <?php echo tep_pixel_trans();?> 
    
    <div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>
    
    <?php echo tep_draw2_top(); ?>
    
    <?php echo tep_pixel_trans();?>
    <?php echo tep_pixel_trans();?>
    
    <?php  /* echo tep_draw_infoBox2_top(); */ ?>
    
    		<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>
    			<td class="main button_marg"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
    			<td class="main button_marg" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>
    		  </tr>
    		</table>
    
    <?php  /* echo tep_draw_infoBox2_bottom(); */ ?>
    
    	<?php echo tep_draw2_bottom(); ?>
    
    
    <?php echo tep_draw1_bottom();?>
    
    <?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
     }
    ?>
    
    <?php echo tep_draw_bottom();?>	
    
    </form></td>
    <!-- body_text_eof //-->
    <td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
    </table></td>
     </tr>
    </table>
    <!-- body_eof //-->
    
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

  13. Hello Everyone

    i have gone through every single canadian tax contribution. i was wondering if someone could

    1. tell me which of the canadian tax contribution work better for them.

    2. since i got everything installed, and i have set my product to be taxable: why both of these scenario's happening to me

    a. why isnt my tax showing while is being calculated or

    b. it doesn't show up or gets calculated

    what could i be doing wrong?

  14. hello friends

    i installed the contribution, but now all i get is a white page! with no errors or anything.

    could someone help me and tell me whats wrong.

    i have attached the code below

     

    <?php
    /*
     $Id: $
    
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2007 osCommerce
    
     Released under the GNU General Public License
    */
    
    // start the timer for the page parse time log
     define('PAGE_PARSE_START_TIME', microtime());
    
    // set the level of error reporting
     error_reporting(E_ALL & ~E_NOTICE);
    
    // check support for register_globals
     if (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 4.3) ) {
    exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.');
     }
    
    // Set the local configuration parameters - mainly for developers
     if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');
    
    // include server parameters
     require('includes/configure.php');
    
     if (strlen(DB_SERVER) < 1) {
    if (is_dir('install')) {
      header('Location: install/index.php');
    }
     }
    
    // define the project version
     define('PROJECT_VERSION', 'osCommerce Online Merchant v2.2 RC1');
    
    // some code to solve compatibility issues
     require(DIR_WS_FUNCTIONS . 'compatibility.php');
    
    // set the type of request (secure or not)
     $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
    
    // set php_self in the local scope
     if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
    
     if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
     } else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
     }
    
    // include the list of project filenames
     require(DIR_WS_INCLUDES . 'filenames.php');
    
    // include the list of project database tables
     require(DIR_WS_INCLUDES . 'database_tables.php');
    
    // customization for the design layout
    //  define('BOX_WIDTH', 125);  how wide the boxes should be in pixels (default: 125)
    
    // include the database functions
     require(DIR_WS_FUNCTIONS . 'database.php');
    
    // make a connection to the database... now
     tep_db_connect() or die('Unable to connect to database server!');
    
    // set the application parameters
     $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
     while ($configuration = tep_db_fetch_array($configuration_query)) {
    define($configuration['cfgKey'], $configuration['cfgValue']);
     }
    
    // if gzip_compression is enabled, start to buffer the output
     if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {
    if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {
      if (PHP_VERSION >= '4.0.4') {
    	ob_start('ob_gzhandler');
      } else {
    	include(DIR_WS_FUNCTIONS . 'gzip_compression.php');
    	ob_start();
    	ob_implicit_flush();
      }
    } else {
      ini_set('zlib.output_compression_level', GZIP_LEVEL);
    }
     }
    
    // set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
     if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
    if (strlen(getenv('PATH_INFO')) > 1) {
      $GET_array = array();
      $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
      $vars = explode('/', substr(getenv('PATH_INFO'), 1));
      for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
    	if (strpos($vars[$i], '[]')) {
    	  $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
    	} else {
    	  $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
    	}
    	$i++;
      }
    
      if (sizeof($GET_array) > 0) {
    	while (list($key, $value) = each($GET_array)) {
    	  $HTTP_GET_VARS[$key] = $value;
    	}
      }
    }
     }
    
    // define general functions used application-wide
     require(DIR_WS_FUNCTIONS . 'general.php');
     require(DIR_WS_FUNCTIONS . 'html_output.php');
    
    // set the cookie domain
     $cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN);
     $cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH);
    
    // include cache functions if enabled
     if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php');
    
    // include shopping cart class
     require(DIR_WS_CLASSES . 'shopping_cart.php');
    
    // include navigation history class
     require(DIR_WS_CLASSES . 'navigation_history.php');
    
    // check if sessions are supported, otherwise use the php3 compatible session class
     if (!function_exists('session_start')) {
    define('PHP_SESSION_NAME', 'osCsid');
    define('PHP_SESSION_PATH', $cookie_path);
    define('PHP_SESSION_DOMAIN', $cookie_domain);
    define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);
    
    include(DIR_WS_CLASSES . 'sessions.php');
     }
    
    // define how the session functions will be used
     require(DIR_WS_FUNCTIONS . 'sessions.php');
    
    // set the session name and save path
     tep_session_name('osCsid');
     tep_session_save_path(SESSION_WRITE_DIRECTORY);
    
    // set the session cookie parameters
      if (function_exists('session_set_cookie_params')) {
    session_set_cookie_params(0, $cookie_path, $cookie_domain);
     } elseif (function_exists('ini_set')) {
    ini_set('session.cookie_lifetime', '0');
    ini_set('session.cookie_path', $cookie_path);
    ini_set('session.cookie_domain', $cookie_domain);
     }
    
    // set the session ID if it exists
      if (isset($HTTP_POST_VARS[tep_session_name()])) {
     tep_session_id($HTTP_POST_VARS[tep_session_name()]);
      } elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {
     tep_session_id($HTTP_GET_VARS[tep_session_name()]);
      }
    
    // start the session
     $session_started = false;
     if (SESSION_FORCE_COOKIE_USE == 'True') {
    tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);
    
    if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
      tep_session_start();
      $session_started = true;
    }
     } elseif (SESSION_BLOCK_SPIDERS == 'True') {
    $user_agent = strtolower(getenv('HTTP_USER_AGENT'));
    $spider_flag = false;
    
    if (tep_not_null($user_agent)) {
      $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
    
      for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
    	if (tep_not_null($spiders[$i])) {
    	  if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
    		$spider_flag = true;
    		break;
    	  }
    	}
      }
    }
    
    if ($spider_flag == false) {
      tep_session_start();
      $session_started = true;
    }
     } else {
    tep_session_start();
    $session_started = true;
     }
    
     if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) {
    extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);
     }
    
    // set SID once, even if empty
     $SID = (defined('SID') ? SID : '');
    
    // verify the ssl_session_id if the feature is enabled
     if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {
    $ssl_session_id = getenv('SSL_SESSION_ID');
    if (!tep_session_is_registered('SSL_SESSION_ID')) {
      $SESSION_SSL_ID = $ssl_session_id;
      tep_session_register('SESSION_SSL_ID');
    }
    
    if ($SESSION_SSL_ID != $ssl_session_id) {
      tep_session_destroy();
      tep_redirect(tep_href_link(FILENAME_SSL_CHECK));
    }
     }
    
    // verify the browser user agent if the feature is enabled
     if (SESSION_CHECK_USER_AGENT == 'True') {
    $http_user_agent = getenv('HTTP_USER_AGENT');
    if (!tep_session_is_registered('SESSION_USER_AGENT')) {
      $SESSION_USER_AGENT = $http_user_agent;
      tep_session_register('SESSION_USER_AGENT');
    }
    
    if ($SESSION_USER_AGENT != $http_user_agent) {
      tep_session_destroy();
      tep_redirect(tep_href_link(FILENAME_LOGIN));
    }
     }
    
    // verify the IP address if the feature is enabled
     if (SESSION_CHECK_IP_ADDRESS == 'True') {
    $ip_address = tep_get_ip_address();
    if (!tep_session_is_registered('SESSION_IP_ADDRESS')) {
      $SESSION_IP_ADDRESS = $ip_address;
      tep_session_register('SESSION_IP_ADDRESS');
    }
    
    if ($SESSION_IP_ADDRESS != $ip_address) {
      tep_session_destroy();
      tep_redirect(tep_href_link(FILENAME_LOGIN));
    }
     }
    
    // create the shopping cart & fix the cart if necesary
     if (tep_session_is_registered('cart') && is_object($cart)) {
    if (PHP_VERSION < 4) {
      $broken_cart = $cart;
      $cart = new shoppingCart;
      $cart->unserialize($broken_cart);
    }
     } else {
    tep_session_register('cart');
    $cart = new shoppingCart;
     }
    
    // include currencies class and create an instance
     require(DIR_WS_CLASSES . 'currencies.php');
     $currencies = new currencies();
    
    // include the mail classes
     require(DIR_WS_CLASSES . 'mime.php');
     require(DIR_WS_CLASSES . 'email.php');
    
    // set the language
     if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
    if (!tep_session_is_registered('language')) {
      tep_session_register('language');
      tep_session_register('languages_id');
    }
    
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language();
    
    if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
      $lng->set_language($HTTP_GET_VARS['language']);
    } else {
      $lng->get_browser_language();
    }
    
    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
     }
    
    // include the language translations
     require(DIR_WS_LANGUAGES . $language . '.php');
    
    // currency
     if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {
    if (!tep_session_is_registered('currency')) tep_session_register('currency');
    
    if (isset($HTTP_GET_VARS['currency'])) {
      if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
    } else {
    /*Auto change currencies update from Koonuki Wear
    HTTP://WWW.THESEBWEB.COM
    Please visit our website if you like this contribution.*/	
    
    //INSERT YOUR DOMAIN URL HERE
    $site_name = "http://www.parsuaclothing.com";
    
    //Define function to get the 2 letter code of the country customer is from
    function getUserCountry() {
    $url = 'http://api.wipmania.com/'.$_SERVER['REMOTE_ADDR'].'?'.$site_name;
    $ch = curl_init();
    $headers = "Typ: phpcurl\r\n";
    $headers .= "Ver: 1.0\r\n";
    $headers .= "Connection: Close\r\n\r\n";
    $timeout = 5;
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array($headers));
    $content = curl_exec($ch);
    curl_close($ch);
    return $content;
    };
    
    
    //set variable to location
    $location = getUserCountry();
    
    //since it has not been determined, find the currency it needs to be changed to
    $currency_id_result=tep_db_query("SELECT countries_currencyid FROM countries WHERE countries_iso_code_2='".$location."'");
    while($currency_row=tep_db_fetch_array($currency_id_result)) {
    $currency_id=$currency_row['countries_currencyid'];
    };
    
    
    //create session variable to show that it has now been determined
    $currency=$currency_id;
    $_SESSION['locationset']=$location;
    $_SESSION['currency']=$currency;
    
    //END OF ALTERATIONS
    }
     }
    
    // navigation history
     if (tep_session_is_registered('navigation')) {
    if (PHP_VERSION < 4) {
      $broken_navigation = $navigation;
      $navigation = new navigationHistory;
      $navigation->unserialize($broken_navigation);
    }
     } else {
    tep_session_register('navigation');
    $navigation = new navigationHistory;
     }
     $navigation->add_current_page();
    
    // Shopping cart actions
     if (isset($HTTP_GET_VARS['action'])) {
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
      tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
    }
    
    if (DISPLAY_CART == 'true') {
      $goto =  FILENAME_SHOPPING_CART;
      $parameters = array('action', 'cPath', 'products_id', 'pid');
    } else {
      $goto = basename($PHP_SELF);
      if ($HTTP_GET_VARS['action'] == 'buy_now') {
    	$parameters = array('action', 'pid', 'products_id');
      } else {
    	$parameters = array('action', 'pid');
      }
    }
    switch ($HTTP_GET_VARS['action']) {
      // customer wants to update the product quantity in their shopping cart
      case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {
    							if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {
    							  $cart->remove($HTTP_POST_VARS['products_id'][$i]);
    							} else {
    							  if (PHP_VERSION < 4) {
    								// if PHP3, make correction for lack of multidimensional array.
    								reset($HTTP_POST_VARS);
    								while (list($key, $value) = each($HTTP_POST_VARS)) {
    								  if (is_array($value)) {
    									while (list($key2, $value2) = each($value)) {
    									  if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
    										$id2[$var[1]][$var[2]] = $value2;
    									  }
    									}
    								  }
    								}
    								$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';
    							  } else {
    								$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
    							  }
    							  $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
    							}
    						  }
    						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
    						  break;
      // customer adds a product from the products page
      case 'add_product' :	if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
    							$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
    						  }
    						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
    						  break;
      // performed by the 'buy now' button in product listings and review page
      case 'buy_now' :		if (isset($HTTP_GET_VARS['products_id'])) {
    							if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
    							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
    							} else {
    							  $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
    							}
    						  }
    						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
    						  break;
      case 'notify' :		 if (tep_session_is_registered('customer_id')) {
    							if (isset($HTTP_GET_VARS['products_id'])) {
    							  $notify = $HTTP_GET_VARS['products_id'];
    							} elseif (isset($HTTP_GET_VARS['notify'])) {
    							  $notify = $HTTP_GET_VARS['notify'];
    							} elseif (isset($HTTP_POST_VARS['notify'])) {
    							  $notify = $HTTP_POST_VARS['notify'];
    							} else {
    							  tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
    							}
    							if (!is_array($notify)) $notify = array($notify);
    							for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
    							  $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
    							  $check = tep_db_fetch_array($check_query);
    							  if ($check['count'] < 1) {
    								tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
    							  }
    							}
    							tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
    						  } else {
    							$navigation->set_snapshot();
    							tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
    						  }
    						  break;
      case 'notify_remove' :  if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {
    							$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
    							$check = tep_db_fetch_array($check_query);
    							if ($check['count'] > 0) {
    							  tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
    							}
    							tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
    						  } else {
    							$navigation->set_snapshot();
    							tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
    						  }
    						  break;
      case 'cust_order' :	 if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
    							if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
    							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
    							} else {
    							  $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
    							}
    						  }
    						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
    						  break;
    }
     }
    
    // include the who's online functions
     require(DIR_WS_FUNCTIONS . 'whos_online.php');
     tep_update_whos_online();
    
    // include the password crypto functions
     require(DIR_WS_FUNCTIONS . 'password_funcs.php');
    
    // include validation functions (right now only email address)
     require(DIR_WS_FUNCTIONS . 'validations.php');
    
    // split-page-results
     require(DIR_WS_CLASSES . 'split_page_results.php');
    
    // infobox
     require(DIR_WS_CLASSES . 'boxes.php');
    
    // auto activate and expire banners
     require(DIR_WS_FUNCTIONS . 'banner.php');
     tep_activate_banners();
     tep_expire_banners();
    
    // auto expire special products
     require(DIR_WS_FUNCTIONS . 'specials.php');
     tep_expire_specials();
    
    // calculate category path
     if (isset($HTTP_GET_VARS['cPath'])) {
    $cPath = $HTTP_GET_VARS['cPath'];
     } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {
    $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
     } else {
    $cPath = '';
     }
    
     if (tep_not_null($cPath)) {
    $cPath_array = tep_parse_category_path($cPath);
    $cPath = implode('_', $cPath_array);
    $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];
     } else {
    $current_category_id = 0;
     }
    
    // include the breadcrumb class and start the breadcrumb trail
     require(DIR_WS_CLASSES . 'breadcrumb.php');
     $breadcrumb = new breadcrumb;
    
     $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
     $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));
    
    // add category names or the manufacturer name to the breadcrumb trail
     if (isset($cPath_array)) {
    for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
      $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");
      if (tep_db_num_rows($categories_query) > 0) {
    	$categories = tep_db_fetch_array($categories_query);
    	$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
      } else {
    	break;
      }
    }
     } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {
    $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
    if (tep_db_num_rows($manufacturers_query)) {
      $manufacturers = tep_db_fetch_array($manufacturers_query);
      $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));
    }
     }
    
    // add the products model to the breadcrumb trail
     if (isset($HTTP_GET_VARS['products_id'])) {
    $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
    if (tep_db_num_rows($model_query)) {
      $model = tep_db_fetch_array($model_query);
      $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));
    }
     }
    
    // initialize the message stack for output messages
     require(DIR_WS_CLASSES . 'message_stack.php');
     $messageStack = new messageStack;
    
    // set which precautions should be checked
     define('WARN_INSTALL_EXISTENCE', 'true');
     define('WARN_CONFIG_WRITEABLE', 'true');
     define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
     define('WARN_SESSION_AUTO_START', 'true');
     define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
    ?>

  15. You messed up your tables... Reinstall or manually go back through the code and find where you made the mistake when you modified it.

     

    i didn't modify the code. i have attached the code on my couple post ago. and i did put in center_col but that has no luck in it? can you explain in more details what i should do?

  16. can someone tell me why my RMA return page is showing my RMA form on right side? i did put this "<table border="0" class="col_center">" in the body text. but no luck...

     

    <?php
    /*
     $id author Puddled Internet - http://www.puddled.co.uk
     email [email protected]
      osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
    
     Copyright (c) 2002 osCommerce
    
     Released under the GNU General Public License
    
    */
    
     require('includes/application_top.php');
    
    if (!tep_session_is_registered('customer_id')) {
     $navigation->set_snapshot();
     tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
     }
    
     require(DIR_WS_CLASSES . 'order.php');
     //check if order ID belongs to current customer!
     $order_and_customer_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS . " where  customers_id = '".$customer_id."' and orders_id = '".$HTTP_GET_VARS['order_id']."' OR orders_id = '".$HTTP_GET_VARS['oID']."'");
      if (tep_db_num_rows($order_and_customer_query)==0) {
    	tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
      }
      //eof check
     $order = new order($HTTP_GET_VARS['order_id']);
    // check to find out what thedefault reason for returning a product is
    $default_priority_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RETURN_REASON'");
    $default_priority = tep_db_fetch_array($default_priority_query);
    $default_refund_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_REFUND_METHOD'");
    $default_refund = tep_db_fetch_array($default_refund_query);
    
    
     if (!$HTTP_GET_VARS['action']){
      $HTTP_GET_VARS['action'] = 'new';
     }
    
     if ($HTTP_GET_VARS['action']) {
    switch ($HTTP_GET_VARS['action']) {
      case 'insert':
      case 'update':
    	 // carry out a query on all the existing orders tables, to get the required information
    	 $rma_create = tep_create_rma_value(11);
    	 $returns_status_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RETURN_STATUS_ID'");
    	 $default_return = tep_db_fetch_array($returns_status_query);
    	 $order_returns_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op where o.orders_id = op.orders_id and o.orders_id = '" . $HTTP_GET_VARS['oID'] . " ' and op.products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
    	 $orders_return = tep_db_fetch_array($order_returns_query);
    
    	 if ($HTTP_POST_VARS['returns_quantity'] > $orders_return['products_quantity']) {
    		 tep_redirect(tep_href_link(FILENAME_RETURN, 'error=yes&order_id=' . $HTTP_GET_VARS['oID'] . '&products_id=' . $HTTP_GET_VARS['products_id']));
    	 }
    
    	 $customers_id = $orders_return['customers_id'];
    	 $rma_value = tep_db_prepare_input($rma_create);
    	 $order_id = $HTTP_GET_VARS['oID'];
    	 $customers_name = $orders_return['customers_name'];
    	 $customers_acct = $orders_return['customers_acct'];
    	 $customers_company = $orders_return['customers_company'];
    	 $customers_street_address = $orders_return['customers_street_address'];
    	 $customers_suburb = $orders_return['customers_suburb'];
    	 $customers_city = $orders_return['customers_city'];
    	 $customers_postcode = $orders_return['customers_postcode'];
    	 $customers_state = $orders_return['customers_state'];
    	 $customers_country = $orders_return['customers_country'];
    	 $customers_telephone = $orders_return['customers_telephone'];
    	 $customers_fax = $orders_return['customers_fax'];
    	 $customers_email = $HTTP_POST_VARS['support_user_email'];
    	 $customers_address_format_id = $orders_return['customers_address_format_id'];
    	 $delivery_name = $orders_return['delivery_name'];
    	 $delivery_company = $orders_return['delivery_company'];
    	 $delivery_street_address = $orders_return['delivery_street_address'];
    	 $delivery_suburb = $orders_return['delivery_suburb'];
    	 $delivery_city = $orders_return['delivery_city'];
    	 $delivery_postcode = $orders_return['delivery_postcode'];
    	 $delivery_state = $orders_return['delivery_state'];
    	 $delivery_country = $orders_return['delivery_country'];
    	 $delivery_address_format_id = $orders_return['delivery_address_format_id'];
    	 $billing_name = $orders_return['billing_name'];
    	 $billing_acct = $orders_return['billing_acct'];
    	 $billing_company = $orders_return['billing_company'];
    	 $billing_street_address = $orders_return['billing_street_address'];
    	 $billing_suburb = $orders_return['billing_suburb'];
    	 $billing_city = $orders_return['billing_city'];
    	 $billing_postcode = $orders_return['billing_postcode'];
    	 $billing_state = $orders_return['billing_state'];
    	 $billing_country = $orders_return['billing_country'];
    	 $billing_address_format_id = $orders_return['billing_address_format_id'];
    	 $comments = tep_db_prepare_input($HTTP_POST_VARS['support_text']);
    	 $returns_status =  $default_return['configuration_value'];
    	 $returns_reason = tep_db_prepare_input($HTTP_POST_VARS['support_priority']);
    	 $products_model = $orders_return['products_model'];
    	 $products_name = $orders_return['products_name'];
    	 $products_price = $orders_return['products_price'];
    	 $products_tax = $orders_return['products_tax'];
    	 $discount_made = $orders_return['products_discount_made'];
    
    	 // work out price with tax
    	 $price_inc_tax = $products_price + tep_calculate_tax($products_price, $products_tax);
    	 $price_inc_quantity = $price_inc_tax * $HTTP_POST_VARS['returns_quantity'];
    	 $final_price =  $price_inc_quantity;
    	 $products_quantity = $HTTP_POST_VARS['returns_quantity'];// $orders_return['products_quantity'];
    	 $serial_number = $orders_return['products_serial_number'];
    	 $currency = $orders_return['currency'];
    	 $currency_value = $orders_return['currency_value'];
    	 $refund_method = $HTTP_POST_VARS['refund_method'];
    	 $support_error = false;
    // error checking goes in here
    // not present at moment
      $support_error = false;
    
      if (!$support_error) {
    	  $sql_data_array = array('customers_id' => $customers_id,
    							  'rma_value' => $rma_value,
    							  'order_id' => $order_id,
    							  'customers_name' => $customers_name,
    							  'customers_acct' => $customers_acct,
    							  'customers_company' => $customers_company,
    							  'customers_street_address' => $customers_street_address,
    							  'customers_suburb' => $customers_suburb,
    							  'customers_city' => $customers_city,
    							  'customers_postcode' => $customers_postcode,
    							  'customers_state' => $customers_state,
    							  'customers_country' => $customers_country,
    							  'customers_telephone' => $customers_telephone,
    							  'customers_fax' => $customers_fax,
    							  'customers_email_address' => $customers_email,
    							  'customers_address_format_id' => $customers_address_format_id,
    							  'delivery_name' => $delivery_name,
    							  'delivery_company' => $delivery_company,
    							  'delivery_street_address' => $delivery_street_address,
    							  'delivery_suburb' => $delivery_suburb,
    							  'delivery_city' => $delivery_city,
    							  'delivery_postcode' => $delivery_postcode,
    							  'delivery_state' => $delivery_state,
    							  'delivery_country' => $delivery_country,
    							  'delivery_address_format_id' => $delivery_address_format_id,
    							  'billing_name' => $billing_name,
    							  'billing_acct' => $billing_acct,
    							  'billing_company' => $billing_company,
    							  'billing_street_address' => $billing_street_address,
    							  'billing_suburb' => $billing_suburb,
    							  'billing_city' => $billing_city,
    							  'billing_postcode' => $billing_postcode,
    							  'billing_state' => $billing_state,
    							  'billing_country' => $billing_country,
    							  'billing_address_format_id' => $billing_address_format_id,
    							  'comments' => $comments,
    							  'returns_status' => $returns_status,
    							  'returns_reason' => $returns_reason,
    							  'currency' => $currency,
    							  'currency_value' =>$currency_value,
    							 );
    	  if ($HTTP_GET_VARS['action'] == 'insert') {
    		$insert_sql_data = array('date_purchased' => 'now()',
    								 );
    
    		// returns information table updated,
    		tep_db_perform(TABLE_RETURNS, $sql_data_array);
    		$ticket_id = tep_db_insert_id();
    
    	   // tep_db_query("insert into " . TABLE_RETURN_PAYMENTS . " values ('', '" . $ticket_id . "', '', '', '', '', '0.00')");
    
    		tep_db_perform(TABLE_RETURNS, $insert_sql_data, 'update', 'returns_id = \'' . $ticket_id . '\'');
    		  // now update returns products, and history tables
    		 $data_insert_sql = array('returns_id' => $ticket_id,
    								  'order_id' => $order_id,
    								  'products_id' => $HTTP_GET_VARS['products_id'],
    								  'products_model' =>$products_model,
    								  'products_name' => $products_name,
    								  'products_price' => $products_price,
    								  'products_discount_made' => $discount_made,
    								  'final_price' => $final_price,
    								  'products_tax' => $products_tax,
    								  'products_quantity' => $products_quantity,
    								  'products_serial_number' => $serial_number,
    								  );
    	  $returns_payment_sql = array('returns_id' => $ticket_id,
    								   'refund_payment_name' => $refund_method,
    								   'refund_payment_value' => $final_price,
    								   );
    
    		tep_db_perform(TABLE_RETURN_PAYMENTS, $returns_payment_sql);
    		tep_db_perform(TABLE_RETURNS_PRODUCTS_DATA, $data_insert_sql);
    		tep_db_query("UPDATE " . TABLE_ORDERS_PRODUCTS . " set products_returned = 1 where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
    
    	  }
    
    	  // Add returns status to returns status history table added 12-22-05
    	  tep_db_query("insert into " . TABLE_RETURNS_STATUS_HISTORY . " (returns_id , returns_status, date_added, customer_notified, comments) values ('" . $ticket_id . "','" .   $returns_status . "', now(), 1,'" . tep_db_input($comments) . "')");
    
    	  // now send email to customer
    
    	   require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN_EMAILS);
    	   $email_text = EMAIL_TEXT_TICKET_OPEN;
    	   $email_text .= EMAIL_THANKS_OPEN . EMAIL_TEXT_OPEN . EMAIL_CONTACT_OPEN . EMAIL_WARNING_OPEN;
    	   tep_mail($support_user_name, $support_user_email, EMAIL_SUBJECT_OPEN . ' #' . $rma_value, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    	  // send email to alternate address
    	   if (strlen($support_alternate_email) > 0) {
    			$email_text = EMAIL_TEXT_TICKET_OPEN;
    			$email_text .= EMAIL_THANKS_OPEN . EMAIL_TEXT_OPEN . EMAIL_CONTACT_OPEN . EMAIL_WARNING_OPEN;
    			tep_mail($support_user_name, $support_alternate_email, EMAIL_SUBJECT_OPEN . ' #' . $rma_value, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    		 }
    
    	  // now send an email to the default administrator to let them know of new ticket
    	   //  $default_admin_email = tep_db_query("SELECT admin_id FROM " . TABLE_SUPPORT_TICKETS . " where ticket_id = '" . $HTTP_GET_VARS['ticket_id'] . "' and customers_id = '" . $customer_id . "'");
    	   //  $default_email = tep_db_fetch_array($default_admin_email);
    	  //   $admin_email_query = tep_db_query("SELECT support_assign_email, support_assign_name FROM " . TABLE_SUPPORT_ASSIGN . " where support_assign_id = '" . $default_email['admin_id'] . "' and language_id = '" . $languages_id . "'");
    	  //   $admin_email = tep_db_fetch_array($admin_email_query);
    		 $email_text_admin = EMAIL_TEXT_TICKET_ADMIN;
    		 $email_text_admin .= EMAIL_THANKS_ADMIN . EMAIL_TEXT_ADMIN . EMAIL_CONTACT_ADMIN . EMAIL_WARNING_ADMIN;
    		 tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS , EMAIL_SUBJECT_ADMIN .' #' . $rma_value, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    
    	  // redirect to confirmation
    		tep_redirect(tep_href_link(FILENAME_RETURN . '?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id . '&order_id=' . $order_id));
    	} else {
    	  $HTTP_GET_VARS['action'] = 'new';
    	}
    	break;
       case 'default':
       tep_redirect(tep_href_link(FILENAME_DEFAULT));
       break;
    }
     }
     require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN);
     $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURN, '', 'NONSSL'));
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    
    <script language="javascript"><!--
    function popupWindow(url) {
     window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
    sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l
    eft=150')
    }
    //--></script>
    <script>
    var submitDone = false;
    
    function submitForm(myForm, button) {
    
      if (!submitDone) {
    	 submitDone = true;
    	 button.value = 'Please Wait';
    	 button.disabled = true;
    	 myForm.submit();
      }
      else {
    	alert ("Already submitted, please wait!");
      }
      return true;
    }
    </script>
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    
    <!-- body //-->
    <table border="0" class="col_center">
     <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
    </table></td>
    <!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
    	<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
    	  <tr>
    		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
    		<td align="right">
    
    </td>
    	  </tr>
    	</table></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    
    <tr>
    		<td><?php echo tep_draw_separator('pixel_trans.gif', '15', '15'); ?></td>
    </tr>
    <?php
    if ($HTTP_GET_VARS['action'] == 'sent'){
    	   $text_query = tep_db_query("SELECT * FROM " . TABLE_RETURNS_TEXT . " where return_text_id = '1' and language_id = '" . $languages_id . "'");
    	   $text = tep_db_fetch_array($text_query);
    
    	//   tep_db_query("INSERT into " . TABLE_RETURN_PAYMENTS . " values ('', '" . $HTTP_GET_VARS['id'] . "', '', '', '', '', '')");
    		 ?>
    	  <tr>
    	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	  <tr>
    		<td class="main"><?php new infoBox(array(array('text' => '<center><font color=cc0000 size=3px><b>' . TEXT_YOUR_RMA_NUMBER . $HTTP_GET_VARS['rma_value'] . '</b></font></center>'))); ?></td>
    	  </tr>
    	   <tr>
    		<td><?php echo tep_draw_separator('pixel_trans.gif', '20', '20'); ?></td>
    	  </tr>
    	  <tr>
    		<td class="main"><?php new infoBox(array(array('text' => nl2br($text['return_text_one'])))); ?></td>
    	  </tr>
    
    	 <tr>
    		<td align="right" vlaign=bottom><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
    	 </tr>
    	</table></td>
      </tr>
    
    
    	  <?
    } else// if ($HTTP_GET_VARS['action'] == 'new')
    {
    	 $account_query = tep_db_query("SELECT customers_firstname, customers_lastname, customers_email_address FROM " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");
    	 $account = tep_db_fetch_array($account_query);
    	 // query the order table, to get all the product details
    	 $returned_products_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where o.orders_id = op.orders_id and op.orders_id = '" . $HTTP_GET_VARS['order_id'] . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
    	 $returned_products = tep_db_fetch_array($returned_products_query);
    ?>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr><form name="longsubmit" action="return_product.php?action=insert&oID=<? echo $HTTP_GET_VARS['order_id'] . '&products_id=' . $HTTP_GET_VARS['products_id']; ?>" method=post>
    	<td><table border="0" cellspacing="0" cellpadding="2" width=100%>
    		 <?
    			  if (isset($error)=='yes') {
    			   ?> <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><? echo TEXT_ERROR; ?></b></td>
    		  </tr>
    
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	 <?
    echo '			  <tr>' . "\n" .
    	 '				<td class="main" align="left" width="100%">'. TEXT_ERROR_QUANTITY .'</td>' . "\n" .
    
    	 '			  </tr>' . "\n";
    
    	   ?>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
      <tr>
    		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '15'); ?></td>
    	  </tr>
    		  <?
    		  }
    		?>
    
    		<tr>
    	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	  <tr>
    		<td class="main" colspan="2"><b><?php echo TEXT_SUPPORT_RETURN_HEADING; ?></small></b></td>
    	  </tr>
    
    	</table></td>
      </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><?php echo TEXT_SUPPORT_PRODUCT_RETURN; ?></b><BR></td>
    		  </tr>
    
    
    
    		</table></td>
    		<td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
    		  <tr>
    			<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <?php
     if (sizeof($order->info['tax_groups']) > 1) {
    ?>
    			  <tr>
    				<td class="main" colspan="2"><b>Qty</b></td>
    
    				<td class="smallText" align="right"><b><?php echo HEADING_PRODUCTS; ?></b></td>
    				<td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>
    			  </tr>
    <?php
     } else {
    ?>
    			  <tr>
    				<td class="main"> </td>
    				<td class="main" colspan="2">    <b><?php echo HEADING_PRODUCTS; ?></b></td>
    			  </tr>
    <?php
     }
    
    //  $ordered_product_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " where order_id = '" . $HTTP_GET_VARS
    
    
    echo '		  <tr>' . "\n" .
    	 '			<td class="main" align="right" valign="top" width="30">' . tep_draw_input_field('returns_quantity', $returned_products['products_quantity'], 'size=5') . '</td>' . "\n" .
    	 '			<td class="main" valign="top">    ' . $returned_products['products_name'];
    
    
    echo '</td>' . "\n";
    echo '			<td class="main" align="right" valign="top">' . $currencies->format(($returned_products['products_price'] + (tep_calculate_tax(($returned_products['products_price']),($returned_products['products_tax'])))) * ($returned_products['products_quantity'])) . '</td>' . "\n" .
    	 '		  </tr>' . "\n";
    
    ?>
    			</table></td>
    		  </tr>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
    
    
    	<tr>
    		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '15'); ?></td>
    	  </tr>
    		  <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><?php echo TEXT_SUPPORT_BILLING_ADDRESS; ?></b></td>
    		  </tr>
    		  <tr>
    			<td class="main"> </td>
    		  </tr>
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	 <?
    echo '			  <tr>' . "\n" .
    	 '				<td class="main" align="left" width="5%"> </td>' . "\n" .
    	 '				<td class="main" align="left" width=95%>' . tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>') . '</td>' . "\n" .
    	 '			  </tr>' . "\n";
    	   ?>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
      <tr>
    		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    	  </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><?php echo TEXT_SUPPORT_DELIVERY_ADDRESS; ?></b></td>
    		  </tr>
    		  <tr>
    			<td class="main"> </td>
    		  </tr>
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	 <?
    echo '			  <tr>' . "\n" .
    	 '				<td class="main" align="left" width="5%"> </td>' . "\n" .
    	 '				<td class="main" align="left" width=95%>' . tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>') . '</td>' . "\n" .
    	 '			  </tr>' . "\n";
    	   ?>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
    
      <tr>
    		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    	  </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><?php echo TEXT_SUPPORT_USER_EMAIL; ?></b></td>
    		  </tr>
    
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	 <?
    echo '			  <tr>' . "\n" .
    	 '				<td class="main" align="left" width="5%"> </td>' . "\n" .
    	 '				<td class="main" align="left" width=95%>' . $account['customers_email_address'] . tep_draw_hidden_field('support_user_email', $account['customers_email_address']) . '</td>' . "\n" .
    	 '			  </tr>' . "\n";
    
    	   ?>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
      <tr>
    	<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><?php echo TEXT_WHY_RETURN; ?></b></td>
    		  </tr>
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    			<tr>
    		<td class=main width=5%> </td>
    		<td class="main" width=95%><?php //echo tep_draw_input_field('link_url'); ?>
    	  <?
    		$priority_query = tep_db_query("select return_reason_id, return_reason_name from ". TABLE_RETURN_REASONS . " where language_id = '" . $languages_id . "' order by return_reason_id desc");
    		$select_box = '<select name="support_priority"  size="' . MAX_MANUFACTURERS_LIST . '">';
    		 if (MAX_MANUFACTURERS_LIST < 2) {
    				 }
    		   while ($priority_values = tep_db_fetch_array($priority_query)) {
    			 $select_box .= '<option value="' . $priority_values['return_reason_id'] . '"';
    			 if ($default_priority['configuration_value'] ==  $priority_values['return_reason_id']) $select_box .= ' SELECTED';
    			 $select_box .= '>' . substr($priority_values['return_reason_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '</option>';
    		  }
    		 $select_box .= "</select>";
    		 $select_box .= tep_hide_session_id();
    		 echo $select_box;
    	  ?>
    		</td>
    	  </tr>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
    <!-- Begin refund method selection -->
      <tr>
    			<td class="main"> </td>
    		  </tr>
       <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><? echo TEXT_PREF_REFUND_METHOD; ?></b></td>
    		  </tr>
    		  <tr>
    			<td class="main"> </td>
    		  </tr>
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    			<tr>
    		<td class=main width=5%> </td>
    		<td class="main" width=95%><?php //echo tep_draw_input_field('link_url'); ?>
    	  <?
    		$refund_query = tep_db_query("select refund_method_id, refund_method_name from ". TABLE_REFUND_METHOD . " where language_id = '" . $languages_id . "' order by refund_method_id asc");
    		$select_box = '<select name="refund_method"  size="' . MAX_MANUFACTURERS_LIST . '">';
    		 if (MAX_MANUFACTURERS_LIST < 2) {
    				 }
    		   while ($refund_values = tep_db_fetch_array($refund_query)) {
    			 $select_box .= '<option value="' . $refund_values['refund_method_name'] . '"';
    			 if ($default_refund['configuration_value'] ==  $refund_values['refund_method_id']) $select_box .= ' SELECTED';
    			 $select_box .= '>' . substr($refund_values['refund_method_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '</option>';
    		  }
    		 $select_box .= "</select>";
    		 $select_box .= tep_hide_session_id();
    		 echo $select_box;
    	  ?>
    	  <br><br>
    	  <?
    	 $charge_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RESTOCK_VALUE'");
    	 $charge = tep_db_fetch_array($charge_query);
    // Don't show re-stocking info if it's set to zero in Admin > Configuration > Stock
    	  if ($charge['configuration_value'] != 0) {
    		echo TEXT_SUPPORT_SURCHARGE . $charge['configuration_value'] .'%' . TEXT_SUPPORT_SURCHARGE_TWO;
    		} ?>
    		</td>
    	  </tr>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
    <!-- End refund method selection -->
    			<tr>
    		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    	  </tr>
       <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td class="main"><b><?php echo TEXT_SUPPORT_TEXT; ?></b></td>
    		  </tr>
    		  <tr>
    			<td class="main"> </td>
    		  </tr>
    	   </table></td>
    		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	 <?
    echo '			  <tr>' . "\n" .
    	 '				<td class="main" align="left" width="5%"> </td>' . "\n" .
    	 '				<td class="main" align="left" width=95%>' . tep_draw_textarea_field('support_text', 'soft', '40', '7') . '</td>' . "\n" .
    	 '			  </tr>' . "\n";
    
    	   ?>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>
    			<tr>
    		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    	  </tr>
    
       </table></td>
      </tr>
      <tr>
    	<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
    	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    	  <tr>
    		<td colspan="2" class="main" valign="top" nowrap align="center">
    
    
    
    		<input type=submit value="Submit" onClick="return submitForm(document.longsubmit, this)"></td>
    	  </tr>
    	</table></td>
      </form></tr>
    <?php
    }
    ?>
    
    
    
    
    		 <!--
    
    		 -->
    
    		</td>
    	  </tr>
    	</table></td>
      </tr>
    
    </table></td>
    <!-- body_text_eof //-->
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
    </table></td>
     </tr>
    </table>
    <!-- body_eof //-->
    
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

  17. Yes you will need to install CCGV if you want to use gift certificates. Dunno about your double product thing, maybe you installed that part of the code twice or maybe the product has attributes?

     

     

     

    homewetbar

    do you have the most updated version of CCGV? my os commerce story is fully customized, so i need the custom installation instruction as well.

     

     

    also the tracking system and the return form is being displayed on the right side of the pages, do you know how i can get it to come to center part of the page??

×
×
  • Create New...