Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

compugeek2003

Archived
  • Posts

    50
  • Joined

  • Last visited

Everything posted by compugeek2003

  1. Paul, You can use the BTS and the STS together with a bit of code tweaking. I am using both of them together very successfully. Since STS doesn't change alot of the files in the default osCommerce, it isn't really very difficult to implement. A few of the things that come to mind off the top of my head that needed some changes are: 1. The STS handles the javascript differently, so I had to change the STS code a little to work with BTS. 2. The built in metatags with BTS needed to be coded into STS. This was more or less just and include statement. Both the BTS and STS are great contributions and they really help to keep a site organized and make it much easier to edit code and layout. Eric Stamper
  2. Jeff, I have not used the BTS Affiliate, however, from a quick glance at your error message, it appears that your file names may not be correctly defined in the catalog/includes/filename.php file. You should have two definitions in that file that look something like this: define('CONTENT_AFFILIATE', 'affiliate'); and further down on the page: define('FILENAME_AFFILIATE', CONTENT_AFFILIATE . '.php'); If you do not have those page definitions, then osCommerce will not know where to look for your affiliate pages. Again, I have not looked at the BTS Affiliate, but hopefully this will give you an idea of where to start looking. Eric Stamper
  3. Paul, You are correct that this is a bug in the BTS. The reason for the error you were receiving is that the javascript file that is called in the script in incorrectly named. Your solution to comment out (or delete) the offending line of code would indeed remove the errors, however, it would also prevent the form data on the address_book_process.php page from being validated by the javascript. The best solution to the errors is to simply rename the file that is incorrectly named. That file is found in catalog/includes/javascript in the default BST download. You should change the file address_book_process.php to address_book_process.js.php and reupload the file to your web server. That should resolve the error messages and allow the form validation to work correctly. Eric Stamper
  4. aboyz wrote: You can control a percentage surcharge in 3 steps: 1.) Add the following code to the configuration table in the database: insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Fedex surcharge (%) ?', 'MODULE_SHIPPING_FEDEX1_PERCENT_SURCHARGE', '0', 'Surcharge percentage amount to add to shipping charge? (Example: enter .10 for a 10% surcharge)', '6', '21', now())"); You will need to change the 0 to whatever value you want in the admin section. .30 would be used for 30%. 2.) Around line 143 of the fedex1.php file you will find: 'cost' => (SHIPPING_HANDLING + MODULE_SHIPPING_FEDEX1_SURCHARGE + $this->surcharge + $cost) * $shipping_num_boxes); Change this line to: 'cost' => (SHIPPING_HANDLING + (MODULE_SHIPPING_FEDEX1_PERCENT_SURCHARGE * $cost) + MODULE_SHIPPING_FEDEX1_SURCHARGE + $this->surcharge + $cost) * $shipping_num_boxes); 3.) Around line 202 of the fedex1.php file you will find: return array('MODULE_SHIPPING_FEDEX1_STATUS', 'MODULE_SHIPPING_FEDEX1_ACCOUNT', 'MODULE_SHIPPING_FEDEX1_METER', 'MODULE_SHIPPING_FEDEX1_CURL', 'MODULE_SHIPPING_FEDEX1_DEBUG', 'MODULE_SHIPPING_FEDEX1_WEIGHT', 'MODULE_SHIPPING_FEDEX1_SERVER', 'MODULE_SHIPPING_FEDEX1_ADDRESS_1', 'MODULE_SHIPPING_FEDEX1_ADDRESS_2', 'MODULE_SHIPPING_FEDEX1_CITY', 'MODULE_SHIPPING_FEDEX1_STATE', 'MODULE_SHIPPING_FEDEX1_POSTAL', 'MODULE_SHIPPING_FEDEX1_PHONE', 'MODULE_SHIPPING_FEDEX1_DROPOFF', 'MODULE_SHIPPING_FEDEX1_TRANSIT', 'MODULE_SHIPPING_FEDEX1_SURCHARGE', 'MODULE_SHIPPING_FEDEX1_INSURE', 'MODULE_SHIPPING_FEDEX1_RESIDENTIAL', 'MODULE_SHIPPING_FEDEX1_ENVELOPE', 'MODULE_SHIPPING_FEDEX1_WEIGHT_SORT', 'MODULE_SHIPPING_FEDEX1_TIMEOUT', 'MODULE_SHIPPING_FEDEX1_TAX_CLASS','MODULE_SHIPPING_FEDEX1_SORT_ORDER'); Change this line to: return array('MODULE_SHIPPING_FEDEX1_STATUS', 'MODULE_SHIPPING_FEDEX1_ACCOUNT', 'MODULE_SHIPPING_FEDEX1_METER', 'MODULE_SHIPPING_FEDEX1_CURL', 'MODULE_SHIPPING_FEDEX1_DEBUG', 'MODULE_SHIPPING_FEDEX1_WEIGHT', 'MODULE_SHIPPING_FEDEX1_SERVER', 'MODULE_SHIPPING_FEDEX1_ADDRESS_1', 'MODULE_SHIPPING_FEDEX1_ADDRESS_2', 'MODULE_SHIPPING_FEDEX1_CITY', 'MODULE_SHIPPING_FEDEX1_STATE', 'MODULE_SHIPPING_FEDEX1_POSTAL', 'MODULE_SHIPPING_FEDEX1_PHONE', 'MODULE_SHIPPING_FEDEX1_DROPOFF', 'MODULE_SHIPPING_FEDEX1_TRANSIT', 'MODULE_SHIPPING_FEDEX1_SURCHARGE', 'MODULE_SHIPPING_FEDEX1_PERCENT_SURCHARGE','MODULE_SHIPPING_FEDEX1_INSURE', 'MODULE_SHIPPING_FEDEX1_RESIDENTIAL', 'MODULE_SHIPPING_FEDEX1_ENVELOPE', 'MODULE_SHIPPING_FEDEX1_WEIGHT_SORT', 'MODULE_SHIPPING_FEDEX1_TIMEOUT', 'MODULE_SHIPPING_FEDEX1_TAX_CLASS','MODULE_SHIPPING_FEDEX1_SORT_ORDER'); That should be all you need to do to add a percentage surcharge to your fedex rate calculations. You will now have the option to add on a fixed dollar amount and / or a percentage amount. Please note that if you choose to do both, the percentage amount is added based on the original rate amount received from fedex and the dollar amount is added on top of that. Hope that helps Eric Stamper
  5. Vaiso, You can plug in additional graphics to the template page. You should be able to use either full paths or relative paths for this. By default, in the $headercontent template variable there is a reference to the base address to your page. This will allow the use of relative url's. The table widths are controlled in the sts_template.html file. For example around line 27 you would see this code: <td width="125" valign="top"> You could change the default value of 125 pixels to whatever you want. This would change the width of the left column. The main content section, the right column, and any other parts of the page could be conrolled similarly. Eric Stamper
  6. Brian, Thanks for the update. It looks like you have added some great new functionality. Having the errors and warnings show on the page will be very helpful. Keep up the good work! Eric Stamper
  7. Bluephoenix, I tested the existing customer and new customer functionality. It was simple to create orders both ways. I did not encounter any errors when working with one customer at a time. I did notice that if I did not log out when finished working with a customer account and left the window open, upon logging in as a different customer, any open widows for other customers changed to the newly opened customer account. This effectively prevents you from working on more than 1 account at a time. This may very well be what you intended. I just make note of it here for reference. The only problem that I noticed was in regards to opening several accounts and not closing them/logging off when finished. It seems that whatever items i had previously added to the other customer's carts were showing up in the most recently opened account. Obviously if the admin always logs off after working with a customer account, this will not be a problem. But inevitably an admin will often forget. One solution would be to generate a warning that requires the admin to log off the previous account before logging on to another account. A question I would have is whether there are added benefits to creating users/orders through your mod rather than directly through the catalog side? The one obvious difference that was indicated at the login section is that emails are not sent to the new customer when entered by the admin. Are there other differences? Keep up the good work! Eric Stamper
  8. Brian, Thanks alot for your great contribution. I have installed it as well as the basic template system for MS2. With a few tweaks they both work well together. There are some great possibilities with this template system. Keep up the great work! By the way, it looks like we are neighbors. I am from Bel Air. Eric Stamper
  9. Randy, I just sent you an email. If you still need beta testers let me know. Eric Stamper
  10. Brenden, Thanks for the template contribution. I have installed it and done some testing. So far, I have come across the bug that Tim found earlier in regards to the $javascript = 'formcheck.js.php'; needing to be changed to $javascript = 'form_check.js.php'; in the account_edit.php and account_password.php files. In addition, I have come across a similar issue in the create_account.php file. On line 1 of the content/create_account.tpl.php file there is a reference to some javascript code: onSubmit="return check_form(create_account);" The javascript code is not included in the file, however. To fix the problem, I added a reference to the needed javascript file to the create_account.php file on line # 255. This line needs to bee added: $javascript = 'form_check.js.php'; If I come across any other issues I'll let you know. Eric Stamper
  11. Emerson, You can change the order status values, or add others to your liking in the admin section. Go to Localization > Order Status. From there you can edit, insert, or delete values. I hope that helps Eric Stamper
  12. Here is an update regarding the fix for the missing billing and shipping addresses in the confirmation emails. Note: This fix is for the PayPal IPN v0.971 for Milestone 1 version. Thanks to Linh for being so patient in testing this for me. Unfortunately, I mistakingly left off one of the steps to take in the instructions I posted before. With these additional instructions, it is now working for Linh as well. The missing step should be step 2-D ( in the catalog/includes/classes/order.php file). The changes are as follows: Around line 142 find this code: $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 = '" . $customer_id . "' and ab.address_book_id = '" . $sendto . "'"); and replace it with: $shipping_address_query = tep_db_query("select ab.address_book_id, 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 = '" . $customer_id . "' and ab.address_book_id = '" . $sendto . "'"); Then, find this code around line 145: $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 = '" . $customer_id . "' and ab.address_book_id = '" . $billto . "'"); and replace it with: $billing_address_query = tep_db_query("select ab.address_book_id, 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 = '" . $customer_id . "' and ab.address_book_id = '" . $billto . "'"); That is it. Please make sure you make all of the changes in my previous post as well as the above listed changes and that should fix the missing addresses. Let me know if you have any questions, and once again, sorry for the oversight. Eric Stamper
  13. Try changing this line: 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id])); to this: 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]), and see if that fixes the problem Eric Stamper
  14. Try this one: http://www.oscommerce.com/community/contri...ions,338/page,2 It is called autologon Eric
  15. As way of an update, I am using an April 20, 2003 CVS snapshot and the PayPal IPN v0.971 for Milestone 1. The changes that were posted have now been tested under both the IPN Test Mode and the Live Mode with successful results. Has anybody else tested this successfully? Eric Stamper
  16. Deskdirect, I am sorry I did not mention this before. The changes I made are changes to the PayPal IPN v0.971 for Milestone 1. I have not looked at the code in the older versions in much detail, but it has several differences, such as the one you pointed out. Unfortunately, this means my changes will not work on the older versions, as is. If someone is willing to test some changes on the earlier versions, I would be willing to suggest some changes. It is possible that not many changes would be needed. I, however, have no way of testing the older versions since I am not using them. Eric Stamper
  17. I have posted a fix for the PayPal IPN not working properly in sending the confirmation email with the shipping and billing addresses on another post. Please see it here: http://www.oscommerce.com/forums/viewtopic.php...=asc&highlight= Please try it out and give any feedback. Hopefully this will work for you. Eric Stamper
  18. After much toil, I believe I have found a solution for the PayPal IPN not sending the billing and shipping addresses on the confirmation email. It requires changes to several files. I will list the changes in a step by step order that will hopefully be easy to follow: I recommend making a backup of your files before you make the changes. The changes will be made to these 4 files: catalog/paypal_notify.php catalog/includes/classes/order.php catalog/checkout_process.php catalog/checkout_paypalipn.php Also a small change is made to the database Here are the changes: 1. Changes to catalog/paypal_notify.php A. Find this code (around line 242): if ($order->content_type != 'virtual') { and add this code directly below that line: $shipping_query = tep_db_query("select address_book_id_bill, address_book_id_ship from " . TABLE_ORDERS . " where orders_id = '" . $item_number . "'"); $ship_data = tep_db_fetch_array($shipping_query); B. Find this line of code (around line 245): tep_address_label($order->customer['id'], $order->delivery['format_id'], 0, '', "n"); and replace it with this code: tep_address_label($order->customer['id'], $ship_data['address_book_id_ship'], 0, '', "n"); C. Find this code (around line 250): tep_address_label($order->customer['id'], $order->billing['format_id'], 0, '', "n") . "n"; and replace it with this code: tep_address_label($order->customer['id'], $ship_data['address_book_id_bill'], 0, '', "n") . "n"; 2. Changes to catalog/includes/classes/order.php A. Find this line of code (around line 14): var $info, $totals, $products, $customer, $delivery, $content_type; and change it to: var $info, $totals, $products, $customer, $delivery, $content_type, $shipping_data; B. Find this line of code (around line 20) $this->delivery = array(); and add this line directly below it: $this->shipping_data = array(); C. Find this line of code (around line 210): 'format_id' => $billing_address['address_format_id']); and add this code directly below it: $this->shipping_data = array('billto' => $billing_address['address_book_id'], 'shipto' => $shipping_address['address_book_id']); 3. Changes to catalog/checkout_process.php Find this code (around line 97): 'currency_value' => $order->info['currency_value']); Change the ending braket of that line and add two lines directly after this code, thus changing it to: 'currency_value' => $order->info['currency_value'], 'address_book_id_bill' => $order->shipping_data['billto'], 'address_book_id_ship' => $order->shipping_data['shipto']); 4. Changes to catalog/checkout_paypalipn.php (the same as step # 3) Find this code (around line 97): 'currency_value' => $order->info['currency_value']); Change the ending braket of that line and add two lines directly after this code, thus changing it to: 'currency_value' => $order->info['currency_value'], 'address_book_id_bill' => $order->shipping_data['billto'], 'address_book_id_ship' => $order->shipping_data['shipto']); 5. Add two fields to the orders table in your database as follows: ALTER TABLE orders ADD address_book_id_ship INT( 11 ) NOT NULL , ADD address_book_id_bill INT( 11 ) NOT NULL; Please try this code out and test it. I have tested it doing various orders through PayPal IPN using the Test Mode. If anybody can test it in live mode that would be great also. If you find any issues or need any further assistance let me know and I will see what I can do. Eric Stamper
  19. Grinch, I just worked on it for a little while and I got it to work for me by changing two lines of code. I must go to bed now but I will test it some more in the morning and if all seems well I will post the changes. It does have to do with exactly what you mentioned, the address ID. Eric Stamper
  20. To clarify: My previous post was only in response to the the comment: The information I posted is in regards to correcting that issue. The issue of the missing addresses is not related to Chandra's contribution. I have seen some other forum posts regarding that issue, but I have not seen that it has been resolved. I will let you know if I come across a resolution for that issue. Eric Stamper
  21. Hello, I had the same problem with 'TEXT' showing up instead of the actual textbox attributes. The problem is that the file catalog/checkout_paypalipn.php is not compatible with Chandra's contribution. However, that is simple to correct. There are two changes made by Chandra's contribution to the catalog/checkout_process.php file. If you make those same 2 changes to the checkout_paypalipn.php file it will work. If you need any assistance making those changes let me know. Eric Stamper
  22. I was having the same problem too. I have come up with a quick change to the code that seems to fix the problem of the sort order getting mixed up after logging out and then back in. I created the fix to correct the problem in the shopping cart, however, it seems to also correct the problem in the packing slips, invoices, and product confirmation screens. Please give it a test and let me know if it works for you in each of these places. If there are some areas that are still not working, I can give them a further look. The code change is in: catalog/includes/classes/shopping_cart.php. In my snapshot it is on line #56: The original code is this: $attributes_query = tep_db_query("select products_options_id, products_options_value_id, products_options_value_text from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "' and products_id = '" . $products['products_id'] . "'"); The update code is: $attributes_query = tep_db_query("select customers_basket_attributes_id, products_options_id, products_options_value_id, products_options_value_text from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "' and products_id = '" . $products['products_id'] . "' order by customers_basket_attributes_id"); //ECS Edited - 04/25/2003 The basic change is to add sorting based on the order in which the attributes were added into the shopping cart basket (which should be by the option sort order if you are using Linda's Sorter Contribution). Linda, this could be a quick addon to your Sorter Contribution. Eric
  23. Has anybody fully tested the ConteZero contributions to see if the checkboxes work properly in allowing multiple checked attributes. If it does allow multiple checked items, does it carry them through the whole process (through login and checkout) without altering them? Please let me know if you have tested this and it works. If so, then i could apply some of the logic to our case. If not, then I don't want to spend too much time on that option. Eric
  24. Barry, I have been spending some time on this but have not quite figured it out. Everything is working fine, except (as you just verified in your last post) that when more than one checkbox is checked it does not get carried over into the shopping cart upon login. I have checked, and the data DOES get put into the database correctly. If you look in the customer_basket_attributes table you should see a listing for each of the checked checkboxes. The problem appears to be (again as you indicated) in the catalog/includes/classes/shopping_cart.php. From what I can see, the issues lies in the restore_contents() function. I have been playing around with the lines around line 55 - 60 (in my snapshot). It appears it is taking the data from the database, but since the checkbox option number is the same for each of the selected items it is only listing one of them. This appears to be the same issue that i corrected on the product_info.php page, just in another place. I will keep trying, but I am not sure if it can be done without alot of changes to the code. One option would be to make each checkbox a separate option with just one attribute. Then my code fix earlier wouldn't be needed and the checkboxes would work without any problems just like the radio boxes do (because they only allow one selection). Let me know if you have any ideas As a side note (somewhat related): For those of you who are using Linda's Attribute Copier & Sorter, are you having an issue with the attributes losing their order after logging out and back in, or on the invoice pages? I had this problem and am creating a fix for it. If others need it, let me know and I will post it when it is fully completed. Eric
  25. There is one issue I have come across with this update through my further testing. If a person adds an item to their cart when they are not logged in (or have not setup an account yet) it works fine until they get to the checkout page via the login page. There is something in the login page code that causes the multiple checkbox attributes to not be entered into the customers_basket_attributes table correctly. It is interesting that everything works just fine if the person logs in first and then starts adding items to the cart and then goes to check out. I am hoping that somebody who is familiar with the inner workings of the login/checkout combination could shine some light on this situation. Please let me know if anybody can give some insights. Eric
×
×
  • Create New...