Jump to content


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name

Recent Profile Visitors

5,496 profile views
  1. alwaysontop

    Get 1 Free

    Hi Jim, The function that is returning the error is this function and in particular this line $list_of_products_ids = implode(',', $int_products_id_array); Some how this is interferring with the way that the Get 1 Free code works. function tep_get_hide_status($hide_status_products, $customer_group_id, $temp_post_get_array) { foreach ($temp_post_get_array as $key => $value) { $int_products_id = tep_get_prid($value); // the November 13 updated MS2.2 function tep_get_prid // can return false with an invalid products_id if ($int_products_id != false ) { $int_products_id_array[] = $int_products_id; } $list_of_products_ids = implode(',', $int_products_id_array); } // end foreach ($temp_post_get_array as $key => $value) $hide_query = tep_db_query("select p.products_id, find_in_set('".$customer_group_id."', products_hide_from_groups) as hide_or_not, find_in_set('".$customer_group_id."', categories_hide_from_groups) as in_hidden_category from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_id in (" . $list_of_products_ids . ")"); // since a product can be in more than one category (linked products) we have to check for the // possibility of more than one row returned for each products_id where "hide_or_not" // is the same for every row, but "in_hidden_category" can be different unset($int_products_id_array); // start over $int_products_id_array = array(); if (tep_not_null($hide_status_products)) { foreach($hide_status_products as $key => $subarray) { $int_products_id_array[] = $hide_status_products['products_id']; } } // end if (tep_not_null($hide_status_products)) while ($hide_products_array = tep_db_fetch_array($hide_query)) { $cat_hidden = '1'; $prod_hidden = '0'; if ($hide_products_array['hide_or_not'] != '0') { $prod_hidden = '1'; } elseif ($hide_products_array['in_hidden_category'] == '0') { $cat_hidden = '0'; } if ($prod_hidden == '0' && $cat_hidden == '0') { $hidden = '0'; } else { $hidden = '1'; } if (in_array($hide_products_array['products_id'], $int_products_id_array)) { foreach($hide_status_products as $key => $subarray) { if ($subarray['products_id'] == $hide_products_array['products_id']) { if ($subarray['hidden'] == '1' && $subarray['prod_hidden'] == '0' && $cat_hidden == '0') { // product is not a hidden one and now found to be in a category that is not hidden $hide_status_products[$key]['hidden'] = '0'; } } // end if ($subarray['products_id'] == $hide_products_array['products_id']) } // end foreach ($hide_status_products as $key => $subarray) } else { $hide_status_products[] = array('products_id' => $hide_products_array['products_id'], 'hidden' => $hidden, 'prod_hidden' => $prod_hidden); } $int_products_id_array[] = $hide_products_array['products_id']; } // end while return $hide_status_products; } // EOF SPPC, hide products and categories from groups The code in the shopping_cart.php class file is just additions and not changes (correct me if I am wrong here) so I am not sure how to progress from here. Thanks for your time Aran
  2. alwaysontop

    Get 1 Free

    Hi Jim, I have just installed this contribution and so far it is just the thing I need ;) Unfortunately I am having slight problems with my shopping cart (it is modded lol) Whenever I try to either : a) remove a product from the cart (using a dosubmission statement) $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], '0', 'onClick="DoSubmission();"')); or B) changing a products quantity in the cart using this code $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_input_field('quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_separator('pixel_trans.gif', '100%', '4') . tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART) . tep_draw_hidden_field('products_id[]', $products[$i]['id'] . tep_draw_hidden_field('free[]', $products[$i]['free']))); This error results: As a I said the store is seriously moddified and the shopping cart was working spot on until I amended the code for this contribution. Your help and/or advice would be appreciated. Thanks Aran
  3. alwaysontop

    Word Type Edit

    I think what the OP was asking for was a WYSIWYG editor. Search the contributions site for FCKEditor, also before you can edit these pages directly I would suggest adding a contribution such as 'Information Pages Unlimited' which you can then modify to use the FCKEditor and thus edit your pages as you wish WYSIWYG style.
  4. alwaysontop

    Official PayPal IPN Support Thread

    Hi Guys, I hope someone is kind enough to shed a little light on why after successfully processing some test orders through the live and sandbox systems that customers orders are not being recorded in the admin. Please forgive me I know this will have been discussed a million times over but all things seem ok to me. The order is passed to paypal, the payment is taken by paypal and the customer is successfully returned to the checkout_success page. I also notice on the who's online page that paypal is finding the return url of $parameters['notify_url'] = tep_href_link('ext/modules/payment/paypal_ipn/ipn.php', '', 'SSL', false, false); So now my question is ...... is it the ipn.php that is not logging the order or the checkout_process.php???? Any advice from others that have been in this situation would be gratefully received and more importantly put to the test. I look forward to your replies. Thanks Aran
  5. alwaysontop

    [Contribution] Grab_Order_Details

    This seems like a good idea but surely there is someway it could be abused??? Maybe I am just talking rubbish but I just have an awfull feeling that something could go wrong because this is the type of personal data that is locked away behind a login routine for a purpose. Maybe others could also share their points of view on this.
  6. alwaysontop

    Stop customers from ordering

    This will do the job for you nicely http://addons.oscommerce.com/info/5333 Aran
  7. alwaysontop

    An optimisation to far?

    Henry, Not really sure of what advice to give as you have not posted a url, needless to say google is indexing pretty quickly at the minute. We launched a store at the beginning of last week and 165 pages are already indexed. Post your url so we can have a look at your store Aran
  8. alwaysontop

    Automatically send data feed to Froogle

    Hi Pete, Are you sure you are using a current and upto date version of the google base feeder. These are the headers that are now used by google base: I would suggest you use this contribution http://addons.oscommerce.com/info/4513 Aran
  9. alwaysontop


    Hi Jack, Fantastic contribution mate, well done! Definately a contribution that should be considered for all future releases of osCommerce. Could you give any hints and tips on what we need to do to convert this from using the tinymce editor so we can use the fckeditor instead. Thanks Aran