Jump to content
Sign in to follow this  
Sizer

Help PWA Contribution...

Recommended Posts

I installed the PWA account contrib which appears to work ok but when i try to change the status of an order from processing to pending for example i get an error :

 

Fatal error: Call to undefined function: _query() in /home/httpd/vhosts/unlockmymobile.com/httpdocs/os/catalog/admin/orders.php on line 52

 

the code that its moaning about is here :

 

// start pwa changes $pwa_check_query= tep_db

 

_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){ $email = STOR_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }

else { $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); } tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, ORE_OWNER_EMAIL_ADDRESS);

 

$customer_notified = '1'; }

 

Line 52 starts : _query("select purchased_without_account from " . TABLE

 

Any ideas?

 

Also when an order is placed via nochex/paypal, in the item description all i receive is "Unlockmymobile" rather than the product(s) ordered.

 

Also just noticed that when you goto "checkout_success.php?action=update" after a purchase i get page cannot be displayed, if i remove the action bit the page is there.....

 

 

 

Help really appreciated

 

Simo

Edited by Sizer

Share this post


Link to post
Share on other sites

I've set up Pass Without Accounts (PWA) and it works fine, but under Configurations in Admin I get this at the bottom \'Accounts\'

and when I click on that I get this:

 

Title Value Action

\'Purchase Without Account\' \'true\'

 

 

Which I can't edit ??

 

Are you experiencing this?

Share this post


Link to post
Share on other sites
I've set up Pass Without Accounts (PWA) and it works fine, but under Configurations in Admin I get this at the bottom \'Accounts\'

and when I click on that I get this:

 

Title Value Action

\'Purchase Without Account\' \'true\'

 

 

Which I can't edit ??

 

Are you experiencing this?

Could you check your admin/order.php file and see what it looks like. From what i can see when you install you get 2 choices, upload the supplied order.php or edit it.

 

I have checked the supplied one and it does not seem to have the code in that you are told to add if you edit it, i.e. :

 

Supplied order.php :

 

if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) {

$notify_comments = '';

if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {

$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";

}

 

$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

 

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

$customer_notified = '1';

}

 

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");

 

$order_updated = true;

}

 

Now when i read the install instructions is says :

 

******************************************************************

OPEN AND MAKE CHANGES IN THIS FILE: /admin/orders.php

change: (v0.71)Changed the email section in admin/orders.php

from:

 

  $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);           tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);           $customer_notified = '1';         }

 

to:

// start pwa changes  $pwa_check_query= tep_db

_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){           $email = STOR_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); } 
else {   $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }           tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

          $customer_notified = '1';         }

 

So my order.php file now looks like :

 

if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) {

$notify_comments = '';

if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {

$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";

}

 

// start pwa changes $pwa_check_query= tep_db

 

_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){ $email = STOR_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }

else { $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); } tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

$customer_notified = '1'; }

 

Which one is correct?????...I'm confused, maybe i'm missing something simple but it seems to me that the supplied order.php and the code alterations for the same file end up giving different results...........................

 

Simon

Share this post


Link to post
Share on other sites

Yes, I had the supplied code not the code with alterations as provided with the instructions. I still get the \' which I don't think should be there. I think that was due to the fact that I entered the changes to the data base exactly as per the instructions. Also, when I try to edit from true to false I get an error (shown below). I haven't tried checking out the funtionality of the important features with the change, but will try that next. How do I change the values in the data base? The original edit was all insertion.

 

\'Accounts\'

 

Title Value Action

\'Purchase Without Account\' \'true\'

 

Parse error: parse error in /nfs/cust/9/57/27/472759/web/catalog/admin/configuration.php(125) : eval()'d code on line 1

'Purchase Without Account'

Please make any necessary changes

 

'Purchase Without Account'

'Allow Customers to purchase without an account'

Share this post


Link to post
Share on other sites

OK, with the changes to the orders.php file per the installation instructions, everything works fine until I try to access my orders, then I get the following:

 

Parse error: parse error, expecting `','' or `';'' in /nfs/cust/9/57/27/472759/web/catalog/admin/orders.php on line 379

 

I guess it will be safer to the orders.php file without the changes in the instructions.

Share this post


Link to post
Share on other sites

Correction here.

I got my database straightened out at last.

I also got it to work with the modifications to the oders.php specified per the installation instructions. I guess it is a long story, but I had to make the changes to the file locally and then FTP them to the site. It works with Authorize.net. I don't know about nochex/paypal. I wouldl try paypal and see what happens, but I don't know of way to put it in test mode for that.

Edited by kcesco

Share this post


Link to post
Share on other sites
OK, with the changes to the orders.php file per the installation instructions, everything works fine until I try to access my orders, then I get the following:

 

Parse error: parse error, expecting `','' or `';'' in /nfs/cust/9/57/27/472759/web/catalog/admin/orders.php on line 379

 

I guess it will be safer to the orders.php file without the changes in the instructions.

That normally just a ; missing at the end of a line, go through and double check you havent missed any.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×