Post by bruce » Thu Apr 17, 2008 10:24 pm

You will need to make the following change to the function index() in catalog\controller\account_create.php so that the address entered is linked correctly to the customer account. Some surrounding code is shown to help with location

Code: Select all

    	if (($request->isPost()) && ($this->validate())) {
      		$sql = "insert into customer set firstname = '?', lastname = '?', email = '?', telephone = '?', fax = '?', password = '?', newsletter = '?', status = '0', date_added = now()";
      		$database->query($database->parse($sql, $request->get('firstname', 'post'), $request->get('lastname', 'post'), $request->get('email', 'post'), $request->get('telephone', 'post'), $request->get('fax', 'post'), md5($request->get('password', 'post')), $request->get('newsletter', 'post')));
            $customerId = (int)$database->getLastId();
/*      		$customer->login($request->get('email', 'post'), $request->get('password', 'post'));
*/
      		$sql = "insert into address set customer_id = '?', firstname = '?', lastname = '?', company = '?', address_1 = '?', address_2 = '?', city = '?', postcode = '?', country_id = '?', zone_id = '?'";
      		$database->query($database->parse($sql, $customerId(), $request->get('firstname', 'post'), $request->get('lastname', 'post'), $request->get('company', 'post'), $request->get('address_1', 'post'), $request->get('address_2', 'post'), $request->get('city', 'post'), $request->get('postcode', 'post'), $request->get('country_id', 'post'), $request->get('zone_id', 'post')));
      		$database->query("update customer set address_id = '" . (int)$database->getLastId() . "' where customer_id = '" . $customerId . "'");
			
			$mail = $this->locator->create('mail');

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by nowhinjing » Fri Apr 18, 2008 12:21 am

Thank-you, Bruce for spotting this unexpected "feature" and posting the fix.  :-*

Most helpfull !

NWJ

Newbie

Posts

Joined
Thu Nov 15, 2007 10:35 pm

Post by nowhinjing » Sun Apr 20, 2008 5:28 pm

Revised and updated package loaded to the Contributions section.  :)

Thanks, again Bruce.

NWJ

Newbie

Posts

Joined
Thu Nov 15, 2007 10:35 pm

Post by gibpat » Thu Jun 26, 2008 7:18 am

After i installed this module its telling me when i view a product page in the price section that:
Notice: Undefined variable: price in /home/website/public_html/webstore/catalog/template/default/content/product.tpl on line 7

which is:

Code: Select all

<?php if ($price) { ?>
what may i need to change to correct this?

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by hm2k » Mon Jun 30, 2008 7:57 pm


UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by bisam » Tue Aug 12, 2008 10:31 pm

Hi Gibpat, did you make any progress with this error? I have the same issue.

Newbie

Posts

Joined
Tue Aug 12, 2008 10:23 pm

Post by bruce » Tue Aug 12, 2008 10:34 pm

change from

Code: Select all

<?php if ($price) { ?>
to

Code: Select all

<?php if (isset($price)) { ?>

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by bisam » Thu Aug 14, 2008 12:19 pm

Thanks Bruce, fixed!
I also had to change



to

 

Why has no-one else hit on this problem? Did I stuff up the module install, or is the fix so obvious to all here that not thought worth commenting on?

Newbie

Posts

Joined
Tue Aug 12, 2008 10:23 pm

Post by Heilong » Wed Oct 22, 2008 6:05 pm

I'd like to use this contribution too.

But I already installed and modified the templates files and if I remember well some php files also.

Which lines need to be modified, cause in the readme it's just said to copy the files not really helpful for a previous installation.

Thanks for help

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by bruce » Wed Oct 22, 2008 6:15 pm

Unfortunately, you are stuck with the code review.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by randomfactor » Wed Oct 22, 2008 7:15 pm

Heilong wrote: [...]
Which lines need to be modified, cause in the readme it's just said to copy the files not really helpful for a previous installation.
[...]
1. Started with a copy of v0.7.7 from http://open-cart.googlecode.com/svn/trunk/0.7.7/upload.

2. Copied contributed files over the source.

3. Created a patch file using TortoiseSVN.  Attached.

Heilong, if you haven't seen patch files before, google for "diff" and "patch" which are standard unix utilities from back in the day.

New member

Posts

Joined
Mon Jul 07, 2008 1:43 am

Who is online

Users browsing this forum: No registered users and 5 guests