Jump to content

How to add customer_id into a Link


JulianClaude

Recommended Posts

Hi,

 

i'm new at prestashop and i havn't any developing skills. I have an issue and i really hit a wall.

 

I want to add for every product add a new button with an individual link for every product to an externel website. Until here everything is fine, i can do it. But i need some dynamic parameters in the link like the customer id, the product id and maybe an random number between 1 an 1.000.000.

 

For example:

 

Product A: www.example.com/ppc&si1="customer ID"s2="product ID"s3="random number"

Product B: www.test.com/abc&ud1="customer ID"ud2="product ID"ud3="random number"

 

My first consideration was to use the context object to get the IDs an create the number with php function and write everything in the product description. But... prestashop don't allow such code here :(

 

My secound Idea was to edit the product file to insert the code, but i have absolutly no idea how i get the individual link betwen that code.

 

My last idea was to create a new product field, i found a really nice tut so i guess i should accomplish that, and write the code in that field and use eval to insert code directly from database. But my own feeling is, that this would not work for some reason, and maybe there is a more easier way to accoumplish the same result.

 

I found no way to enable php in description  :(

 

Can anyone help or guide me? The more i read about it, the less i understand it  :(

 

 

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...