Jump to content

Lucky Bastard

Members
  • Content count

    118
  • Joined

  • Last visited

Everything posted by Lucky Bastard

  1. Lucky Bastard

    Official PayPal IPN Support Thread

    So does the ipn.php get called when you use the sandbox? Because mine isn't. If so, at what point in the payment screens is it called?
  2. Lucky Bastard

    Official PayPal IPN Support Thread

    I am not trying to change the directory structure of the ext folder. I am trying to work out why the ipn.php file is not being called. I put debug code in the ipn.php file but it doesn't get called by payPal.
  3. Lucky Bastard

    Official PayPal IPN Support Thread

    Ok, it would seem my ipn.php file isn't been called by PayPal. (I am using the SandBox). I put some debug code at the top of the ipn.php file and the devug code isn't being executed. I loaded the 'ipn.php' file directly in the browser (as suggested by the trouble shooting notes,ie. http://www.mydomain.com/_/ipn.php) and the debug code gets executed when doing this. At the order confirmation screen I do a view source and make sure the notify_url is correct, and it is. Why isnt it being called? When, in SandBox mode, is this ipn.php file called?
  4. Lucky Bastard

    Official PayPal IPN Support Thread

    Ok, it would seem my ipn.php file isn't been called by PayPal. (I am using the SandBox). I put some debug code at the top of the ipn.php file and the devug code isn't being executed. I loaded the 'ipn.php' file directly in the browser (as suggested by the trouble shooting notes,ie. http://www.mydomain.com/_/ipn.php) and the debug code gets executed when doing this. At the order confirmation screen I do a view source and make sure the notify_url is correct, and it is. Why isnt it being called? When, in SandBox mode, is this ipn.php file called?
  5. Lucky Bastard

    Official PayPal IPN Support Thread

    Ok, thanks, I got it working. Now they are returned to my checkout_process.php and sent to checkout_success.php. I am curious though how does the checkout_process.php know not to create the order in the DB and send confirmation email? (as this has already been done) ALso is there any way to make it so that the customer DOESN'T have to click the "Complete your Order Confirmation" button - so that PayPal automatically redirects them back to the store. 2CheckOut has such an option. Lastly, should the order update automatically from Preparing [PayPal IPN] (to whatever the next status is) once the customer is returned back to out store? This didn't happen for me.
  6. Lucky Bastard

    Official PayPal IPN Support Thread

    What is the difference with the IPN module and the regular Paypal module that comes with osCommerce? I am moving from 2CO to PayPal. I am having trouble with the latest IPN module. Firstly it calculates the amounts to be 0. My fix for this is to remove the * $currencies->get_value($my_currency) from the following lines: if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') { $parameters['amount'] = number_format(($subtotal + $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } else { // default $parameters['amount'] = number_format($subtotal * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); $parameters['tax'] = number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } if ($order->content_type != 'virtual') { $parameters['shipping'] = number_format($order_total['ot_shipping'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } $parameters['handling'] = number_format($order_total['ot_loworderfee'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); I am not sure what the * $currencies->get_value($my_currency) is supposed to achieve but I know it zeros the 'amount'. My currency is set to AUD Secondly, with the above fix, I go to do a sandbox payment, and I succeed with the payment, then click the button to return to merchant site, and it goes off but never returns to my site. It gets stuck at: https://www.sandbox.paypal.com/checkout_process.php (not sure why checkout_process.php is being added to the PayPal domain. I have installed the mod as is, and only made the 1 small change as mentioned earlier. please help
  7. Lucky Bastard

    2checkout v2 on OSC 2.2

    Still no one able to get V2 of 2CO to work in osCommerce??
  8. Lucky Bastard

    Category Tab ver1.3 + STS templating

    I had trouble with those 2 contributions (STS and Category Tabs with Subs) running together back when I started out in osCommerce. Rather than trying to find the solution (which there probably was one) I decided to go with BTS and Category Tabs with Subs.
  9. Lucky Bastard

    BTSv1.2 Support

    Anyone?? See question in above post?
  10. Lucky Bastard

    BTSv1.2 Support

    Yep, certainly did, and played around with it, but nothing I did worked, even though I am sure I was on the right track. But guess what, got that issue fixed now, it was what I looked at before, but for whatever reason when I did it last time it didn't work (cos I changed something wrongly no doubt). BTW, is it only my install, that pages like edit address book entry and other pages that use the address_book_process.php show in the header : Store Name : HEADING_TITLE The reason is obvious, in address_book_process in lang/eng it has what you would expect, not one HEADING_TITLE constant defined, as many pages use that address_book_process.php, but rather there is one defined for each page, such as HEADING_TITLE_ADD_ENTRY,HEADING_TITLE_MODIFY_ENTRY. Then you look in the meta_tags.php under the case CONTENT_ADDRESS_BOOK_PROCESS, and it obviously only referes to HEADING_TITLE. There is no switch ow whatever to determin WHICH HEADING_TITLE to use. Is that normal for a BTS install, or has mine somewhere along the line got messed up? If that later, any suggestions on a neat way of fixing it? I have a method I hink (just an if statement within the case based on the HTTP_GET_VARS) but I want to know if anybody else has a better/neater method. ;) Thanks for the help guys!!
  11. Lucky Bastard

    Master Products - MS2

    This is a fairly hot thread. So is anybody able to answer my question from a few pages back : Great contribution, but the length of this thread is daunting! Have read a total of 32 pages so far!! Before I go any further can someone please answer a question? I have a gift hamper site. My gift hampers may have many items. Each item can be in many hampers. The hampers are for sale and display, the individual items are not (yet). I would like to track the inventory of the items. If I have hampers as masters and items as slaves - will this contribution allow for the many-to-many relationship? (I read it was probably coming but my reading hasn't yet got to the point where it has been incorporated without doing a copy slave which is problematic for inventory recording). Thanks!! Take care!
  12. Lucky Bastard

    BTSv1.2 Support

    Bundy, unfortunately not - no replies to my question :( Before posting my question I had a feeling I knew how to do it, but when I went ahead to make the mods I thought were required nothing changed - so I just undid those mods, then posted here HOPING for help (which has eluded me so far). Do you know how to change it?
  13. Lucky Bastard

    Master Products - MS2

    Great contribution, but the length of this thread is daunting! Have read a total of 32 pages so far!! Before I go any further can someone please answer a question? I have a gift hamper site. My gift hampers may have many items. Each item can be in many hampers. The hampers are for sale and display, the individual items are not (yet). I would like to track the inventory of the items. If I have hampers as masters and items as slaves - will this contribution allow for the many-to-many relationship? (I read it was probably coming but my reading hasn't yet got to the point where it has been incorporated without doing a copy slave which is problematic for inventory recording).
  14. Lucky Bastard

    BTSv1.2 Support

    So anybody able to help me with my question posted earlier : THANKS IN ADVANCE!!
  15. Lucky Bastard

    Category Tabs with Subs

    Hi Guys, I am using the Category Tabs with Subs contribution and am having problems with it. My site has 2 levels of categories, main and sub. I noticed if the main category ID is only 1 digit long the sub catgory strip displays the sub categories. However I noticed on some main categories that I clicked on (that DO have subcategories) didn't display the sub categories. I then looked further (head banging) to see if I could find out why SOME main categories displayed the sub categories while others didn't. First I looked in the admin to double check the categories and yes ALL main categories have sub-categories (only 1 level deep) and all sub-catgeories have products (no main categories do BTW). I then looked at the categories_tab.php file to see if I could debug it. I think I have foudbn the pub but don't know how to solve it. Firstly the oub is with main categories that have an ID greater than 1 digit in length (ie.21, 25 etc), these are the problem main categories. Categies with an ID of 1 digit length work OK! Looking at the code I could see that somehow a 2 digit ID (for teh main categories) was being referenced as ONLY by the first digit of the id (ie.25 was being referenced as 2). This problem occurs where the code on line 230 (see below) calls $id[0][0 . When doing an echo of the value for the $id[0][0] for 1 digit length categories ids it is fine, but for 2 digit length categories ids it is only returning the first digit of the category ID. The complete (unmodified) code for the category sub with tabs can be seen below. Can any of you out there spot where or why in teh below code the 2 digit categoy IDs are getting trimmed to 1 digit? (I added a comment next to the line that is returning the wrong category id for 2+ digit length category IDs). <?php /* $Id: categories.php,v 1.1.1.1 2003/02/25 02:59:49 root Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ function show_category_tabs($counter) { global $foo, $categories_string, $id, $HTTP_GET_VARS; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } if ($HTTP_GET_VARS['cPath'] != 0){ $base = substr($HTTP_GET_VARS['cPath'], 0, strpos($HTTP_GET_VARS['cPath'], '_')); if ($counter == $HTTP_GET_VARS['cPath']) { $onpage = 1; } elseif ($counter == $base) { $onpage = 1; } } if ($onpage) { $categories_string .= '<td valign="top" class="headerNavigation">'; } else { $categories_string .= '<td valign="top" class="inactiveNavigation">'; } $categories_string .= tep_image(DIR_WS_IMAGES . 'trans_corner_left.gif', ''); $categories_string .= '</td>'; if ($onpage) { $categories_string .= '<td valign="top" class="headerNavigation">'; } else { $categories_string .= '<td valign="top" class="inactiveNavigation">'; } $categories_string .= '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" bgcolor="#ffffff">'; $categories_string .= tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', ''); $categories_string .= '</td></tr><tr><td valign="top" bgcolor="#C0C0C0">'; $categories_string .= tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', ''); $categories_string .= '</td></tr></table><a href="'; $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); if ($onpage) { $categories_string .= '" class="headerNavigation">'; } else { $categories_string .= '" class="inactiveNavigation">'; } // display category name $categories_string .= $foo[$counter]['name']; $categories_string .= '</a> </td>'; if ($onpage) { $categories_string .= '<td valign="top" class="headerNavigation">'; } else { $categories_string .= '<td valign="top" class="inactiveNavigation">'; } $categories_string .= tep_image(DIR_WS_IMAGES . 'trans_corner_right.gif', ''); $categories_string .= '</td>'; if ($foo[$counter]['next_id']) { $onpage = 0; show_category_tabs($foo[$counter]['next_id']); } } ?> <?php function show_subcategories($counter) { global $fooa, $subcategories_string, $id, $HTTP_GET_VARS; $cPath_new = 'cPath=' . $fooa[$counter]['path']; $subcategories_string .= '<a href="'; $subcategories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $subcategories_string .= '" class="headerNavigation">'; // display category name $subcategories_string .= $fooa[$counter]['name']; $subcategories_string .= '</a> '; if ($fooa[$counter]['next_id']) { $subcategories_string .= '| '; show_subcategories($fooa[$counter]['next_id']); }else{ $subcategories_string .= ' '; } } ?> <!-- categories //--> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000080"> <tr> <?php // Always add the home link first $categories_string = ''; if (!$cPath) { $onpage = 1; } if ($onpage) { $categories_string .= '<td valign="top" class="headerNavigation">'; } else { $categories_string .= '<td valign="top" class="inactiveNavigation">'; } $categories_string .= tep_image(DIR_WS_IMAGES . 'trans_corner_left.gif', ''); $categories_string .= '</td>'; if ($onpage) { $categories_string .= '<td valign="top" class="headerNavigation">'; } else { $categories_string .= '<td valign="top" class="inactiveNavigation">'; } $categories_string .= '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" bgcolor="#ffffff">'; $categories_string .= tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', ''); $categories_string .= '</td></tr><tr><td valign="top" bgcolor="#C0C0C0">'; $categories_string .= tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', ''); $categories_string .= '</td></tr></table><a href="'; $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); if ($onpage) { $categories_string .= '" class="headerNavigation">'; } else { $categories_string .= '" class="inactiveNavigation">'; } // display category name $categories_string .= "Home"; $categories_string .= '</a> </td>'; if ($onpage) { $categories_string .= '<td valign="top" class="headerNavigation">'; } else { $categories_string .= '<td valign="top" class="inactiveNavigation">'; } $categories_string .= tep_image(DIR_WS_IMAGES . 'trans_corner_right.gif', ''); $categories_string .= '</td>'; if ($foo[$counter]['next_id']) { $onpage = 0; show_category_tabs($foo[$counter]['next_id']); } // start the tabs $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } show_category_tabs($first_element); echo $categories_string; ?> </tr> </table> <!-- categories_eof //--> <!-- subcategories //--> <table border="0" cellspacing="0" cellpadding="4" WIDTH="100%"> <tr class="headerNavigation"><td ALIGN="CENTER" class="headerNavigation"> <?php if ($cPath) { $subcategories_string = ''; $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $subcategories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $subcategory_check = tep_db_num_rows($subcategories_query); if ($subcategory_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($subcategories_query)) { $fooa[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $fooa[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $fooa[$last_id]['next_id'] = $fooa[$value]['next_id']; $fooa[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } if ($id[0][0] != ''){ show_subcategories($id[0][0]); //THIS IS THE VARIABLE/ARRAY THAT FOR SOME REASON IS CONVERTING A 2 DIGIT CATEGORY ID TO 1 DIGIT. echo $subcategories_string; }else{ echo " "; } ?> </td> </tr> </table> <!-- subcategories_eof //--> Any help with this would be appreciated. :D
  16. Lucky Bastard

    Category Tabs with Subs

    Anyone???
  17. Lucky Bastard

    Category Tabs with Subs

    Ohh yeah of the code supplied in my last post, only the code below the : <!-- subcategories //--> ..is probably of interest. Again thanks, hope someone can help.
  18. Lucky Bastard

    BTSv1.2 Support

    How can I change the window page title order from say : <Categogy Name> : <Store Name> <Product Name> : <Store Name> etc to the reverse. <Store Name> : <Categogy Name> <Store Name> : <Product Name> I want it to be applied to everypage (not just category/product pages) so that the storename appears first. Thanks!
  19. Lucky Bastard

    [Contribution] Login Page a la Amazon

    Done..was very easy to implement with BTS..only 1 small difference in the last step. Thanks, great contribution.
  20. Lucky Bastard

    [Contribution] Login Page a la Amazon

    Has anybody got this to work with a BTS modified osC?
  21. Lucky Bastard

    Dynamic Buttons

    Can somebody with better PHP skills than myself (not hard to find around here I am sure), make a contribution based on the dynamic button generator found here : Dynamic Generator Input Requirements An example output The PHP source code is here!! One thing that would make an improvement to the above is the ability to make a wider variety of color ranges (greyscales etc) if possible??!? I think a lot of people could benefit from such a contribution. If my PHP skills where up to it I certainly would give it a go. :D
  22. Lucky Bastard

    BTSv1.2 Support

    I posted a question in another forum that some of you BTS gurus may be able to answer. At least I hope :D SEE HERE
×