Maybe you shouldn't pass the id of the customer into the url. Inside
customer controller, maybe you can just set it like this:
$id = $this->Auth->user('id');
And after that, you got the id of the currently logged user. and every time
you redirect to this controller and this action, it will take the
parameters from currently logged user.
Hope this helps.
2012/8/24 Lucas Simon Rodrigues Magalhaes <[email protected]>
> After add the product detail, I wanna redirect to controller customer
> action view, and my customer id.
>
> look;
>
> http://pastebin.com/84ZTTq2T
>
> Em sexta-feira, 24 de agosto de 2012 14h44min35s UTC-3, ivnrmc escreveu:
>>
>> What exctly are you trying to accomplish?
>> Maybe you can try with $this->redirect($this->**referer());
>>
>>
>> 2012/8/24 Lucas Simon Rodrigues Magalhaes <[email protected]>
>>
>>> I doing it:
>>>
>>> $this->redirect(array('**controller'=>'customers','**action' =>
>>> 'view',$id));
>>>
>>> but do not work.
>>>
>>> Invalid customer
>>>
>>> *Error: * The requested address *'cadastros/admin/customers/view'* was
>>> not found on this server.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to cake-php+u...@**
>>> googlegroups.com.
>>>
>>> Visit this group at
>>> http://groups.google.com/**group/cake-php?hl=en-US<http://groups.google.com/group/cake-php?hl=en-US>
>>> .
>>>
>>>
>>>
>>
>>
>>
>> --
>> *Ivan Rimac***
>> mail: [email protected]
>> *tel: +385 95 555 99 66*
>> *http://ivanrimac.com*
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>
--
*Ivan Rimac***
mail: [email protected]
*tel: +385 95 555 99 66*
*http://ivanrimac.com*
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.