Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouppriceprocessor.php Creating Multiple "NOT LOGGED IN" group prices. #199

Closed
ghost opened this issue Feb 24, 2015 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Feb 24, 2015

When I use a csv like
"sku","group_price:NOT LOGGED IN",
"sku1","10.99"

Every time I run my profile, it creates multiple customer group prices under the same product called "NOT LOGGED IN".

I haven't had any time to dive into the processor, but was wondering if anyone else had seen this

@ghost
Copy link
Author

ghost commented Feb 27, 2015

I have figured out whats going on here.

$id = $this->selectone($sql, $groupname, "customer_group_id") returns a zero if the customer group is "NOT LOGGED IN" because the id is zero.

On line 115

if ($id = $this->selectone($sql, $groupname, "customer_group_id")){
    $this->_groups[$col] = array('name'=>$groupname,'id'=>$id);
 }
else{
    if($groupname == 'NOT LOGGED IN'){
        $this->_groups[$col] = array('name'=>$groupname,'id'=>$id);
    }
    else{
            $this->_groups[$col] = 
            array('name'=>$groupname,'id'=>$this->createGroup($groupname));
    }
}

I added a check for NOT LOGGED IN to prevent this. The '0' return was being treated as a boolean false by the if statement.

damien42c added a commit to damien42c/magmi-git that referenced this issue Feb 19, 2016
@ghost ghost closed this as completed Feb 20, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants