PDA

View Full Version : Cash on Delivery doesn't work



coeus
09-02-2005, 01:07 PM
Hello,

I have Paypal, Credit Cart and COD enabled, but COD is not displayed.

Customer group is set to use all payment methods and even with the specific customer I test with I set all payment methods enabled, but still no COD. I tried removing and reinstalling COD but nothing, any suggestions?

ganast
09-02-2005, 02:02 PM
Not sure why, but sometimes the order of display makes a differenece.

Can you tell us in which order the payment modules are presented? Also whether the other modules all work correctly?

--gabe

coeus
09-02-2005, 03:03 PM
COD - 0
Credit Card - 1
Paypal - 2

The other modules work fine

michael_s
09-02-2005, 04:13 PM
Check to make sure the COD module does not have a zone selected, and if it does, make sure that the account that you are using to order is in that zone.

How about disabling the other two, setting COD to 1 and testing?

cameroti
10-17-2005, 02:52 PM
Hi,

I am having the same problem. I tried the fix suggested by Michael, with no luck. Did you manage to resolve this?

Cheers
Tim

michael_s
10-17-2005, 04:35 PM
I cannot reproduce the problem. COD works fine in our test shop. What other changes to the configuration have you made? What are the EXACT steps to reproduce this. For instance is this Purchase Without Account, or standard, logged in customer?

cameroti
10-17-2005, 08:31 PM
OK, Here goes...

This is a clean install of RC2, followed by the following (logged) changes;

Set up new template folder / template for BTS (copy files to template folder only - no changes to main code)
Created two new info box reference files in includes/boxes for two info boxes referenced in our store template.
Insert two new info box definitions into database from Infobox Admin panel.
Changed top window bar heading to our store name in languages/english/index.php
Changed first word in window bar title in includes/languages/english.php
Configured Dynamic Mopics from the Admin Control Panel
Uploaded product details via EasyPopulate
FTP'd thumbnails and large pics to thumbs & images_big directories
Ran purchase test using Payment without Account usind COD - worked fine.
Changed default Customer Country field to Australia (Country Code 13) in includes/languages/english.php
Changed invoice / packing slip logo to our own by replacing oscommerce.gif in admin/images.

At this stage everything worked fine. No major hiccups


installed Check/Money Order payment module from Admin
Installed Credit Card payment module from Admin
Turned off (set to false) COD payment module
Check purchase with account / Payment without Account, now worked fine for Check/Money Order and Credit Card.
Installed Ausbank v1.4 oscommerce contribution 306 (allows payment by direct deposit to a bank account, essentially displays this information at checkout if selected). Installation involved copying two files to includes/modules/payment and includes/languages/english/modules/payment followed by installing direct from Admin panel as for other existing payment modules.
Checked payment with account / without account and Direct Deposit was not showing as an option.
Tried turning COD back on (set to true), but it no longer functioned in either pay with or without an account.
Uninstalled Ausbank v1.4 and rechecked COD - still not functioning.
Uninstalled COD and reinstalled COD - still not functioning.

I hope this rings a bell with someone.

Cheers
Tim

cameroti
10-18-2005, 01:01 PM
Hi

A quick update. I have double checked all the code in the payment modules and there do not appear to be any changes from the original. I am now working progressively through all the configuration options, but have yet to find anything that affects the performance of the COD payment module.

Any ideas on where to from here appreciated!

Thanks
Tim

cameroti
10-19-2005, 06:22 AM
OK, Have now exhausted all possible configuration changes and I am officially stumped! Any ideas appreciated.

Cheers
Tim

michael_s
10-19-2005, 09:12 AM
My idea is to start over with fresh files and a default configuration. Then only add a single mod at a time, each time testing the enable/disable of the cod module. This will allow you to pinpoint the cause.

I can say with confidence that it is most likely related to the new module you installed, as this is not reproducable in a stock osCMax configuration.

cameroti
10-19-2005, 11:58 PM
Hi Michael,

Ok I bit the bullet. Dropped all the data base tables, deleted all files on host server and up loaded new RC2 files. A clean install. I added one category and one test product and proceeded to checkout.

COD did not show up. You get the message that 'This is currently the only payment method available for use on this order"... but there is no listed payment method below it. If you proceed to the next stage COD shows up as method of payment!

Next I installed the Credit Card & Check / Money Order modules - they work fine. Can turn them on or off, install / uninstall etc they are rock solid. When only one is selected the 'select buttons' disappear and you get the 'This is currently the only payment ...etc'. This happens even if COD is 'true' as well. Tried many combinations with COD, all to no avail.

Any ideas??

Cheers
Tim


For completeness, I should note that my US based hosting company insists on the four minor changes to the oscommerce code prior to install (on the basis of security they say). I cannot see how these affect the items listed above, but want to be thorough!


Edit the file install/templates/pages/install_2.php
On line 78(approx), replace 0:
$script_filename = getenv('PATH_TRANSLATED');
if (empty($script_filename)) {
$script_filename = getenv('SCRIPT_FILENAME');
}
with :
$script_filename = getenv('PATH_TRANSLATED');
//if (empty($script_filename)) {
$script_filename = getenv('SCRIPT_FILENAME');
//}


Edit the file install/templates/pages/install_3.php
On line 14(approx), replace :
$script_filename = getenv('PATH_TRANSLATED');
if (empty($script_filename)) {
$script_filename = getenv('SCRIPT_FILENAME');
}
with :
$script_filename = getenv('PATH_TRANSLATED');
//if (empty($script_filename)) {
$script_filename = getenv('SCRIPT_FILENAME');
//}


Edit the file includes/application_top.php
On line 43(approx), replace :
if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
with :
$PHP_SELF = ($_SERVER['SCRIPT_URL'] == '/') ? '/index.php' : $_SERVER['SCRIPT_URL'];


Edit the file admin/includes/application_top.php
On line 35(approx), replace :
$PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ?$HTTP_SERVER_VARS['PHP_SELF']
: $HTTP_SERVER_VARS['SCRIPT_NAME']);
with :
$PHP_SELF = (!empty($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']);

cameroti
10-20-2005, 04:46 AM
OK, here's the thing, the reason the COD was not showing (and the other module I added) was that they both contained a 'disable if the cart contains a virtual product' section of code.... and for some reason all the products I have been adding default to content_type virtual. Comment out the section of code and it works just fine.

So the question now is - why are my products defaulting to virtual??

I will pursue this in a different thread!

Thanks for the help provided.

Cheers
Tim

michael_s
10-20-2005, 07:59 AM
If you have a zero weight for a product, it is virtual.