Jump to content

pouyak

Members
  • Content count

    45
  • Joined

  • Last visited

Everything posted by pouyak

  1. file was damaged, thats why...it was 5mb damged jpg. Thank you for your help. and all this time i though there was something wrong with the installation!! once again. thank you
  2. no luck, it doesn't work at all. any other suggestions?
  3. 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."
  4. 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
  5. 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.
  6. pouyak

    template from templatemonster

    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. pouyak

    template from templatemonster

    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.
  8. 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. Discount Coupon value gets added to the sub total rather then deduct from subtotal anyone knows how to fix this?
  10. 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
  11. pouyak

    [Contribution] MATC

    How do you install this contribuation for those who have customize (template) OSCOMMERCE?
  12. pouyak

    RMA Returns error for 2.2 MS2

    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
  13. http://img43.imageshack.us/img43/3771/picture5mni.png This is how it shows! so basically the fonts have to be smaller and the price has to be in red
  14. 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'); ?>
  15. 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'); ?>
  16. pouyak

    Canadian Tax

    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?
  17. 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'); ?>
  18. pouyak

    RMA Returns error for 2.2 MS2

    DUDE YOUR A GENIUSSSSSSSSSSSS !! THAT TOTALLY SOLVED MY PROBLEM!
  19. pouyak

    RMA Returns error for 2.2 MS2

    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?
  20. pouyak

    RMA Returns error for 2.2 MS2

    anyone can help me with my problem of having my form showing on the right side rather then center?? i have attached a image.
  21. pouyak

    RMA Returns error for 2.2 MS2

    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 support@puddled.co.uk 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'); ?>
  22. pouyak

    RMA Returns error for 2.2 MS2

    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??
  23. pouyak

    RMA Returns error for 2.2 MS2

    one more thing..where do you go to check the status of the return??
×