Zen Cart Logo
Forums / All Other Contributions/Addons / COWOA (for ZC v1.5.x)

COWOA (for ZC v1.5.x)

Views: 159,076

Results 1 to 20 of 854
06 Jun 2012, 17:26
#1
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

COWOA (for ZC v1.5.x)

This is for Zen Cart v1.5.x
This is the NEW thread for the latest version COWOA Updated and Combined for Zen Cart v1.5.x.

If you are using Zen Cart v1.3.x:
**Please DO NOT post questions regarding the ****v1.3.x versions of this add-on in this support thread. **
Questions regarding the v1.3.x versions of this add-on should be directed to this support thread HERE:http://www.zen-cart.com/showthread.php?156174-COWOA-Updated-and-Combined

I'm not providing any support for this add-on I'm just being a good zen cart member and opening another thread for the updated version of COWOA....

COWOA is in the plugins area here: http://www.zen-cart.com/downloads.php?do=file&id=1416

11 Jun 2012, 13:26
#2
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

Thanks for updating this mod. I was in the process of putting this on a customers site when you open the support thread. I'm installing on 1.5 and while most of the updates were clearly marked, one file had substantial differences that didn't seem to be related to COWOA. I think the includes/classes/order.php that's been modified is a 1.3.9h file but it's included in the files for 1.5. I've merged the 1.5 changes into the COWOA file but I haven't installed on the website yet. Do you have the correct file for 1.5?

11 Jun 2012, 14:08
#3
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

badarac:

Thanks for updating this mod. I was in the process of putting this on a customers site when you open the support thread. I'm installing on 1.5 and while most of the updates were clearly marked, one file had substantial differences that didn't seem to be related to COWOA. I think the includes/classes/order.php that's been modified is a 1.3.9h file but it's included in the files for 1.5. I've merged the 1.5 changes into the COWOA file but I haven't installed on the website yet. Do you have the correct file for 1.5?

Check your PM.

11 Jun 2012, 14:56
#4
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

Thanks for that file. I've got it installed and it's working fine as long as I use the unmodified admin/orders.php file. If I use the one supplied when I click edit on an order I get the following error Parse error: syntax error, unexpected T_CASE in .../zencart/admin/orders.php on line 289.

11 Jun 2012, 21:42
#5
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

badarac:

Thanks for that file. I've got it installed and it's working fine as long as I use the unmodified admin/orders.php file. If I use the one supplied when I click edit on an order I get the following error Parse error: syntax error, unexpected T_CASE in .../zencart/admin/orders.php on line 289.

What MySQL server version are you running? I have this installed on my test site and I don't get this problem. Look in your cache folder and show the Debug Error Log.

15 Jun 2012, 18:31
#6
shinypenguin avatar

shinypenguin

New Zenner

Join Date:
Jun 2010
Posts:
23
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

countrycharm:

What MySQL server version are you running? I have this installed on my test site and I don't get this problem. Look in your cache folder and show the Debug Error Log.

I'm looking to add this to a new site and started merging the files... The first one, admin/orders.php looks like it is missing a "}" to close off the added line around 188 ```php
if ($check_status->fields['COWOA_order'] != 1) {


I think the closing "}" should be placed on line 210, the line just before ```php
// PayPal Trans ID, if any

... Can you confirm if this is correct? Comparing to a fresh install of zencart v1.5, using the latest 2.0c4 version of the mod. Looking forward to trying it out.

Thanks

15 Jun 2012, 22:46
#7
shinypenguin avatar

shinypenguin

New Zenner

Join Date:
Jun 2010
Posts:
23
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

Just finished getting the mod installed... there are several install files with discrepancies from the core files, possibly 1.3.9 files as another user suggested?

A few issues cropped up from preliminary testing:

(1) Couldn't log out of a COWOA account after checkout (have forced logoff enabled). Pages display the Log In link as though no account is logged in, but clicking the link goes directly to the account page for the COWOA account.

(2) After the original order confirmation email, subsequent order updates mailed to COWOA accounts have a link to the "account history" page, which requires a log in, rather than the "order lookup" page.

(3) After doing a sucessful order lookup with a COWOA account, adding an item to the cart breaks the shipping estimator. Also, clicking "checkout" goes directly to the COWOA checkout page without showing the account create/log-in page. On the shipping options page a blank address is entered (just a "," in the third line) -- presumably the reason for the broken shipping estimates.

(4) Having some major delays loading pages when testing the COWOA functionality. This may be a server issue, though they only seem to occur in IE9. Haven't noticed in either FF or chrome.

Certainly appreciate the contribution, just wanted to point out a couple install issues I had.

19 Jun 2012, 08:25
#8
billyboyle avatar

billyboyle

Zen Follower

Join Date:
Jul 2011
Location:
Glasgow, Scotland
Posts:
115
Plugin Contributions:
1

Re: COWOA (for ZC v1.5.x)

Although I am not a php coder I too found the error you mentioned at or around line 289.
I ran the file through an on-line php syntax checker at Syntax Check

I added the closing curly brace as suggested in line 210, there was a blank line there just waiting for something?

Ran the file through the on-line checker again and got an all clear on any syntax errors. I hope this fixes the issue.
I also discovered that on line 373 the doc type is; HTML 4.01

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?> >

Should that not be:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>

As it is in the Store side html_header.php. again not that I really know much, just pointing out what I see and asking if it's right.

20 Jun 2012, 01:50
#9
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

BillyBoyle:

Although I am not a php coder I too found the error you mentioned at or around line 289.
I ran the file through an on-line php syntax checker at Syntax Check

I added the closing curly brace as suggested in line 210, there was a blank line there just waiting for something?

Ran the file through the on-line checker again and got an all clear on any syntax errors. I hope this fixes the issue.

I also discovered that on line 373 the doc type is; HTML 4.01

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?> > ``` > > Should that not be: > > ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> ``` > > As it is in the Store side html_header.php. again not that I really know much, just pointing out what I see and asking if it's right.

I added the closing curly brace as suggested in line 210, there was a blank line there just waiting for something?

This has been fix in COWOA Version 2.1. Thank you two for bring this up.

I also discovered that on line 373 the doc type is; HTML 4.01

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?> > ``` > > Should that not be: > > ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> ```

If you open up a fresh zen cart v1.5.0 admin orders.php file you will see the code is right.

20 Jun 2012, 01:52
#10
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

shinypenguin:

Just finished getting the mod installed... there are several install files with discrepancies from the core files, possibly 1.3.9 files as another user suggested?

A few issues cropped up from preliminary testing:

(1) Couldn't log out of a COWOA account after checkout (have forced logoff enabled). Pages display the Log In link as though no account is logged in, but clicking the link goes directly to the account page for the COWOA account.

(2) After the original order confirmation email, subsequent order updates mailed to COWOA accounts have a link to the "account history" page, which requires a log in, rather than the "order lookup" page.

(3) After doing a sucessful order lookup with a COWOA account, adding an item to the cart breaks the shipping estimator. Also, clicking "checkout" goes directly to the COWOA checkout page without showing the account create/log-in page. On the shipping options page a blank address is entered (just a "," in the third line) -- presumably the reason for the broken shipping estimates.

(4) Having some major delays loading pages when testing the COWOA functionality. This may be a server issue, though they only seem to occur in IE9. Haven't noticed in either FF or chrome.

Certainly appreciate the contribution, just wanted to point out a couple install issues I had.

Thanks for pointing them out.

21 Jun 2012, 23:52
#11
billyboyle avatar

billyboyle

Zen Follower

Join Date:
Jul 2011
Location:
Glasgow, Scotland
Posts:
115
Plugin Contributions:
1

Re: COWOA (for ZC v1.5.x)

countrycharm:

If you open up a fresh zen cart v1.5.0 admin orders.php file you will see the code is right.

I was just going by the main html_header.php file. was just wondering that's all, linking it to the other issue and badarac pointing out that the orders.php looked like it was a modified 1.3.9h file.
As stated just a learner and trying to learn.

Can I ask another question
When I was running the sql update it threw up a couple of errors: 1 of them probably cause I already have Fast and Easy installed (duplicate column names)
The other was related to the CONCAT('gID=',@configuration_group_id) copied direct from the sql file in the zencart 1.5 mods at the bottom of the file.
phpmyadmin returned an error stating page_params could not be NULL. And on looking in to my admin area COWOA config was 1, sitting in the wrong place on the menu and 2. had not settings with in the page. I had to manually set the gID= (in my case to 42) and all was good with the configuration menu showing in the correct place and now with the setting showing up.

I as I not knowledgeable in sql, as well as php. Finding answers and solutions takes me hours.
My question is, was it something I did or could this also need looked at for the next release?
The page_params for the menu location was gID=@configuration_group_id before I changed it manually.

Thanks again, it is always good to learn.

22 Jun 2012, 17:41
#12
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

BillyBoyle:

I was just going by the main html_header.php file. was just wondering that's all, linking it to the other issue and badarac pointing out that the orders.php looked like it was a modified 1.3.9h file.
As stated just a learner and trying to learn.

Can I ask another question
When I was running the sql update it threw up a couple of errors: 1 of them probably cause I already have Fast and Easy installed (duplicate column names)
The other was related to the CONCAT('gID=',@configuration_group_id) copied direct from the sql file in the zencart 1.5 mods at the bottom of the file.
phpmyadmin returned an error stating page_params could not be NULL. And on looking in to my admin area COWOA config was 1, sitting in the wrong place on the menu and 2. had not settings with in the page. I had to manually set the gID= (in my case to 42) and all was good with the configuration menu showing in the correct place and now with the setting showing up.

I as I not knowledgeable in sql, as well as php. Finding answers and solutions takes me hours.
My question is, was it something I did or could this also need looked at for the next release?
The page_params for the menu location was gID=@configuration_group_id before I changed it manually.

Thanks again, it is always good to learn.

I was just going by the main html_header.php file. was just wondering that's all, linking it to the other issue and badarac pointing out that the orders.php looked like it was a modified 1.3.9h file.
As stated just a learner and trying to learn.

I wasn't trying to be rude toward you. Sorry if you took it the wrong way.

It's probably because you have Fast and Easy checkout installed too. I would imagine installing both will cause conflict with each other since Fast and Easy checkout has COWOA already. Why would you want to install COWOA and Fast and Easy checkout together in the first place. That doesn't make a whole lot of sense to me.
I'm not trying to be rude toward you, I'm just trying to see why you would want both installed at the same time.

25 Jun 2012, 21:04
#13
billyboyle avatar

billyboyle

Zen Follower

Join Date:
Jul 2011
Location:
Glasgow, Scotland
Posts:
115
Plugin Contributions:
1

Re: COWOA (for ZC v1.5.x)

@ countrycharm (I wasn't trying to be rude toward you. Sorry if you took it the wrong way.) absolutely no offence taken my friend. We all have the same gaol here I think. To live, to learn, to make the best god damn sites possible, and make a few bucks.

FEC abd COWOA together is wrong ??
Ah! that explains why my site went all funky...:lookaroun :frusty:

Not following my own advice yet again. I could not see the benefits of FEC right away and miss read the install on the OP's site. (no offence, but not as well laid out as here.)

Anyway not running them together now. Took a couple of hours to put it on and about 2 days to remove it fix all the errors I had made and re-do backup. f*!&^ing good learning experience, will not be doing it again anytime soon. :no::no::no:

It's all good anyways.

01 Jul 2012, 09:20
#14
boomup avatar

boomup

New Zenner

Join Date:
Jan 2012
Posts:
48
Plugin Contributions:
0

Re: COWOA (for ZC v1.5.x)

SQL error, WARNING: An Error occurred, please refresh the page and try again.

BTW, I installed FEC, and so how to fix it?

01 Jul 2012, 14:12
#15
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: COWOA (for ZC v1.5.x)

boomup:

SQL error, WARNING: An Error occurred, please refresh the page and try again.

BTW, I installed FEC, and so how to fix it?

BillyBoyle had the same issue when he had Fast and Easy checkout installed and then trying to install COWOA together. The error you are getting It's probably because you have both installed. I would imagine installing both will cause conflict with each other since Fast and Easy checkout has COWOA already. Why would you want to install COWOA and Fast and Easy checkout together when both has COWOA. That doesn't make a whole lot of sense.

08 Jul 2012, 07:07
#16
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

I had issues with the install SQL and made some modifications which resolved the issues..
This line:

SET @configuration_group_id=0;

has been identified as problematic and should not included in the install SQL file. (http://www.zen-cart.com/showthread.php?184566-1-5-modders-doing-SQL-changes-please-note!)

I found a few other minor issues as well and re-worked the install SQL to get everything inline.. Wanted to share with the community..

Here's my modified install SQL file

ALTER TABLE customers ADD COWOA_account tinyint(1) NOT NULL default 0;
ALTER TABLE orders ADD COWOA_order tinyint(1) NOT NULL default 0;
INSERT INTO query_builder ( query_id , query_category , query_name , query_description , query_string ) VALUES ( '', 'email,newsletters', 'Permanent Account Holders Only', 'Send email only to permanent account holders ', 'select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS where COWOA_account != 1 order by customers_lastname, customers_firstname, customers_email_address');
#
SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'COWOA';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

INSERT INTO configuration_group VALUES ('', 'COWOA', 'Set Checkout Without an Account', '100', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SELECT @t4:=configuration_group_id 
FROM configuration_group
WHERE configuration_group_title= 'COWOA';


INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES 
(NULL, 'COWOA', 'COWOA_STATUS', 'false', 'Activate COWOA Checkout? <br />Set to True to allow a customer to checkout without an account.', @t4, 10, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Enable Order Status', 'COWOA_ORDER_STATUS', 'false', 'Enable The Order Status Function of COWOA?<br />Set to True so that a Customer that uses COWOA will receive an E-Mail with instructions on how to view the status of their order.', @t4, 11, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Enable E-Mail Only', 'COWOA_EMAIL_ONLY', 'false', 'Enable The E-Mail Order Function of COWOA?<br />Set to True so that a Customer that uses COWOA will only need to enter their E-Mail Address upon checkout if their Cart Balance is 0 (Free).', @t4, 12, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Enable Forced Logoff', 'COWOA_LOGOFF', 'false', 'Enable The Forced LogOff Function of COWOA?<br />Set to True so that a Customer that uses COWOA will be logged off automatically after a sucessfull checkout. If they are getting a file download, then they will have to wait for the Status E-Mail to arrive in order to download the file.', @t4, 13, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),');

UPDATE configuration SET configuration_value = 'True' WHERE configuration_title = 'Use split-login page';

/*
-- REGISTER COWOA ADMIN PAGES
*/
INSERT INTO admin_pages
VALUES ('configCOWOA','BOX_CONFIGURATION_COWOA','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4);

Maybe when I've got a TON of free time:laugh: I'll think about trying to create an auto-intaller for this add-on..

08 Jul 2012, 09:00
#17
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

Working on merging the COWOA orders.php file with the one for Super Orders, and discovered that there is an entire chunk of code which doesn't seem to belong to COWOA or for that matter to do anything at all.. Lines 663 - 714

<?php
  if (MODULE_ORDER_TOTAL_DOUBLEBOX_STATUS == 'true') {
    $orders_doublebox = $db->Execute("select orders_products_id  
                                    from " . TABLE_ORDERS_DOUBLEBOX . "  
                                    where orders_id = '" . zen_db_input($oID) . "' and wrap = 1");  

  if ($orders_doublebox->RecordCount() > 0) {
?>
      <tr>
        <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td class="main"><table border="1" cellspacing="0" cellpadding="5">
          <tr>
            <td class="smallText" align="center"><strong><?php echo DOUBLEBOX_SUMMARY_HEADING; ?></strong></td>
          </tr>
<?php
       while (!$orders_doublebox->EOF) {
          $pos = -1;
          for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
              if ($order->products[$i]['orders_products_id'] == 
                  $orders_doublebox->fields['orders_products_id']) {
                  $pos = $i; 
                  break;
              }
          }
          $orders_doublebox->MoveNext();
          if ($pos == -1) {
             continue; // Should never happen
          }
          $i = $pos; 
          echo '<tr>';
          echo '<td class="accountProductDisplay">' . $order->products[$i]['name'];
          if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
               echo '<br><nobr><small>';
               for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
                       echo '  - ' . $order->products[$i]['attributes'][$j]['option'] . ": " . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '<br>';
                    }
               echo '</small></nobr>';
          }
          echo '</td>'; 
          echo '</tr>'; 
       }
?>
        </table></td>
      </tr>
<?php
  } else { 
    echo '<tr><td>'. DOUBLEBOX_NO_TEXT . '</td></tr>'; 
  }
} 
?>
08 Jul 2012, 11:19
#18
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

Now I'm testing COWOA, and have a question.. There's an admin option to allow customers who COWOA to view their order status:

Enable The Order Status Function of COWOA?
Set to True so that a Customer that uses COWOA will receive an E-Mail with instructions on how to view the status of their order.

Clicking the link the customer receives takes me to the login page. How do I fix this so that customers checking our without an account can view their order status??

08 Jul 2012, 11:28
#19
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: COWOA (for ZC v1.5.x)

DivaVocals:

Now I'm testing COWOA, and have a question.. There's an admin option to allow customers who COWOA to view their order status:

Clicking the link the customer receives takes me to the login page. How do I fix this so that customers checking our without an account can view their order status??
Edited to add:
This is the customer order status URL

Detailed Invoice: http : //clientlaserdiscvault(dot)overthehillweb(dot)com/index.php?main_page=account_history_info&order_id=20655

08 Jul 2012, 14:45
#20
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: COWOA (for ZC v1.5.x)

In one of the COWOA plugins, there was an order_status page that did not require the user to log in to view their status. The page required the user to enter the email address associated with the order and the order-number to gain access to the information.