Jump to content

Url parameters on product page


Recommended Posts

Hello everybody and thank you for reading this.

I have a personal affiliation system, linked to a PS installation (version 1.7.x) using a custom module.

When I use a referral link to push a new customer to sign-up, I send him to the registration page with sponsor code on the URL, like this : https://shop.xxxxx.it/it/login?d=HBKWAJQCIAJKMGAKRGKAPCRVBIMDWA

To get the sponsor information, I use additionalCustomerFormFields hook in my module, I read the sponsor code and I save it in a cookie to be used on sign-up form.

Now, as an option, I would like to create a referral link to point directly to a specific product on my shop, always with sponsor code on it, in this form : https://shop.xxxxx.it/it/men/1-1-hummingbird-printed-t-shirt.html#/1-dimensione-s/8-colore-bianco?sponsor=HBKWAJQCIAJKMGAKRGKAPCRVBIMDWA

Here comes the problem : I don’t know how to get the sponsor code on this page. Every hook I have tried doesn’t get the additional info on the URL.  I have tried hookDisplayProductPriceBlock, and other without any success.

Any clue?

Link to comment
Share on other sites

  • 1 month later...

Hi Tengler

thanks for your reply. I tried to use your suggestion in the "hookDisplayProductPriceBlock" hook, but the sponsor variable is always empty.

 

 

if I use the standard url 

https://shop.xxxxx.it/it/women/2-9-brown-bear-printed-sweater.html#/1-dimensione-s

the product is visible as usual but if I use this link:

https://shop.xxxxx.it/it/women/2-9-brown-bear-printed-sweater.html#/1-dimensione-s?sponsor=HBKWAJQCIAJKMGAKRGKAPCRVBIMDWA

the product is always visible as usul but I can't get the sponsor content.

Thanks a lot for you help

Piccarda

 

 

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