1.4.1 shop_module WITH PAYPAL...

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Sun 1. Mar 2009, 22:08

My enhancements for the shop module (i.e. adding paypal gateway) are complete and have been tested. The first person with that can provide me the most recent copy of phalanc's Forum CP gets a copy. Good day.

User avatar
juergen
Moderator
Posts: 4553
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by juergen » Mon 2. Mar 2009, 08:06

Oh, this looks like the birth of a new licence ? NAGL ?

User avatar
update
Moderator
Posts: 6391
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: 1.4.1 shop_module WITH PAYPAL...

Post by update » Mon 2. Mar 2009, 10:51

You have asked for - here it is:
(but this is really an old one.... still the latest I think)
Attachments
enym_forum_reanimation_v1.0.zip
(7.35 KiB) Downloaded 248 times
It's mostly all about webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Mon 2. Mar 2009, 15:23

custom shop_field_1, etc. fields are disabled in this example, also the code points to paypal sandbox added order_phone to orders table, adds transactions table.
mod_shop_paypal.zip
(85.4 KiB) Downloaded 297 times

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Mon 2. Mar 2009, 19:09

bummer, no he (phalancs) had fixed the notify

User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by antonumia » Thu 12. Mar 2009, 17:24

Code: Select all

Fatal error: Call to undefined function _dbquery() in ...\inc_module\mod_shop\setup\setup.php on line 155
I assume there should be an include...?

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Fri 13. Mar 2009, 14:25

Actually, if I forgot anything it was the

Code: Select all

// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
try it from inside the back end... :)

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Wed 22. Apr 2009, 20:45

there is a typo in the setup.php on line: 97

the line:
$sql[7] = "CREATE TABLE ".DB_PREPEND."phpwcms_shop_transactions` (

should be:
$sql[7] = "CREATE TABLE ".DB_PREPEND."phpwcms_shop_transactions (

Also: line 146

echo $sql[9]."<br />\n"

should be:

echo $sql[9]."<br />\n";

Also, the system is setup to use the paypal sandbox and you will have to change the hard-coded url when you go live...
in front.order_process.inc.php on line: 34. (comment out line 34 and uncomment line 35)

//$p->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; // testing paypal url
$p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; // paypal url

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Mon 27. Apr 2009, 16:28

Another note: one might experience problems with the custom fields and that will take some troubleshooting.

Major oversight: this module also requires changes in /config/phpwcms/conf.inc.php where I replaced the $phpwcms['site'] variable and introduced two additional (new) variables. See example below:

Code: Select all

$phpwcms['machine_alias']	  = 'www';
$phpwcms['site_domain']	  = 'hugosdyes.com';
$phpwcms['site']                  = 'http://'.$phpwcms['machine_alias'].'.'.$phpwcms['site_domain'].'/';
They are required by the paypal class when validating the referrer. If these are not populated; the script will bail out when submitting to paypal .

rosemckay
Posts: 54
Joined: Thu 13. Oct 2005, 00:59

Re: 1.4.1 shop_module WITH PAYPAL...

Post by rosemckay » Wed 10. Jun 2009, 21:33

Hi, I made the changes to the setup file. There were two other code fixes but I'm not clear what to do with them. I'm talking about the one to the config file and one from another post that I can't seem to figure out which file is changed. When I click on Shop/Products under modules in the backend I get what looks like a disply of an sql dump and then WOW this at the bottom:

Code: Select all

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 100

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 106

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 100

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 106

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 100

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 106

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 100

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 106

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 100

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/calif19/public_html/include/inc_lib/dbcon.inc.php on line 106

All inital db tables and values were created.

Edit .../config/phpwcms/conf.inc.php change Code:
$phpwcms['SESSION_FEinit'] = 1; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend
Add: $phpwcms['Login_IPcheck'] = 0;
Looks like some major errors but I'm clueless about fixing them. I also don't seem to be able to use the module but it's not clear how to implement it anyway. I can't seem to find any instructions or tutorials. Please help! Thank you.

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Wed 10. Jun 2009, 22:57

the warnings are not important, the db tables were created.
now in the config file:

Edit .../config/phpwcms/conf.inc.php change Code:
change: $phpwcms['SESSION_FEinit'] = 1; // set 1 to enable sessions in frontend
Add: $phpwcms['Login_IPcheck'] = 0;

also you need the site and machine alias changes (also in conf.inc.php) as referred to in earlier post...

nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube » Wed 1. Jul 2009, 19:03

FYI update note to whom it may concern... I've integrated the other enhancements (moo-tools & sizes/colors) for the paypal enabled shop but....

It got very messy when applying the options (sizes & colors) once processing enters the paypal portion of the code and begs for a better solution... (like changing the products table) Then I had to drop coding and actually go out to make some income elsewhere for a while. I've managed to picked up a new project now and will resume coding on my variant of the paypal enhanced shop module in about two weeks (that is, if the project requires it, as requirements have not been settled yet).

smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke » Mon 24. Aug 2009, 14:31

I installed the paypal shop but I am having a weird problem.
I am not quite a mysql geek and I hope you can help me:

I am using mysql 4.0 and getting errors in every table where "latin1_bin" exists
I tried latin_general_ci and german_1_ci too, but same error:

Code: Select all

 SQL-Befehl:

CREATE TABLE IF NOT EXISTS `phpwcms_shop_orders` (
`order_id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`order_number` varchar( 20 ) NOT NULL default '',
`order_date` datetime NOT NULL default '0000-00-00 00:00:00',
`order_name` varchar( 255 ) NOT NULL default '',
`order_firstname` varchar( 255 ) NOT NULL default '',
`order_email` varchar( 255 ) NOT NULL default '',
`order_phone` varchar(50) collate latin1_bin default NULL,
`order_net` float NOT NULL default '0',
`order_gross` float NOT NULL default '0',
`order_payment` varchar( 255 ) NOT NULL default '',
`order_data` mediumtext NOT NULL ,
`order_status` varchar( 100 ) NOT NULL default '',
PRIMARY KEY ( `order_id` ) ,
KEY `order_number` ( `order_number` , `order_status` )
) TYPE = MYISAM

MySQL meldet: Dokumentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'collate latin1 NULL,
  `order_net` float NOT NULL default '0', 
can someone help me?

User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by flip-flop » Mon 24. Aug 2009, 15:07

There is no collation available in mySQL < V4.1.

Please edit the sql text file from e.g.

Code: Select all

order_phone` varchar(50) collate latin1_bin default NULL,
to

Code: Select all

order_phone` varchar(50) default NULL,
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )

smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke » Mon 24. Aug 2009, 15:50

thank you for the quick answer,
I tried that before, and it worked.
but when the data has been delivered to paypal, its said that the current language was not supported.

I updated the database to 5.0 now. everything works now.

but after ordering another paypal error message occured:

Code: Select all

Sorry — your last action could not be completed

If you were making a purchase or sending money, we recommend that you check both your PayPal account and your email for a transaction confirmation after 30 minutes.

If you came to this page from another website, please return to that site (don't use your browser's Back button) and restart your activity.

If you came from PayPal's website, click the PayPal logo in the upper-left corner to return to our home page and restart your activity. You might have to log in again.
current paypal url is:

Code: Select all

	$p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';     // paypal url
I am lost :(

Post Reply