Jump to content

Noob General Questions - Hooks & Links


GAR

Recommended Posts

Hi Peeps,

Complete PS Noob here.... version 1.7.4.2 ...... generally trying to increase my understanding of how PS works.

We have installed a theme and customised it to our liking.... however I have some pretty basic questions that I can't seem to find the answer to anywhere :

1- What happens to a fixed link on a menu (i.e. /public_html/prestashop/page1.html) when the publish directory is moved to the root of public_html folder ? (when the site goes live). Is this handled by the re-write in the htaccess file ? If it is re-written..... how does this affect SEO in the link (i.e. what do the search engines see ?).

2- Why can't I add a hook into a page ? One of our modules uses a hook which isn't used in our theme - is there an easy way to add it ? When trying to transplant the module, the hook required isn't listed as an option ?

Thanks for any help ! :)

Graham.

Edited by GAR (see edit history)
Link to comment
Share on other sites

37 minutes ago, GAR said:

1- What happens to a fixed link on a menu (i.e. /public_html/prestashop/page1.html) when the publish directory is moved to the root of public_html folder ? (when the site goes live). Is this handled by the re-write in the htaccess file ? If it is re-written..... how does this affect SEO in the link (i.e. what do the search engines see ?).

 

After move, you will need update the URL.

 

38 minutes ago, GAR said:

2- Why can't I add a hook into a page ? One of our modules uses a hook which isn't used in our theme - is there an easy way to add it ? When trying to transplant the module, the hook required isn't listed as an option ?

 

Of course this depends on the module, if it allow to insert a hook everywhere, then could be possible.

Link to comment
Share on other sites

Thanks for your reply.... however it leaves me no wiser.... lol :)
Surely on publishing you don't have to go through the entire store re-doing all of the fixed links in menus and footers ? That could take ages !
There must be a better way ?

 

Link to comment
Share on other sites

Well...  I found the solution - not because it seems to exist anywhere in PS documentation (which incidentally seems shit to the point of useless).

Firstly - to my menu question.... if you choose the right menu, then you can make links and they don't have to be absolute.

Secondly - the hooks question ....to add a hook into a page section, find the header.tpl for the theme you're using and modify the hook it uses.... in my case from "displayTopCentre" to "displayTop".

Great community - thanks for all your help !!! Sarcasm intended.
 

Link to comment
Share on other sites

Hi ya  your in the forum for general topics and not really the one about customizing a theme and how PS works on a code level. Perhaps you will find their git hub more that speed as I do.

https://github.com/PrestaShop/PrestaShop

I sense you are an American? due to the anger/ very sarcastic tone LOL This is fine with me I write it fluent, but many don't get it or respond to it well. This project is French and as such we have no borders and you may not get answers cause of the tone and how its interpreted elsewhere. But I will probably answer cause I also think the docs are as you say.  poor.

 

I will summarize a few key points for ya. Prestashop .1.7.4.2 + is a beast that is not documented. All documentation is for 1.6-

That said the key thing to know is Smarty tpl = views (check out atom.io for a great tool for editing them install the smarty extension).

php file is the controller

and the ajax wierd anonymous calls are the data model bind. This can be a for lack of a better term NIGHTMARE.

In prestashop 1.7.4.2 NEVER have more then classic and the theme your currently using installed. Just trust me you don't even want to know the why.

In your dev site find a theme you want. ONLY customize the custom.css file or the custom.js file.

Build your concept and sell it to client.

When you build the real site turn on maintenance mode and  install the selected theme. Then start moving the pieces via the design and position sections in back office/admin. Once you got those all hooked into the right "I will coin them view areas ie. nav1()" upload your CSS file. DO NOT do it before done hooking. TRUST me again on this, the dom is built after the hooks are set by the smarty template compiler and the css selectors are very picky about where they are in the dom as a child.

The community you seek is there just not on the general forum. they be on Github.

 

 

 

 

Link to comment
Share on other sites

 

Salut !

Thanks very much for the reply.... although 50% of it went over my head.... I'm not a developer.... I'm building a site for my own business.

Github is way way over my head. Thanks very much for the warnings !

And I grew up in France and currently live in the UK :)

There was only one sarcastic comment .... lol.  PS is very frustrating for a non-coder.... I think we'll employ a developer for the more difficult aspects.... life is way too short. :)

 

Link to comment
Share on other sites

Well that is interesting, you sure do have the classic angry American tone down well! I read a few posts of your not just 1.

I completely agree PS is frustrating for non coders. Most of the frustration can be eliminated with a high quality theme written for your local.  Just test it out before buying it. Also go to the developers site and see if they have a backoffice demo cause that is where you need to see how the theme interacts with you and understand if its a fit.

 

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