Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ftrippie

Pioneers
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Real Name
    Ftrippie

ftrippie's Achievements

  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 :'(
×
×
  • Create New...