Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

restomusclecar

Archived
  • Posts

    33
  • Joined

  • Last visited

Profile Information

  • Real Name
    jason

restomusclecar's Achievements

  1. [email protected]

    Hello.

    My Name is Betty Rabia i was impressed when i saw your profile at oscommerce.com and l will like you to email me back to my in box so that i can send you my picture for you to know who i am .i belive we can establish a long lasting relationship with you.In addition,i will like you to reply me through my private email box ([email protected]) This is...

  2. Not to hijack the thread but who designed your site? That looks great!
  3. Thats interesting , as I have been looking for this contribution. I will test tonight on a fresh install. I also may be able to intergrate the easy Populate contribution to export the data needed with this contribution and then send through turbo lister provided through ebay. I will let you know tommorrow.
  4. I cut and pasted my source code of the home page into my About me page of ebay and it worked. I only had to remove the line <base href="http://www.yoursite.com/"> due to ebay not agreeing. Add <div align="center"> before the first tag and </div> and the end. And finally add http://yoursite.com/ in front of every reference to images etc.. it looks great I wish there was a contribution for turbo lister to export my data from my site in the proper format for ebay turbo lister. Store is live!! Link below http://members.ebay.com/ws/eBayISAPI.dll?V...;userid=crresto
  5. Im looking for a contribution that if the weight exceeds a certain amount then it states '"Call for shipping quote" Anyone know what I can do? I have the easy populate module and it would be nice to just simply add a certain weight to the items i want to have "call for shipping quote" Any help would be greatly appreciated
  6. I cannot find the thread topic for the Automatic Thumbnail contribution. For some reason if I use the same image on the page more than once it turns the image grey. Anyone know the thread?
  7. Not to add fuel to a fire but I have installed this contribution and love it!!!!!!!!!!!!!!!!!! Want to thank the Author. Some small problems I had were my fault such as Making sure the length of product numbers were longer than 12 in both the database table and the easypopulate.php. I exported the data and it stripped the model numbers down to 12 characters. My images are formulated to the part numbers so once I imported the images dissapeared. Once I actually read the instructions :blush: All is good. I have imported over 600 products in 1 hour yesterday with no problems. What i like is the ability to cut and paste multiple products into other categories. I have products that go in two categories so its hard sometimes. Thanks again everyone.
  8. You are correct! I installed the contrib with the install instructions instead of overwriting the file. I used a file compare software and found the problem. I missed a simple ' Sorry for the delay in response. I truley appreciate your help, I just got frustrated and gave up a while. I now have over 6 contributions installed and working perfectly thanks to the members here. I will try my best to do the same on this site as others have.
  9. OK I fixed it! FYI Here is what happened... When executing the common.sql and the english.sql it did not add the Customer_Dummy_Account table add for some reason. But the php myadmin stated ok no problems. I created the table and tada! all is well on the above posts I stated the comments box was large. I fixed it and figured out why. I have the fixed width contrub. with no height so by removing the '60' and replacing the '5' with '8' it looks great Spoke with my hosting and they stated there was a scripting error in the sql query. I do want to thank the author of this contrib. It is a great addon for buyers. I can sleep now :D
  10. same error message for me but on preview of invoice or packing slip only its weird I dont see the name or address of the name of the lcient on the invoice or packig slip but it emails me the correct info. Its got to be an sql command
  11. ok im about to throw the towel in and call it a night. I keep getting this error while trying to retrieve an invoice or packing slip from the admin orders the file is order.php . Im really lost and need some help please. I will pay someone if need be. Please reply Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/homepw/public_html/restomusclecar.com/admin/includes/functions/database.php on line 99 Orders script from order.php <?php /* $Id: order.php 1750 2007-12-21 05:20:28Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ class order { var $info, $totals, $products, $customer, $delivery, $content_type; function order($order_id = '') { $this->info = array(); $this->totals = array(); $this->products = array(); $this->customer = array(); $this->delivery = array(); if (tep_not_null($order_id)) { $this->query($order_id); } else { $this->cart(); } } function query($order_id) { global $languages_id; $order_id = tep_db_prepare_input($order_id); // PWA BOF // added customers_dummy_account $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, customers_dummy_account, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); // PWA EOF $order = tep_db_fetch_array($order_query); $totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order"); while ($totals = tep_db_fetch_array($totals_query)) { $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']); } $order_total_query = tep_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_total'"); $order_total = tep_db_fetch_array($order_total_query); $shipping_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'"); $shipping_method = tep_db_fetch_array($shipping_method_query); $order_status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'"); $order_status = tep_db_fetch_array($order_status_query); $this->info = array('currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order_status['orders_status_name'], 'last_modified' => $order['last_modified'], 'total' => strip_tags($order_total['text']), 'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']))); $this->customer = array('name' => $order['customers_name'], 'company' => $order['customers_company'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => array('title' => $order['customers_country']), 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address'], // PWA BOF 'is_dummy_account' => $order['customers_dummy_account']); // PWA EOF $this->delivery = array('name' => trim($order['delivery_name']), 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'suburb' => $order['delivery_suburb'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => array('title' => $order['delivery_country']), 'format_id' => $order['delivery_address_format_id']); if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) { $this->delivery = false; } $this->billing = array('name' => $order['billing_name'], 'company' => $order['billing_company'], 'street_address' => $order['billing_street_address'], 'suburb' => $order['billing_suburb'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => array('title' => $order['billing_country']), 'format_id' => $order['billing_address_format_id']); $index = 0; $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']); $subindex = 0; $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { while ($attributes = tep_db_fetch_array($attributes_query)) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']); $subindex++; } } $this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1'; $index++; } } function cart() { global $HTTP_POST_VARS, $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $comments, $customer_default_address_id; $this->content_type = $cart->get_content_type(); if ( ($this->content_type != 'virtual') && ($sendto == false) ) { $sendto = $customer_default_address_id; } $customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, c.guest_account, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id"); $customer_address = tep_db_fetch_array($customer_address_query); if (is_array($sendto) && !empty($sendto)) { $shipping_address = array('entry_firstname' => $sendto['firstname'], 'entry_lastname' => $sendto['lastname'], 'entry_company' => $sendto['company'], 'entry_street_address' => $sendto['street_address'], 'entry_suburb' => $sendto['suburb'], 'entry_postcode' => $sendto['postcode'], 'entry_city' => $sendto['city'], 'entry_zone_id' => $sendto['zone_id'], 'zone_name' => $sendto['zone_name'], 'entry_country_id' => $sendto['country_id'], 'countries_id' => $sendto['country_id'], 'countries_name' => $sendto['country_name'], 'countries_iso_code_2' => $sendto['country_iso_code_2'], 'countries_iso_code_3' => $sendto['country_iso_code_3'], 'address_format_id' => $sendto['address_format_id'], 'entry_state' => $sendto['zone_name']); } elseif (is_numeric($sendto)) { $shipping_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$sendto . "'"); $shipping_address = tep_db_fetch_array($shipping_address_query); } else { $shipping_address = array('entry_firstname' => null, 'entry_lastname' => null, 'entry_company' => null, 'entry_street_address' => null, 'entry_suburb' => null, 'entry_postcode' => null, 'entry_city' => null, 'entry_zone_id' => null, 'zone_name' => null, 'entry_country_id' => null, 'countries_id' => null, 'countries_name' => null, 'countries_iso_code_2' => null, 'countries_iso_code_3' => null, 'address_format_id' => 0, 'entry_state' => null); } if (is_array($billto) && !empty($billto)) { $billing_address = array('entry_firstname' => $billto['firstname'], 'entry_lastname' => $billto['lastname'], 'entry_company' => $billto['company'], 'entry_street_address' => $billto['street_address'], 'entry_suburb' => $billto['suburb'], 'entry_postcode' => $billto['postcode'], 'entry_city' => $billto['city'], 'entry_zone_id' => $billto['zone_id'], 'zone_name' => $billto['zone_name'], 'entry_country_id' => $billto['country_id'], 'countries_id' => $billto['country_id'], 'countries_name' => $billto['country_name'], 'countries_iso_code_2' => $billto['country_iso_code_2'], 'countries_iso_code_3' => $billto['country_iso_code_3'], 'address_format_id' => $billto['address_format_id'], 'entry_state' => $billto['zone_name']); } else { $billing_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'"); $billing_address = tep_db_fetch_array($billing_address_query); } if ($this->content_type == 'virtual') { $tax_address = array('entry_country_id' => $billing_address['entry_country_id'], 'entry_zone_id' => $billing_address['entry_zone_id']); } else { $tax_address = array('entry_country_id' => $shipping_address['entry_country_id'], 'entry_zone_id' => $shipping_address['entry_zone_id']); } $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'currency' => $currency, 'currency_value' => $currencies->currencies[$currency]['value'], 'payment_method' => $payment, 'cc_type' => '', 'cc_owner' => '', 'cc_number' => '', 'cc_expires' => '', 'shipping_method' => $shipping['title'], 'shipping_cost' => $shipping['cost'], 'subtotal' => 0, 'tax' => 0, 'tax_groups' => array(), 'comments' => (tep_session_is_registered('comments') && !empty($comments) ? $comments : '')); if (isset($GLOBALS[$payment]) && is_object($GLOBALS[$payment])) { if (isset($GLOBALS[$payment]->public_title)) { $this->info['payment_method'] = $GLOBALS[$payment]->public_title; } else { $this->info['payment_method'] = $GLOBALS[$payment]->title; } if ( isset($GLOBALS[$payment]->order_status) && is_numeric($GLOBALS[$payment]->order_status) && ($GLOBALS[$payment]->order_status > 0) ) { $this->info['order_status'] = $GLOBALS[$payment]->order_status; } } $this->customer = array('firstname' => $customer_address['customers_firstname'], 'lastname' => $customer_address['customers_lastname'], 'company' => $customer_address['entry_company'], 'street_address' => $customer_address['entry_street_address'], 'suburb' => $customer_address['entry_suburb'], 'city' => $customer_address['entry_city'], 'postcode' => $customer_address['entry_postcode'], 'state' => ((tep_not_null($customer_address['entry_state'])) ? $customer_address['entry_state'] : $customer_address['zone_name']), 'zone_id' => $customer_address['entry_zone_id'], 'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']), 'format_id' => $customer_address['address_format_id'], 'telephone' => $customer_address['customers_telephone'], 'email_address' => $customer_address['customers_email_address'], // PWA BOF 2b 'is_dummy_account' => $customer_address['guest_account']); // PWA EOF 2b $this->delivery = array('firstname' => $shipping_address['entry_firstname'], 'lastname' => $shipping_address['entry_lastname'], 'company' => $shipping_address['entry_company'], 'street_address' => $shipping_address['entry_street_address'], 'suburb' => $shipping_address['entry_suburb'], 'city' => $shipping_address['entry_city'], 'postcode' => $shipping_address['entry_postcode'], 'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']), 'zone_id' => $shipping_address['entry_zone_id'], 'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']), 'country_id' => $shipping_address['entry_country_id'], 'format_id' => $shipping_address['address_format_id']); $this->billing = array('firstname' => $billing_address['entry_firstname'], 'lastname' => $billing_address['entry_lastname'], 'company' => $billing_address['entry_company'], 'street_address' => $billing_address['entry_street_address'], 'suburb' => $billing_address['entry_suburb'], 'city' => $billing_address['entry_city'], 'postcode' => $billing_address['entry_postcode'], 'state' => ((tep_not_null($billing_address['entry_state'])) ? $billing_address['entry_state'] : $billing_address['zone_name']), 'zone_id' => $billing_address['entry_zone_id'], 'country' => array('id' => $billing_address['countries_id'], 'title' => $billing_address['countries_name'], 'iso_code_2' => $billing_address['countries_iso_code_2'], 'iso_code_3' => $billing_address['countries_iso_code_3']), 'country_id' => $billing_address['entry_country_id'], 'format_id' => $billing_address['address_format_id']); $index = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); if ($products[$i]['attributes']) { $subindex = 0; reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $attributes_query = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes = tep_db_fetch_array($attributes_query); $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'], 'value' => $attributes['products_options_values_name'], 'option_id' => $option, 'value_id' => $value, 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']); $subindex++; } } $shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']); $this->info['subtotal'] += $shown_price; $products_tax = $this->products[$index]['tax']; $products_tax_description = $this->products[$index]['tax_description']; if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); if (isset($this->info['tax_groups']["$products_tax_description"])) { $this->info['tax_groups']["$products_tax_description"] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } else { $this->info['tax_groups']["$products_tax_description"] = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } } else { $this->info['tax'] += ($products_tax / 100) * $shown_price; if (isset($this->info['tax_groups']["$products_tax_description"])) { $this->info['tax_groups']["$products_tax_description"] += ($products_tax / 100) * $shown_price; } else { $this->info['tax_groups']["$products_tax_description"] = ($products_tax / 100) * $shown_price; } } $index++; } if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost']; } else { $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost']; } } } ?>
  12. ok it appears im talking to myself here but here goes. :blink: Another problem. version 2.0g When i go to print packing slip or invoice it gives me a sql error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/myhomepw/public_html/restomusclecar.com/admin/includes/functions/database.php on line 99 any ideas code below <?php /* $Id: database.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } function tep_db_close($link = 'db_link') { global $$link; return mysql_close($$link); } function tep_db_error($query, $errno, $error) { die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>'); } function tep_db_query($query, $link = 'db_link') { global $$link, $logger; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { if (!is_object($logger)) $logger = new logger; $logger->write($query, 'QUERY'); } $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { if (mysql_error()) $logger->write(mysql_error(), 'ERROR'); } return $result; } function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') { reset($data); if ($action == 'insert') { $query = 'insert into ' . $table . ' ('; while (list($columns, ) = each($data)) { $query .= $columns . ', '; } $query = substr($query, 0, -2) . ') values ('; reset($data); while (list(, $value) = each($data)) { switch ((string)$value) { case 'now()': $query .= 'now(), '; break; case 'null': $query .= 'null, '; break; default: $query .= '\'' . tep_db_input($value) . '\', '; break; } } $query = substr($query, 0, -2) . ')'; } elseif ($action == 'update') { $query = 'update ' . $table . ' set '; while (list($columns, $value) = each($data)) { switch ((string)$value) { case 'now()': $query .= $columns . ' = now(), '; break; case 'null': $query .= $columns .= ' = null, '; break; default: $query .= $columns . ' = \'' . tep_db_input($value) . '\', '; break; } } $query = substr($query, 0, -2) . ' where ' . $parameters; } return tep_db_query($query, $link); } function tep_db_fetch_array($db_query) { return mysql_fetch_array($db_query, MYSQL_ASSOC); } function tep_db_result($result, $row, $field = '') { return mysql_result($result, $row, $field); } function tep_db_num_rows($db_query) { return mysql_num_rows($db_query); } function tep_db_data_seek($db_query, $row_number) { return mysql_data_seek($db_query, $row_number); } function tep_db_insert_id($link = 'db_link') { global $$link; return mysql_insert_id($$link); } function tep_db_free_result($db_query) { return mysql_free_result($db_query); } function tep_db_fetch_fields($db_query) { return mysql_fetch_field($db_query); } function tep_db_output($string) { return htmlspecialchars($string); } function tep_db_input($string, $link = 'db_link') { global $$link; if (function_exists('mysql_real_escape_string')) { return mysql_real_escape_string($string, $$link); } elseif (function_exists('mysql_escape_string')) { return mysql_escape_string($string); } return addslashes($string); } function tep_db_prepare_input($string) { if (is_string($string)) { return trim(stripslashes($string)); } elseif (is_array($string)) { reset($string); while (list($key, $value) = each($string)) { $string[$key] = tep_db_prepare_input($value); } return $string; } else { return $string; } } ?>
  13. I fixed the problem. Maybe some of you can look at this code. problem... While viewing the checkout_shipping.php file I read the lines <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_textarea_field('comments', 'soft', '60' , '5'); ?></td> I changed it to <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_textarea_field('comments', 'soft', '5'); ?></td> and it worked great! Don,t know why? but it looks great and the box for comments is normal sized now. did the same to checkout_payment.php file. maybe some of you can figur out why this worked and why i had a comments box the size of texas and a 5 already inserted. hope this helps anyont with similiar problems. Im using version 2.0g and osc version 2rc2a
  14. I fixed the problem. Maybe some of you can look at this code. problem... While viewing the checkout_shipping.php file I read the lines <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_textarea_field('comments', 'soft', '60' , '5'); ?></td> I changed it to <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_textarea_field('comments', 'soft', '5'); ?></td> and it worked great! Don,t know why? but it looks great and the box for comments is normal sized now. did the same to checkout_payment.php file. maybe some of you can figur out why this worked and why i had a comments box the size of texas and a 5 already inserted. hope this helps anyont with similiar problems. Im using version 2.0g and osc version 2rc2a
  15. I just installed v 2.0g and all works fine but one little problem. When customer goes to buy it now an then is in checkout I get huge space where comments are with a number 5 in it. Wierd? Can somone please help. Or tell me what page to send code from? I think the error is in checkout_payment here is that code located in catalog/ <?php /* $Id: checkout_payment.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } // Stock Check if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); break; } } } // {{ buySAFE Module if ($HTTP_POST_VARS['WantsBond']) { $WantsBond = $HTTP_POST_VARS['WantsBond']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_get_all_get_params(), 'SSL')); } // }} // {{ buySAFE Module if (is_array($buysafe_result) && $buysafe_result['IsBuySafeEnabled'] == 'true') { $buysafe_module->draw_payment_page(); } // }} // if no billing destination address was selected, use the customers own address as default if (!tep_session_is_registered('billto')) { tep_session_register('billto'); $billto = $customer_default_address_id; } else { // verify the selected billing address if ( (is_array($billto) && empty($billto)) || is_numeric($billto) ) { $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'"); $check_address = tep_db_fetch_array($check_address_query); if ($check_address['total'] != '1') { $billto = $customer_default_address_id; if (tep_session_is_registered('payment')) tep_session_unregister('payment'); } } } require(DIR_WS_CLASSES . 'order.php'); $order = new order; if (!tep_session_is_registered('comments')) tep_session_register('comments'); if (isset($HTTP_POST_VARS['comments']) && tep_not_null($HTTP_POST_VARS['comments'])) { $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); } $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); // load all enabled payment modules require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment; require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); ?> <!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 language="javascript"><!-- var selected; function selectRowEffect(object, buttonSelect) { if (!selected) { if (document.getElementById) { selected = document.getElementById('defaultSelected'); } else { selected = document.all['defaultSelected']; } } if (selected) selected.className = 'moduleRow'; object.className = 'moduleRowSelected'; selected = object; // one button is not an array if (document.checkout_payment.payment[0]) { document.checkout_payment.payment[buttonSelect].checked=true; } else { document.checkout_payment.payment.checked=true; } } function rowOverEffect(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } function rowOutEffect(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } //--></script> <?php echo $payment_modules->javascript_validation(); ?> </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" width="100%" cellspacing="3" cellpadding="3"> <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"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice"> <tr class="infoBoxNoticeContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br><br><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td> <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" align="center" valign="top"><b><?php echo TITLE_BILLING_ADDRESS; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" valign="top"><?php echo tep_address_label($customer_id, $billto, true, ' ', '<br>'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></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 class="main"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $selection = $payment_modules->selection(); if (sizeof($selection) > 1) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td> <td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } else { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } $radio_buttons = 0; for ($i=0, $n=sizeof($selection); $i<$n; $i++) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) { echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td> <td class="main" align="right"> <?php if (sizeof($selection) > 1) { echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment)); } else { echo tep_draw_hidden_field('payment', $selection[$i]['id']); } ?> </td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php if (isset($selection[$i]['error'])) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td colspan="4"><table border="0" cellspacing="0" cellpadding="2"> <?php for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> </table></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> </table></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php $radio_buttons++; } ?> </table></td> </tr> </table></td> </tr> <?php // {{ buySAFE Module if (is_array($buysafe_result) && $buysafe_result['IsBuySafeEnabled'] == 'true') { $buysafe_module->draw_payment_page(); } // }} ?> <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 class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?></td> </tr> </table></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="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td> <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></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="0"> <tr> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> </tr> </table></td> </tr> <tr> <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td> <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> </table></td> </tr> </table></form></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'); ?>
×
×
  • Create New...