Chomper Stomping
jQuery/JavaScript/CSS 3/HTML 5, Java/PHP/Python/ActionScript, Git, Chrome/Firefox Extensions, Wordpress/Game/iPhone App Development and other random techie tidbits I've collected



Software

September 16, 2008

phpbb3 & zen cart integration

I’ve been trying to get the phpbb3 & zen cart integration to work.

I’ve had some errors in the default SQl zen cart comes with. First I was getting an error about an invalid column name in the phpbb_user_groups table (specifically the group_description column not existing). Once I fixed that, I got a very cryptic “1062 Duplicate entry ” for key 2″ error every time I tried to create a new user.

Here’s how to fix BOTH of these problems:

Problem 1 – “column group_description does not exist”:

Edit line 196 in store>includes>classes>class.phpbb.php. Change “group_description” to “group_desc”

Problem 2 – 1062 Duplicate entry ” for key 2:

Edit line 187 (in the same file as in Problem 1). Change it from:

(user_id, username, user_password, user_email, user_regdate)

to:

(user_id, username, user_password, username_clean, user_email, user_regdate)

Edit line 189. Change it from:

(‘” . (int)$user_id . “‘, ‘” . $nick . “‘, ‘” . md5($password) . “‘, ‘” . $email_address . “‘, ‘” . time() .”‘)”;

to:

(‘” . (int)$user_id . “‘, ‘” . $nick . “‘, ‘” . md5($password) . “‘, ‘” . $nick . “‘, ‘” . $email_address . “‘, ‘” . time() .”‘)”;

phpbb requires that each user have a unique “username_clean”. This is the second “key” in the table requirements. The first creates an index on user_id, the second requires username_clean be UNIQUE, the third creates an INDEX on user_birthday, and so on. In fact, at NO POINT do they EVER REQUIRE THE USERNAME TO BE UNIQUE! WHAT????? yep. It’s username_clean that must be unique. zen cart doesn’t even try and insert anything into username_clean, it just tries to make the username (this makes no sense at all!!!).

Feel free to comment if you have any insights/questions!



About the Author

Christopher McCulloh
E-Commerce developer at Finish Line Co-Author of HTML, XHTML and CSS All-in-one Desk Reference for Dummies Graduated from IU with a Bachelors of Media Arts and Science and a Certificate in Applied Computer Science. Tech Editor for Building Facebook Applications for Dummies and Building Websites All-in-one for Dummies 2nd Edition. Creator and maintainer of the Status-bar Calculator Firefox Extension Three years professional experience in Java E-Commerce Development and four years professional experience with PHP for a combined total of seven years professional JavaScript/HTML/CSS experience




 
 

 
mysqlerror

WP phpBB Bridge: Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in wp-content/plugins/wp-phpbb-bridge/inc/widgets/wpbb_topics_widget.php on line 149 This is an error caused by the fact that the WP phpBB Bridge pl...
by Christopher McCulloh
0

 



3 Comments


  1. SmeaskSyday

    Hello People,

    I am new member here

    I just discovered this place and so far i have found lots of good information here.
    I’m looking forward to connecting and contributing to the forum.


  2. daviduxresll

    So , how are you going tocelebrate this Easter Vacation?


  3. Terrebenthx

    Hello hello

    I’m new…Nice forum !

    My name is David, 29 years old (French).

    Nice to meet you !



Leave a Reply

Your email address will not be published. Required fields are marked *

*


2 − = one

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>