Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ftrippie

Pioneers
  • Posts

    28
  • Joined

  • Last visited

Everything posted by ftrippie

  1. Right, sorted already. Just added it to be stripped in the /includes/classes/supertracker.php: $city_name= preg_replace('/[\']/', '', $city_name); Cheers
  2. Hi, This addon is working perfectly for me for my spanish site. But now trying to watch the site from the Netherlands, it fails with a SQL error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's-heerenberg', '', '','/noneedtoknow.html','/product_info.php','2011-12-26 1' at line 1 INSERT INTO `supertracker` (`ip_address`, `browser_string`, `country_code`, `country_name`, `country_region`, `country_city`, `referrer`,`referrer_query_string`,`landing_page`,`exit_page`,`time_arrived`,`last_click`,`browser`) VALUES ('ip-noneedtoknow','Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0','nl', 'Netherlands', 'Gelderland', ''s-heerenberg', '', '','/noneedtoknow.html','/product_info.php','2011-12-26 11:41:55','2011-12-26 11:41:55','Mozilla Firefox') I think I know exactly where it comes from; the city it found starts with a comma ('s-heerenberg) and therefore confuses the comma-delimited input. Anybody knows how to solve that (check and remove commas from the inputfields)? Cheers!
  3. YES! I finally got it working! Created an extra field at customer registration to enter the code already and also had some extra checks built throughout the site.
  4. YES! I finally got it working! Created an extra field at customer registration to enter the code already and also had some extra checks built throughout the site.
  5. Nobody can help me? I managed to add a 'code field' to the customer account creation, and then copying that code to the free gift setup at login with: $account_query = tep_db_query("select customers_discode from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $account = tep_db_fetch_array($account_query); if (!$sess_discount_code) $sess_discount_code = $account['customers_discode']; That works, if a customer logs in BEFORE adding product to the cart. BUT, if he adds products to the cart and then logs in or creates a new account, I am stuck with the same problem as the first post; the items are correctly added, but the shipping weight and costs are not recalculated. So, I would still like to know if there is a simple function to update weight and shipping, without going back to previous pages?
  6. Hi guys, I am in need of some help. I have combined the DiscountCode with the Free Gift (Dangling Carrot). Both work perfect seperately, but I need to check one against the other and I am almost there. discount code: Discount Code Gift: Dangling Carrot Basically, on the discountcode enter page (Payment_confirmation), I check against 1 particular code (I have only 1 client with free gifts AND discount). Then, if I go to the CheckOut_Confirmation page, it succesfully adds the free gifts to the cart, it shows the correct quantity in the header (extra gifts) and it shows the correct price. But, I don't see the shipping-weight and shipping-costs updated. The items are correctly updated, but the weight is not being checked at the point apparantly. Is there no simple function to update weight and shipping, without going back to previous pages? Thanks!
  7. Does anybody know how to solve this? Basically the only think I am missing is that if I am going from the Payment_confirmation page (where I add the DiscountCode) to the CheckOut_Confirmation page, I don't see the shipping weight and costs updated. The items are correctly updated, but the weight is not being checked at the point apparantly. Is there no simple function to update weight and shipping?
  8. Oops, still not entirely. The free gifts are nicely added or removed according to the discount code action, but the weight is not added unless I refresh the page manually or go back to the shopping cart page. Anybody knows how to refresh the cart contents in the background?
  9. finally, i think I have it working! I reckon it changes the cart ID, so that's why it went back to the shipping confirmation page. I put the code now just AFTER the cart ID check and now it works. Needed to change the code above a little bit, because it didn't remove the gift if the code changed or was wrong. So now: // test to add here: BOF //////////////////////// dangling carrot v2.0 ////////////////////////////////// if ($cart->count_contents() > 0 ){ // find any free gifts, and remove invalid ones $num_in_cart = $cart->show_total(); $products = $cart->get_products(); $gift_query = tep_db_query("SELECT fg.*, p.products_id, p.products_model, p.products_price, p.products_image, p.products_tax_class_id, p.products_status, pd.products_name FROM (" . TABLE_CARROT . " fg, " . TABLE_PRODUCTS . " p) LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id=fg.products_id) WHERE pd.language_id = '".$languages_id."' AND p.products_id = fg.products_id AND p.products_status = '1' ORDER BY fg.threshold ASC"); $threshold = 0; $p=0; $gift_price=0; $gift_exists=0; while ($gift = tep_db_fetch_array($gift_query)) { // loop through the current gifts if ($gift_exists == 0){ for ($i=0, $n=sizeof($products); $i<$n; $i++) { if ($products[$i]['id'] == $gift['products_id']) { // gift already in cart $gift_exists = $products[$i]['id']; $gift_price = $gift['products_price']; break; } } } if ($num_in_cart >= $gift['threshold'] && strtoupper($sess_discount_code)=='xxxxx') { // cart could qualify for this gift // check to see if in cart already // add to gift list if not in cart if ($gift['products_id'] != $gift_exists ) { // this particular gift is not in cart but qualifies if (!$cart->in_cart($gift['products_id'])) $cart->add_cart($gift['products_id']); } } else { // cart cannot qualify for this gift // remove if in cart $cart->remove($gift['products_id']); } $threshold = $gift['threshold']; }//while } //EOF dangling carrot v2.0
  10. To continue my quest: I tried adding the 'add-gift' code to the checkoutconfirmation page, which basically works, but it doesn't go straight to the payment page. it first returns to the checkout_shipping page, so 1 page back . So I added the following code to the start of the checkout_confirmation page (I also tried to add to the checkout_payment page, but it has the same effect): // test to add here: BOF //////////////////////// dangling carrot v2.0 ////////////////////////////////// if ($cart->count_contents() > 0 && strtoupper($sess_discount_code)=='xxxxx'){ // find any free gifts, and remove invalid ones $num_in_cart = $cart->show_total(); $products = $cart->get_products(); $gift_query = tep_db_query("SELECT fg.*, p.products_id, p.products_model, p.products_price, p.products_image, p.products_tax_class_id, p.products_status, pd.products_name FROM (" . TABLE_CARROT . " fg, " . TABLE_PRODUCTS . " p) LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id=fg.products_id) WHERE pd.language_id = '".$languages_id."' AND p.products_id = fg.products_id AND p.products_status = '1' ORDER BY fg.threshold ASC"); $threshold = 0; $p=0; $gift_price=0; $gift_exists=0; while ($gift = tep_db_fetch_array($gift_query)) { // loop through the current gifts if ($gift_exists == 0){ for ($i=0, $n=sizeof($products); $i<$n; $i++) { if ($products[$i]['id'] == $gift['products_id']) { // gift already in cart $gift_exists = $products[$i]['id']; $gift_price = $gift['products_price']; break; } } } if ($num_in_cart >= $gift['threshold']) { // cart could qualify for this gift // check to see if in cart already // add to gift list if not in cart if ($gift['products_id'] != $gift_exists ) { // this particular gift is not in cart but qualifies if (!$cart->in_cart($gift['products_id'])) $cart->add_cart($gift['products_id']); } } else { // cart cannot qualify for this gift // remove if in cart $cart->remove($gift['products_id']); } $threshold = $gift['threshold']; }//while } //EOF dangling carrot v2.0
  11. BTW, just to let you know, I am using this discount module: http://www.oscommerce.com/community/contributions,7397/category,all/search,discount
  12. Hi, I hope you can help me. I want to combine this gift option with the discount code option. Both are now working seperately. I only need to apply the gift option for 1 particular discount code. So I decided to hardcode this code into the shoppingcart. And that works with: if ($num_in_cart >= $gift['threshold'] && $deficit <= 0 && strtoupper($sess_discount_code)=='xxxxx') { ... } else if ($near_limit && strtoupper($sess_discount_code)=='xxxxx') { .... if the customer goes in with a link with the discount code (i.e. shopdomain/?discount_code=xxxxx), it will work. But normally the customer will enter the code on the checkout confirmation page. By that time, the shoppingcart content has not effect anymore on the order contents. I don't mind it not showing up on the shoppingcart page (if the code is not know yet), but I would like to have the gift added and shown on the checkout confirmation page. Any idea how to do that? cheers...
  13. Hi, I too had to remove the Options +FollowSymLinks line to make it work. What does that line actually do? And can I continue safely without it? Thanks!
  14. And me too, same problem: 1054 - Unknown column 'c.categories_status' in 'where clause' SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered FROM products p, categories c, products_to_categories p2c where c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status='1' ORDER BY products_ordered DESC [TEP STOP] If this is not going to work, which Google XML Sitemap contribution would you recommend to use on top of FWR Media Ultimate SEO URL 5 ? Thanks.
  15. Yep, that's what I gathered as much, but I can't change it to anything other than ../ without that message appearing :'(
  16. And again; thanks for keeping track. I thought you had a point and we were about to solve it, but no luck. In the configure files, my original FS path was ../ which I changed to /home/www/mysite.com/ after checking that in ServerInfo as suggested in that thread. And the site keeps functioning. But Sitemonitor still doesn't like it and hasn't changed. In the startdirectory of SiteMonitor I HAVE to put ../ otherwise it will stick in the configure panel. If I put for instance /home/www/mysite.com/ it will say: Your username is invalid. Please change it and try again.: System -> ../ - SiteMonitor -> /home/www/mysite.com/ I feel we're close, but don't know what else to check...
  17. BTW, to be honest, I think it has something to do with the created referencefile, no? I don't know exactly how the online reference file has to look like, but this is the difference in online and local: online: .account.php,9647,1291745071,644 local: Z:/www/local/account.php,9647,1291745071,666 So, the online files start with a period, whereas the local files mention the full path. Does that seem correct to you?
  18. Well, I changed to PHP5 by adding "SetEnv PHP_VERSION 5" to the htaccess file. Version reported by phpinfo: PHP Version 5.2.13 But, still the same problem. How weird. Especially like I said, the same site works locally on a Uniserver perfectly... Any other suggestions would be very welcome. :(
  19. BTW, I just found out that I can change the PHP version from my hosting myself. From 4 to 5 (or even 6). I am running websites for multiple companies, but most of them being HTML based. Would you think it is worth the risk to switch to PHP 5 for this oscommerce site?
  20. I really have no clue. If I run the site locally (on uniformserver) than it runs OK, no mismatches at all. But online it seems to every file is a mismatch. I installed most of the recommended security addons (SecurityPro, IP trap, htaccess protection, Anti XSS), so perhaps something is interfering there, but then again, it would do so locally offline as well right? So, perhaps like you, it might be the PHP version. The local one on uniform server is version 5.2.8 But then again, PeterM mentioned that he is running the same 4.4.9 version without a problem. Any hints how to start troubleshooting?
  21. OK, I solved it myself by setting the width of the table to 100%: In my case product_info.php, line 176: <!-- Simple multi image addon --> <div id="fancy"> <table border="0" cellspacing="1" cellpadding="1" align="100%"> <tr> <td align="right" class="smallText">
  22. Hi Guys, thanks for responding. So, first of all, the leading period is not on the file itself (except for .htaccess of course), but only mentioned as such in the reference.php file. So, for every file on my domain, the file is referenced in the reference file starting with a period. Hence, the file checkout_payment_address.php is mentioned in the reference file as .checkout_payment_address.php Might that be the reason for my failures? Secondly, I don't understand exactly what you mean by 'using the root directory for storage'? I don't as far as I know. I just set up a normal shop and these 49 files in the root, are the normal files mostly mentioned under 'catalog'...
  23. Hi Jack_mcs, I did as you suggested and now it's reporting all of the rootfiles as mismatches (which makes sense in my case, that's what it did before as well). If I look in the referencefile, all names start with a period (.), is that supposed to be like that? And in the logfile, it only displays half the name, is that normal? Like: Difference found: New-> eckout_payment_address.php Original-> 21038 Reference: .checkout_payment_address.php,21038,1291744644,644 If I remove the first period of each file, it is marked as a new file and no further mismatch is reported: Found a new file named eckout_payment_address.php BTW, the php version of my host is: 4.4.9 Should that be good enough?
  24. Hi, I hope somebody can help me. It doesn't seem to read the actual status correctly. In my report I get Total mismatches found were 3456, Total files being monitored is 1150 Apart from correctly reporting NewFiles and DeletedFiles, All the rest of the files seem to be reported under Mismatches, for example (only picking 1 object, there are loads): SIZE MISMATCH: Difference found: New-> t/modules/payment/chronopay/callback.php Original-> 2844 TIME MISMATCH: Time Mismatch on t/modules/payment/chronopay/callback.php Last Changed on Thursday, 01 Jan 1970 00:00:00 GMT PERMISSIONS MISMATCH: permissions Mismatch on t/modules/payment/chronopay/callback.php Currently set to 0 was set to 644 And looking in the reference file for this particular object: .ext/modules/payment/chronopay/callback.php,2844,1291744380,644 What can i do?
  25. Hi Petr, Did you manage to solve your issue? I have got the same problem, also with a template from monster... I think we should define the table with the productinfo (the text bit) to width=100% but don't know where exactly.. Ftrippie
×
×
  • Create New...