Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jorgeo

Pioneers
  • Posts

    35
  • Joined

  • Last visited

Everything posted by jorgeo

  1. This is the main support thread for the add-on "phpBB3 / osCommerce Bridge" This mod acts as a bridge between phpBB3 (notice this is version 3 of phpBB, not 2) and osCommerce. Alllows for a common login to both systems using email/password combination. It synchronizes user account changes (email, password) from both user and admin perspective. Main signup is through store, and users are allowed to pick a username for the phpBB forums after account creation. Update Log: v1.0 - Initial release (2013/05/20)
  2. For those of you getting after trying to submit your your credit card in the checkout_shipping.php page (either by using the credit card module, authorize.net or authorize.net AIM), I believe the "error" (I'm not sure if it is one) is found in checkout_shipping.php at around line 124: while (list($key, $value) = each($_POST)) { tep_session_register($key); } Some people mentioned to use $HTTP_POST_VARS instead of $_POST. I found out there was no difference (in my version of php), but I changed that anyway. I changed the code to: while (list($key, $value) = each($HTTP_POST_VARS)) { tep_session_register($key); $_SESSION[$key] = $HTTP_POST_VARS[$key]; } So now, after assigning the name of the POST variables (key) into the SESSION, we are also forcing the value of such key to be updated in the SESSION. I would assume tep_session_register() would do that, but it seems it doesn't. The rationale: I'm unsure if this fix is comprehensive, so I'm posting no fix patch on the contribution page. For those of you interested on why this happens, this is my take: checkout_shipping.php submits the credit card information to itself through POST If shipping info is ok, we will reload this page into checkout_confirmation.php?paynow= , so we need to store POST variables into SESSION ones to preserve them The fix above makes sure the variables are not only defined in the SESSION, but their values too Now we are in checkout_confirmation.php. We were supposed to get here by submitting a form, so we take the SESSION variables and put them back into POST variables (around line 18) Next thing is to delete the session variables that contain sensitive data, like "authorizenet_cc_number" So by now, everything should work fine. The submitted credit card data was swapped in and out of session variables, and the payment modules should work. I think that did it for me (I was messing with code for many many hours), and now I can use the authorize.net (not AIM) module with no problem. If it works for you, let others know. ~Jorge
  3. Make sure you've declared TABLE_FAVORIS, TABLE_FAVORIS_ATTRIBUTES and TABLE_WISHLIST, TABLE_WISHLIST_ATTRIBUTES to be two different tables (in includes/database_tables.php). Example: // Wishlist define('TABLE_WISHLIST', 'customers_wishlist'); // Wish List w/Attributes define('TABLE_WISHLIST_ATTRIBUTES', 'customers_wishlist_attributes'); // Favorites define('TABLE_FAVORIS', 'customers_favorite'); // Favorites w/Attributes define('TABLE_FAVORIS_ATTRIBUTES', 'customers_favorite_attributes'); To actually create the tables in OsCommerce, modify the sql file replacing the names of the database table to customers_favorite and customers_favorite_attributes. Good luck! ~Jorge
  4. Nope. Instead, you want to delete this line: tep_db_query("delete from " . TABLE_WISHLIST . " where customers_id= '" . $customer_id . "' and products_quantity = '999'"); about 7 lines after the "case 'wishlist_add_cart'" line. ~Jorge
  5. For the new version with html links to products, you probably need to enable HTML emails in your Admin configuration. Admin->Configuration->Email options->Use MIME HTML When Sending Emails->true
  6. in /catalog/includes/application_top.php: find: case 'wishlist_add_cart' :if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) { if ($HTTP_POST_VARS['products_id']) { if ($customer_id > 0) { tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); // Read array of options and values for attributes in id[] Replace with case 'wishlist_add_cart' :if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) { if ($HTTP_POST_VARS['products_id']) { if ($customer_id > 0) { // Read array of options and values for attributes in id[] That will keep the items in your wishlist even if they move them to the shopping cart
  7. Hi j0ker, The wishlist currently does that. It will remain available until the items are specifically removed from the wishlist (or moved to the shopping cart) ~Jorge
  8. Wish List 2.3 Consolidated http://www.oscommerce.com/community/contributions,1682 It includes all the updates and add-ons to the wishlist. You should be able to use just this contribution to install the Wish List... Finally :P Enjoy! ~Jorge
  9. Yeah, I've been wanting to consolidate all previous contributions into a single one, but I've been out of time for the past month. I'll try to work on it tonight.
  10. Hi Mibble, I would install the "4 May 2004 - Wishlist including checkbox's" wishlist contribution. in the Wishlist Contribution page After that, you can add the updates as you see fit.
  11. Yeah, I missed that, sorry. Change your catalog/includes/application_top.php: FROM: case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) { // begin mod for Wishlist v2.2 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'"); // Begin Wish List Code w/Attributes tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id=$products_id"); // End Wish List Code w/Attributes // end mod for Wishlist 2.2 TO: case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) { // begin mod for Wishlist v2.2 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'"); // Begin Wish List Code w/Attributes tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id='" . $HTTP_GET_VARS['pid']."'"); // End Wish List Code w/Attributes // end mod for Wishlist 2.2
  12. Ok, I found out that my previous post was very vague and hence why people might be having trouble. What I really meant was: Turn this: // Now we have an array of options and values for attributes in id[] foreach($id as $att_option=>$att_value) { // Add to customers_wishlist_attributes table tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $att_option . "', '" . $att_value . "' )"); } into this: // Now we have an array of options and values for attributes in id[] if (isset ($id)) { foreach($id as $att_option=>$att_value) { // Add to customers_wishlist_attributes table tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $att_option . "', '" . $att_value . "' )"); } }
  13. Hi Doug, I'm wondering if you could post the differences you found in the forum. Hopefully someone else can benefit from them! :thumbsup:
  14. Hmmm.... I don't find a way to attach files to a message, or else I would send my current versions of the files I changed for you guys to look at (I can't figure out what went wrong with your installations, I guess something minor.... and really annnoying! :P ) I'd post them on the contribution page, but my files have some extra modifications that I don't have time for removing. Ravenwulf, BearHappy: If you want a copy, send me a PM through the board with your email addy, and I'll send them to you. Then you can contrast and compare for possible errors.
  15. Just in case: This is how the relevant part of my application_top looks like for the corrections on the issue: case 'add_wishlist' : if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) { if ($HTTP_POST_VARS['products_id']) { if ($customer_id > 0) { tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $products_id . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )"); tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); // Now we have an array of options and values for attributes in id[] if (isset ($id)) { foreach($id as $att_option=>$att_value) { // Add to customers_wishlist_attributes table tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $att_option . "', '" . $att_value . "' )"); } } } } } break;
  16. Try the following: On includes/application.top, add immediately after the first line so that it looks like code below: <?php // Used to look for form or url variable information echo '<pre> HTTP_POST_VARS'; print_r ($HTTP_POST_VARS); echo '</pre><pre> HTTP_GET_VARS'; print_r ($HTTP_GET_VARS); echo '</pre>'; // Delete after testing And then try to press the "Add to wishlist" button in any product_info.php page. If everything went well, you should see something like this on the top of the page (you might get warnings or errors after this, but you should still be able to see it): HTTP_POST_VARSArray ( [id] => Array ( [3] => 6 [5] => 13 ) [wishlist_action] => add_wishlist [x] => 47 [y] => 3 [products_id] => 31 ) HTTP_GET_VARSArray ( ) Notice that 'id' is an array with the following attribute option values. I use these as an example: [Option 3: Model] => [Value 6: Premium] [Option 5: Version] => [Value 13: Box: Windows - English] To recognize what the numbers mean to your product, go to the Admin panel>Catalog>Product Attributes. They are listed there next to the number. The 'wishlist_action' variable is the one that gets passed with the form after clicking on the button and should be add_wishlist if the button in product_info was hit. Products_id is pretty obvious. If you don't get these, your button is not submitting the form. The button is either: 1- Not a submit button (noticed that I changed it from a link into a submit button in the product_info.php pages) You probably get 'action' => add_wishlist in the HTTP_GET_VARS Array if this is the case 2- Not inside the form, (and hence the values for $id[] are not passed). Note: for products without attributes, there shouldn't be an [id] variable Let me know how this goes and I'll try to answer. Don't forget to erase those lines after you're done.
  17. Yeah, I was aware of that. Supporting this feature might be pretty difficult, hopefully someone else will be able to help to the contribution by fixing this
  18. Hmmm, I'm not sure what the issue with the login is. My guesses: 1- The wishlist button is not located inside the product form: With the previous version, you could put the button anywhere. With this version, is has to be located inside the form 2- It might be that your sessions are being stored in cookies, I use a database to store them. This option is located in catalog/includes.configure.php: define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' osCommerce should still be able to handle them transparently, but maybe not 3- Also, I'm using the secure autologin contribution: http://www.oscommerce.com/community/contributions,2087 This might be another issue.
  19. The document.cart_quantity line is a javascript trick to make *one* form submit to either one of *two* different pages (one sends info to the shopping cart, the other one sends info to the wish list)., according to the submit button pressed. By default, the name of the form with all the product info is "cart_quantity". change document.cart_quantity to document.[your_form_name_here]. I believe this might be "buy_now_" Note to developers: It'll probably be better to have a whole different form for the 'Add to Wishlist button'. I used the already existing form and added a button that redirected to FILENAME_WISHLIST
  20. Ah, I must have overlooked that case in which the product has no attributes. I have warnings turned off through STS, so no wonder I missed it. My gut feeling tells me that you should put an if statement around it like this // Now we have an array of options and values for attributes in id[] if (isset ($id)) { foreach($id as $att_option=>$att_value) { // stuff here } } Also, I'll leave the wishlist email unmodified for now. If someone would like to print what the product attributes where in the email, it'll probably look really similar to the code found in catalog/wishlist.php
  21. My guess is that you forgot the add '.' to concatenate the string after '<tr><td>', so change the above code to: // Begin Wish List Code w/Attributes '<tr><td>'. tep_draw_form('product_' . $products['products_id'], tep_href_link(FILENAME_WISHLIST)) . tep_draw_hidden_field('products_id', $products['products_id']) . tep_draw_hidden_field('wishlist_action', 'wishlist_add_cart'); <{POST_SNAPBACK}>
  22. Ahh! You're right, I forgot to add that to the readme, sorry guys. New contribution added
  23. Ok, the Product Attributes Add-On to the Wish List v2.2 is ready! http://www.oscommerce.com/community/contributions,1682 Notice that this is only an Add-on to the current Wish List contribution. The snapshot I had was Wish List 2.2 (Talon177) - 01 April 2004, so the instructions might vary a little bit depending on your installation.
  24. In catalog/product_info.php Change: <!-- begin mod for Wishlist v2.2 --> <td align="left" class="main"><?php if (tep_session_is_registered('customer_id')) echo '<a href="' . tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist') . '">' . tep_image_button('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST) . '</a>'; ?></td> <!-- end mod for Wishlist v2.2 --> to: <!-- begin mod for Wishlist v2.2 --> <td align="left" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params(array('action')) . 'action=add_wishlist') . '">' . tep_image_button('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST) . '</a>'; ?></td> <!-- end mod for Wishlist v2.2 -->
  25. Ok guys, I have the first alpha version of Wish List with Attributes running. Done so far: - Move product with attributes to wish list from the products page - Move product with attributes from wish list infobox to Shopping Cart Still to do: - List product attributes in My Wish List page - Move multiple products from My Wish List page into cart - Delete multiple products from My Wish List page - Document all changes in a human-readable way (as opposed to scribbles in a stained piece of paper) - Step by step instructions on adding changes AND/OR - Step by step instructions to install from scratch Might not do: - Support multiple instantiations of same product with different attributes inside wish list (currently only 1 product type, overrides previous attributes) - Include attributes in email (I'm not using the "make your friend's wishlist your own wishlist" for the store I'm working on though) Some oddities: -"Buy now" and "Order History - In cart" buttons for products with attributes still takes you to the product page for you to select them. Oh, and I did pretty well on my exam :thumbsup: Thanks for the support.
×
×
  • Create New...