Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AverageJoe

Archived
  • Posts

    129
  • Joined

  • Last visited

Profile Information

  • Real Name
    Just your average guy
  • Website

AverageJoe's Achievements

  1. You need to register to use both the test server and the production server. There have been numerous problems with their test server, so I usually recommend switching over to the production server from the get go.
  2. That's exactly what both the ups and usps module need: zipcode and country. Once both are passed there shouldn't be any problems.
  3. Just wanted to chime in and say that yes, ship in cart does work with usps and ups. I'm using it on my website, and you can check it out here for a demo. wheeloftime's contrib is great, but if you need to use ups/usps I'd suggest the ship in cart, as this contrib really isn't made with that in mind.
  4. If you haven't changed your database field names, you'll have to use 'suburb' instead of 'delivery_street_address2'
  5. I think it's just because we're using the test server. Try the fix yeahyeahyeah posted further up and you'll see that you are getting information back from fedex, it's just generic test infomation. Don't know why labels for a 2nd box wouldn't get the test information too, but I'm chaulking that up to fedex.
  6. If you still have the problems with the table in the customers.php getting messed up when you enable an account, I'd suggest following the readme and putting it after the newsletter. You could post your customers.php file as well and I can check to see if something seems wrong. *EDIT* Well, missed your post above. Glad it worked out. I was actually thinking of allowing the customer to see how much credit they have left... maybe when I have some time on my hands after unvieling my new site I'll screw around with it :)
  7. Ah crap... I have a very modified version of oscommerce, so what I'm doing is getting it to work on mine, then redoing everything on a vanilla version of oscommerce. It seems that on transferring it to the vanilla version, I missed fixing the beginning of two lines :blush: In your customers.php file change (line 32): ? ? ? ?$customers_credit_left = tep_db_prepare_input($HTTP_POST_VARS['customers_credit_used']); to ? ? ? ?$customers_credit_used = tep_db_prepare_input($HTTP_POST_VARS['customers_credit_used']); Change (line 165): ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'customers_credit_left' => $customers_credit_used, to ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'customers_credit_used' => $customers_credit_used, I checked the other files and they seem to be fine. Again, sorry about that. Let me know if you have any problems before I upload the fix to the fix to the contributions.
  8. Ok, here we go: 1. Change customers_credit_left to customer_credit_used in the Customers table in phpmyadmin. 2. In admin/customers.php change (line 30): // BOF - Net Terms ? ? ? ?$customers_credit_amount = tep_db_prepare_input($HTTP_POST_VARS['customers_credit_amount'] + $HTTP_POST_VARS['increase_credit']); ? ? ? ?$customers_credit_left = tep_db_prepare_input($HTTP_POST_VARS['customers_credit_left'] + $HTTP_POST_VARS['increase_credit']); ? ? ? ?$customers_credit_status = tep_db_prepare_input($HTTP_POST_VARS['customer_credit']); // EOF - Net Terms to ? ? ? ?// BOF - Net Terms ? ? ? ?$customers_credit_amount = tep_db_prepare_input($HTTP_POST_VARS['customers_credit_amount']); ? ? ? ?$customers_credit_left = tep_db_prepare_input($HTTP_POST_VARS['customers_credit_used']); ? ? ? ?$customers_credit_status = tep_db_prepare_input($HTTP_POST_VARS['customer_credit']); ? ? ? ?// EOF - Net Terms Change (line 166): ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'customers_credit_left' => $customers_credit_left, to ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'customers_credit_left' => $customers_credit_used, Change (line 234): ? ? ? ?$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_credit_left, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_credit_amount, c.customers_credit_status, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'"); to ? ? ? ?$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_credit_used, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_credit_amount, c.customers_credit_status, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'"); Change (line 696): <!-- BOF - Net Terms --> ? ? ? <tr> ? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="formAreaTitle">Credit Line</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <?php if ($cInfo->customers_credit_status == 'enabled'){ ?> ? ?<tr> ? ?<td class="main" align="right">Total Credit Available:</td> ? ?<td><?php echo tep_draw_input_field('customers_credit_amount', $cInfo->customers_credit_amount, 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'enabled', 'CHECKED');?>Enable Customer's Credit</td> ? ?</tr> ? ?<tr> ? ?<td class="main" align="right">Credit Amount Left:</td> ? ?<td><?php echo tep_draw_input_field('customers_credit_left', $cInfo->customers_credit_left, 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'suspended');?>Suspend Customer's Credit</td> ? ?</tr> ? ?<tr> ? ?<td class="main" align="right">Increase Credit Line:</td> ? ?<td><?php echo tep_draw_input_field('increase_credit', '', 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'disabled');?>Disable Customer's Credit</td> ? ?</tr> <?php } if ($cInfo->customers_credit_status == 'suspended'){ ?> ? ? ? ? ?<tr> ? ?<td class="main" align="right">Total Credit Available:</td> ? ?<td><?php echo tep_draw_input_field('customers_credit_amount', $cInfo->customers_credit_amount, 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'enabled');?>Enable Customer's Credit</td> ? ?</tr> ? ?<tr> ? ?<td class="main" align="right">Credit Amount Left:</td> ? ?<td><?php echo tep_draw_input_field('customers_credit_left', $cInfo->customers_credit_left, 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'suspended', 'CHECKED');?>Suspend Customer's Credit</td> ? ?</tr> ? ?<tr> ? ?<td class="main" align="right">Increase Credit Line:</td> ? ?<td><?php echo tep_draw_input_field('increase_credit', '', 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'disabled');?>Disable Customer's Credit</td> ? ?</tr> <?php } if ($cInfo->customers_credit_status == 'disabled'){ ?> ? ? ? ? ?<tr> ? ?<td class="main" align="right">Total Credit Available:</td> ? ?<td><?php echo tep_draw_input_field('customers_credit_amount', $cInfo->customers_credit_amount, 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'enabled');?>Enable Customer's Credit</td> ? ?</tr> ? ?<tr> ? ?<td class="main" align="right">Credit Amount Left:</td> ? ?<td><?php echo tep_draw_input_field('customers_credit_left', $cInfo->customers_credit_left, 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'suspended');?>Suspend Customer's Credit</td> ? ?</tr> ? ?<tr> ? ?<td class="main" align="right">Increase Credit Line:</td> ? ?<td><?php echo tep_draw_input_field('increase_credit', '', 'maxlength="9"');?></td> ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'disabled', 'CHECKED');?>Disable Customer's Credit</td> ? ?</tr> <?php } ?> ? ? ? ?</table></td></tr> <!-- EOF - Net Terms --> to <!-- Net Terms BOF --> ? <tr> ? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="formAreaTitle">Credit Line</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <?php if ($cInfo->customers_credit_status == 'enabled'){ ?> ? ? ?<tr> ? ? ? ?<td class="main" align="right">Total Credit Available:</td> ? ? ? ?<td><?php echo tep_draw_input_field('customers_credit_amount', $cInfo->customers_credit_amount, 'maxlength="9"');?></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'enabled', 'CHECKED');?>Enable Customer's Credit</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="main" align="right">Credit Amount Used:</td> ? ? ? ?<td><?php echo tep_draw_input_field('customers_credit_used', $cInfo->customers_credit_used, 'maxlength="9"');?></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'suspended');?>Suspend Customer's Credit</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td></td> ? ? ? ?<td></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'disabled');?>Disable Customer's Credit</td> ? ? ?</tr> <?php } if ($cInfo->customers_credit_status == 'suspended'){ ?> ? ? ?<tr> ? ? ? ?<td class="main" align="right">Total Credit Available:</td> ? ? ? ?<td><?php echo tep_draw_input_field('customers_credit_amount', $cInfo->customers_credit_amount, 'maxlength="9"');?></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'enabled');?>Enable Customer's Credit</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="main" align="right">Credit Amount Used:</td> ? ? ? ?<td><?php echo tep_draw_input_field('customers_credit_used', $cInfo->customers_credit_used, 'maxlength="9"');?></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'suspended', 'CHECKED');?>Suspend Customer's Credit</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td></td> ? ? ? ?<td></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'disabled');?>Disable Customer's Credit</td> ? ? ?</tr> <?php } if ($cInfo->customers_credit_status == 'disabled'){ ?> ? ? ?<tr> ? ? ? ?<td class="main" align="right">Total Credit Available:</td> ? ? ? ?<td><?php echo tep_draw_input_field('customers_credit_amount', $cInfo->customers_credit_amount, 'maxlength="9"');?></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'enabled');?>Enable Customer's Credit</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td class="main" align="right">Credit Amount Used:</td> ? ? ? ?<td><?php echo tep_draw_input_field('customers_credit_used', $cInfo->customers_credit_used, 'maxlength="9"');?></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'suspended');?>Suspend Customer's Credit</td> ? ? ?</tr> ? ? ?<tr> ? ? ? ?<td></td> ? ? ? ?<td></td> ? ? ? ?<td><?php echo tep_draw_radio_field('customer_credit', 'disabled', 'CHECKED');?>Disable Customer's Credit</td> ? ? ?</tr> <?php } ?> ? ? ?</table></td></tr> <!-- Net Terms EOF --> 3. In checkout_confirmation.php change (line 87): ? ?$check_credit = tep_db_query("select customers_credit_status, customers_credit_left from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'"); to ? ?$check_credit = tep_db_query("select customers_credit_status, customers_credit_used, customers_credit_amount from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'"); Change (line 99): ? if ($order->info['total'] > $credit['customers_credit_left']){ to ? if ($order->info['total'] > ($credit['customers_credit_amount'] - $credit['customers_credit_used'])){ 4. In checkout_process.php change (line 222): // BEF - Net Terms ?if ($order->info['payment_method'] == 'Terms, Net 30'){ ? ?$check_credit = tep_db_query("select customers_credit_left from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'"); ? ?$credit = tep_db_fetch_array($check_credit); ? ?$subamt = $credit['customers_credit_left'] - $order->info['total']; ? ?tep_db_query("update " . TABLE_CUSTOMERS . " set customers_credit_left ='" . $subamt . "' where customers_id = '" . $customer_id . "'"); ?} // EOF - Net Terms to //BOF - NetTerms if ($order->info['payment_method'] == 'Terms, Net 30'){ $check_credit = tep_db_query("select customers_credit_used from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'"); $credit = tep_db_fetch_array($check_credit); $addamt = $credit['customers_credit_used'] + $order->info['total']; tep_db_query("update " . TABLE_CUSTOMERS . " set customers_credit_used ='" . $addamt . "' where customers_id = '" . $customer_id . "'"); } //EOF - Net Terms Haha... it probably would have been easier just to compare the new files :rolleyes:
  9. sure, give me a few minutes to package the new version, then I'll post the changes.
  10. Well, I found a missing </tr> in the code, but it would affect the layout regardless of if you enabled the credit or not. Since you put the credit above the gender near the top, you might have put it in the same row as the gender, which could account for missing info. I've tested out v1.02, which changes the "credit amount left" to "credit amount used", so you don't have to set it at the beginning. I also added the missing </tr>. I'll upload it shortly. *EDIT* Oh, forgot to mention. To upgrade from v1.01 to v1.02, use phpmyadmin to change the table "customers_credit_left" to "customer_credit_used", then update the customers.php, checkout_confirmation.php, and checkout_process.php files. The net terms payment module doesn't change.
  11. Make sure that you set both the credit line and the credit remaining to 3000 at the beginning. When you checkout it checks the "credit remaining" field to see if there's enough. If you don't initially set the credit remaining, it'll see $0.00. I forgot to add that to the readme :blush: I probably should have made the credit remaining field to a credits used field, and make the program check (credits - credits used) instead, but it was 2am and I needed to get this working for someone. For your first post, could you upload a little screenshot so I can see what's going on? I'm using the code on my site and the customer's page seems to be working fine. *EDIT* I used the credit's remaining field because it was setup in the first version of this. After work I'm going to try changing it around to what I said above, which would be a lot more intuitive. I might make a version 1.02 if it works well, so let me know about your customer error in case I have to make any revisions.
  12. Well, the first error sounds like you didn't chmod the fedex image folder to 777. As for the others, I'm not accustomed to the program yet to know :rolleyes:
  13. Thanks for the reply... you seem to be saving my ass when it comes to this contribution :blush: Last question: I'm getting the labels, but it's coming up with TEST LABEL CONTACT, TEST LABEL COMPANY, TEST LABEL ADDRESS, TEST LABEL CITY, MA 02132 I take it because I'm on the test server and not production. Will this work correctly once I switch it over? (from what TheJackel says it looks good) Thanks again for all the help :thumbsup:
  14. If you're still interested, I updated the code. Check it out here: Net Terms v1.01
  15. Hey All, I needed to implement an easy net 30 payment module, but the only one I could find had some bugs and some pretty lousy documentation. I fixed the code and revamped the documentation. Very easy mod to install and use if anyone's interested: Net Terms v1.01
×
×
  • Create New...