Jump to content

Help with this link from AdminOrders to AdminCustomers?


AFemaleProdigy

Recommended Posts

This should be pretty simple. I have added a section to AdminOrders.php with some information I needed to have available there. This information is originally listed on AdminCustomers.php and is edited in the customer account profile. I want to be able to click the edit link from the order page to edit this field. I tried to modify the link, but I am getting an Invalid Security Token error. Anyone know what I need to change to get rid of the error?

 

Modified link added to AdminOrders.php:

 

<a href="index.php?tab=AdminCustomers&addcustomer&id_customer='.$customer->id.'&token='.$this->token.'">

 

Original link copied from AdminCustomers.php:

 

<a href="'.$currentIndex.'&addcustomer&id_customer='.$customer->id.'&token='.$this->token.'"><img src="../img/admin/edit.gif" /></a>

 

Thanks!

Link to comment
Share on other sites

What exactly will that do for me? How will that solve my problem with the url? I really don't want to install an unknown Firefox module written in a foreign language. I am just looking for suggestions about how to make this link work properly. It works fine when I use it on AdminCustomers.php. It just won't work on AdminOrders.php.

Link to comment
Share on other sites

  • 2 weeks later...

Nevermind. I figured it out myself. This works...

 

<a href="?tab=AdminCustomers&addcustomer&id_customer='.$customer->id.'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'&back='.urlencode($_SERVER['REQUEST_URI']).'"><img src="../img/admin/edit.gif" /></a>

Link to comment
Share on other sites

  • 4 months later...

sorry, i didnt answer before

 

this addon is a very usefule tool which allow you to see the Http requests made by your browser(firefox).

 

so you can see which value and which variable are sent in a POST or GET on a http request

 

checking was is wrong with your token

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...