fxdesca Posted October 22, 2012 Share Posted October 22, 2012 hello, Im having hard time doing something that migth be simple (its been 3 weeks now : ok i stink) : I would like to add a parameter at the end of my product page url like : www.myshop.com/furniture/medium-case?template=2 Can you please give me the code to achieve that ? Thanks a lot Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 22, 2012 Share Posted October 22, 2012 for action there is a reaction...i.e. there has to be an initiation, click of a link etc. Once you isolate when you want to change the URL, i.e. where to click etc...then change the code to add it...but then of course you need to be able to read it... my suggestion is to look at existing modules in your prestashop, see how the work...those that have forms (configurable)...how they have actions and how the read the request. Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 22, 2012 Share Posted October 22, 2012 and some advice...don't double post to get help...if you don't get a response to the first post...it's because you did not provide enough information...adding another...this turn's off some of the more frequent posters.... 1 Link to comment Share on other sites More sharing options...
fxdesca Posted October 23, 2012 Author Share Posted October 23, 2012 and some advice...don't double post to get help...if you don't get a response to the first post...it's because you did not provide enough information...adding another...this turn's off some of the more frequent posters.... ok i see, thanks for the advice. Here's more information then : the parameter has no real function. I just want to add this parameter to an alternate product page (a different theme) in order to have a different url from the original one. 3 weeks of search, not 1 single helpful response. Heres the reason for the double post : nervous breakdown Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 23, 2012 Share Posted October 23, 2012 (edited) jajajaja..not a single helpful post....there is an old saying 'I'd like to help you out but I don't know what door you came in." ps does not support more than one theme per shop....there is a 1.4 module that does this.... there is still not enough information for (at least me) to help you. maybe back up and explain what you are really trying to accomplish. here is a suggestion that might help...if you want to change the look of your site based on some criteria, you can change what .css is loaded via the header.tpl. There is a lot of information on this path and if interested search (use google not ps search) surte Edited October 23, 2012 by elpatron (see edit history) Link to comment Share on other sites More sharing options...
fxdesca Posted October 23, 2012 Author Share Posted October 23, 2012 jajajaja..not a single helpful post....there is an old saying 'I'd like to help you out but I don't know what door you came in." ps does not support more than one theme per shop....there is a 1.4 module that does this.... there is still not enough information for (at least me) to help you. maybe back up and explain what you are really trying to accomplish. here is a suggestion that might help...if you want to change the look of your site based on some criteria, you can change what .css is loaded via the header.tpl. There is a lot of information on this path and if interested search (use google not ps search) surte I've been crawling google for weeks now. I didnt wait ps forum to give me responses. But i got no luck on the web either. What a really want to do is : A/B Testing. I have 2 different product.tpl, each of them gives my product page a different look. When you run a/b test you test your different templates in the same time. It means (say) 50% of the traffic is redirected to templateA and 50% of the traffic is redirected to template B. To achieve that in Google Experiment, or any other A/B tesing tool, you need to provide 2 differents url so they can split the traffic between the 2 templates. Thats why i wanna put a parameter at the end of the url using template B. This way i can differenciate it from the url of template A. Is it more clear with these explainations ? Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 23, 2012 Share Posted October 23, 2012 (edited) Yes, that is pretty good explanation. Basically the reason you can't find the answer and are near nervous breakdown is because ps does (especially in 1.4) not to support more than one template. I've seen what I think you want accomplished, by modifying the header.tpl (which calls all the .css files required). So you could then for example have another global.css file for different. Look at the call for header.tpl, you should be able to then read your URL, then replace the target .css. suerte Edited October 23, 2012 by elpatron (see edit history) Link to comment Share on other sites More sharing options...
fxdesca Posted October 23, 2012 Author Share Posted October 23, 2012 Yes, that is pretty good explanation. Basically the reason you can't find the answer and are near nervous breakdown is because ps does (especially in 1.4) not to support more than one template. I've seen what I think you want accomplished, by modifying the header.tpl (which calls all the .css files required). So you could then for example have another global.css file for different. Look at the call for header.tpl, you should be able to then read your URL, then replace the target .css. suerte Well okay i'll try to do that. Thank you el patrone Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 23, 2012 Share Posted October 23, 2012 I saw the other post...having two worked after all. hoping you great success Link to comment Share on other sites More sharing options...
fxdesca Posted October 24, 2012 Author Share Posted October 24, 2012 I saw the other post...having two worked after all. hoping you great success Yes i'm nearly there, just need to fix a little probleme, and maybe i will finally get there. Thanks again o for your help anyway. I had to come to english forum to finally get people to try and help. Have a good day Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 24, 2012 Share Posted October 24, 2012 Yes i'm nearly there, just need to fix a little probleme, and maybe i will finally get there. Thanks again o for your help anyway. I had to come to english forum to finally get people to try and help. Have a good day there is a reason that I did not suggest switching the template via the define, many themes have their own modules, so unless you have a duplicate module folder for that theme...and switch module folders as well..then there may be unpredictable results...for a one off hack one can give this method a try...but for a module that has to work for everyone I have up on it for my multiship module... Link to comment Share on other sites More sharing options...
fxdesca Posted October 24, 2012 Author Share Posted October 24, 2012 there is a reason that I did not suggest switching the template via the define, many themes have their own modules, so unless you have a duplicate module folder for that theme...and switch module folders as well..then there may be unpredictable results...for a one off hack one can give this method a try...but for a module that has to work for everyone I have up on it for my multiship module... Yeah i got to test it up, but so far it looks pretty good. The only thing with de "define" method is that the paramater disappear when you click a link and navigate away from the page...Thats my main problem now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now