Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ctrc_rover

Members
  • Content count

    30
  • Joined

  • Last visited

Profile Information

  • Real Name
    Dennis Wimer
  1. ctrc_rover

    Multi_Vendor_Shipping new thread

    TABLE_ORDERS_VENDORS can be found in the Catalog_Install.txt. ====================== Multi Vendor Shipping Version: MVS 0.9RC4 Dated: June 01, 2005 ====================== I would suppose there are quite a few who have this in their code, since it came with the release. I will need to make the change to TABLE_ORDERS_SHIPPING as well. Thanks for the catch.
  2. ctrc_rover

    Multi_Vendor_Shipping new thread

    Thanks, Craig, for getting me on the right track for these last few changes. I have been successful in getting the information updated and into the orders database with the following code in checkout_process.php. if (($order->content_type == 'virtual') && ($order->info['subtotal'] == 0)) { $order->info['payment_method'] = "Downloadable Product"; $order->info['order_status'] = 4; } However, for some reason, the download link does not appear. Obviously, I am missing some other information that would enable the link to become visible (clickable). I will need to check into this. Again, the information is in the orders database, as expected, with these values. The other code change (as I mentioned in an earlier post) was to checkout_payment.php, as follows: if ($order->info['subtotal'] == 0) { if (!tep_session_is_registered('payment')) tep_session_register('payment'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL')); } There was no need for the original registration of the 'shipping' session, or the shipping variable assignments. If you have an idea how I can get past this final hurdle, please advise. Thanks.
  3. ctrc_rover

    Multi_Vendor_Shipping new thread

    Finally got payments to process correctly, with a valid Billing Address populated. Thanks for getting me on the right track, Stew. Actually, I ended up using a combination of the ZWSS contribution with your payment suggestions and a modification of the above. The following code should be inserted into the checkout_payment.php directly above where it says "// load all enabled payment modules". Stew - Note that I needed to change 'sub_total' to 'subtotal'. I got lazy and included both '$order->info' and '$cart->info' in the check. if ($order->info['subtotal'] == 0 || $cart->info['subtotal'] == 0) { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); $shipping = false; $sendto = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL')); } I still need to add 2 more modifications to this (actually, I need the help of the experts here) to update the order status from 'Pending' to 'Updated' (or whatever) and to include some form of Payment text both on the order confirmation screen and on the emailed order. Any help would be appreciated.
  4. ctrc_rover

    Multi_Vendor_Shipping new thread

    Hmmm. I thought I was clear with the question I asked. Let me try to explain and rephrase the question. Virtual products have no weight. However, virtual products may have a cost (i.e. selling ebooks that are downloaded). Hence, weight is not the only consideration when performing checks for payment options (checkout_payment.php). That is why I stated your solution to only check for zero weight would not satisfy the conditions of selling virtual products. Something else would be needed to satisfy conditions of checking for products being sold virtually and for free virtual products. Is this clearer? Now, as to the question, I want to insure that all virtual products are associated with a vendor and that skipping either shipping or payment sections (or both) does not omit, skip or delete this association of a product with a vendor. Perhaps this, too, is clearer. BTW (ZWSS): The value of the variable 'content_type' would need to be set from the function get_content_type() - at least I believe this to be true. But, I have yet to find where 'content_type' ever gets set to 'virtual_weight'. From the code on my system, the only values I see ever being set are 'mixed', 'physical' and 'virtual'. Please advise where you have this value being set. If it is never being set, I can see no purpose for this condition of the check. Thanks.
  5. ctrc_rover

    Multi_Vendor_Shipping new thread

    Checking total weight would not work in most cases - only if the product is free. However, if someone is offering downloadable products for sale (i.e. ebooks) then checking only if the weight is zero would skip these products for sale. My thoughts are that both weight and price need to be checked. However, my question is relating to the vendor_id. Does skipping both shipping and payment mean that there will be no vendor_id assigned and written to the database? If not, I suppose it would be possible to 'hardcode' a unique vendor_id for free/no-weight products. I also am assuming not skipping the payment section would apply a vendor_id that would be written to the database. Please correct my misconceptions, if any. Thanks.
  6. ctrc_rover

    Multi_Vendor_Shipping new thread

    Never mind. I found in a later post which file you were referencing -- namely checkout_payment.php Quck question: If a vendor has been identified at this point (checkout_payment), then would it not be possible to have a specific vendor_id that is unique to free downloadable products (or products that have no charge) and skip the checkout_payment and progress to checkout_confirmation? It seems like this could also be used to validate downloadable products that do have a charge (either from a positive cost value or from a vendor_id that is not designated as a free download vendor).
  7. ctrc_rover

    Multi_Vendor_Shipping new thread

    Okay. I give up. Which file are you modifying?
  8. ctrc_rover

    Multi_Vendor_Shipping new thread

    Help me to understand something. We are adding a definition for EXCLUDED_WEIGHT with a value of zero within the function restore_contents(). Okay. Then we are assigning the value of this variable to the variable $excluded_weight (again with a value of zero). Yet we never use this variable, rather we use the value of EXCLUDED_WEIGHT from the definition. What is the purpose of the second assignment, as I cannot see where it is ever referenced again. Did you intend that $excluded_weight would be used in the SQL query?
  9. ctrc_rover

    Multi_Vendor_Shipping new thread

    Great catch, Craig. Thanks. And sooooo easy to implement. :D
  10. ctrc_rover

    Multi_Vendor_Shipping new thread

    :thumbsup: Completely solved. I ended up having to scrap the mailer class from osCommerce and use a phpmailer class from SourceForge. The suggestions that came with this mailer class literally made life sooooo much easier. I know most of the folks on this board are probably living in the Unix world - and, that's fine, since did so myself for almost 30 years - but, the issues of late have been specifically Windows-related. In addition, my issues added on the fact that my Host Mailer does not support HTML email submissions (inbound, but not outbound). That really stinks! In any event. At the moment, life is great :D and I will move on to other things. Thanks to all those who contributed to resolution of my little problems. Oh - yeah. I won't waste any more bandwidth with the replacement mailer class I found, unless requested. :-"
  11. ctrc_rover

    Multi_Vendor_Shipping new thread

    Okay. Problems with 'foreach()' being invalid have been solved. Orders are being processed correctly and inserted into database. Thanks, Stew. Only problem remaining is a "Syntax error" with email.php. I know this problem has been discussed in many forums in the past. I will scour them for a solution. The puzzling thing is that I was not having email problems until MVS. I have checked and double-checked via debug that the correct values are being passed up to the point of the "return mail(...)" call [for SMTP]. Very strange. If someone has gone through this on a Windows system, please let me know. Thanks.
  12. ctrc_rover

    Multi_Vendor_Shipping new thread

    Sorry, Stew. It must have been a late evening - or, I'm getting old - or, whatever other excuse you would accept for this lapse of sanity. Yes, I overlooked the modification you made to the original MVS code by wrapping that section in a conditional execution. Thanks for correcting my oversight in viewing your modification.
  13. ctrc_rover

    Multi_Vendor_Shipping new thread

    You seem to have an extra closing bracket that is not in my copy nor the distributed version. For the life of me, I cannot find what you are closing, as all brackets are accounted for -- at least as far as I can see. Yes, I have a vendor setup exclusively for free downloads. It is not really necessary, as I can use the Free Of Charge contribution and do it either way. In any event, If the code you presented here is working, there must be something else in the file (preceding MVS code) that you are closing. What?
  14. ctrc_rover

    Multi_Vendor_Shipping new thread

    Okay. I read through your contributions and have made all the changes to checkout_confirmation.php, checkout_payment.php and checkout_shipping.php. Payment and shipping screens are skipped, as expected, for downloadable products. However, after confirmation, I still now get an error from checkout_process.php regarding "Invalid argument supplied for foreach() ..." at line 125, which is where the MVS code has been inserted. I have read through all of the posts for this and cannot find a resolution. The MVS modifications added seem to be correct (code included below). The latest posts I see on this are between you and Craig ("Are you guys kidding me?"). Since you obviously have this section of code working correctly for downloadable products, please advise. Thanks. //MVS - added insert for new orders_shipping table $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } //MVS End
  15. ctrc_rover

    Multi_Vendor_Shipping new thread

    Thanks, Stew. I will look into this modification as a replacement to DC5.3. There have been quite a few other mods added since DC5.3 was added. It is taking a bit to identify DC5.3-specific changes and remove them. :( But, I will find them all and remove :thumbsup: In the meantime, I have loaded MS2.2_Milestone separately and am methodically going back through those mods I want to include permanently. Thanks for your advice.
×