Jump to content

is prestashop coded?


Recommended Posts

Hello i have only one question

 

Can we change a thing that is not in the css in prestashop or is it coded definitively and innaccessible?

 

For example in the bloccontact there is mail: [email protected] and if i want to delete the word "mail" i can get it with firebug but in the html. Can we change it?

 

Thank you

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

Prestashop is open source, you can change anything that you want in the coding of Prestashop. But remember to use overrides, because if you do not, when you make changes and then update, it will erase them. 

  • Like 2
Link to comment
Share on other sites

Prestashop is open source, you can change anything that you want in the coding of Prestashop. But remember to use overrides, because if you do not, when you make changes and then update, it will erase them. 

Thank you for answer.

 

And in fact what how does it work?

 

For my mail example in my first post or for this example

 

i want to reduce the height, 1250 to 800px to delete the white space. I can do so with firebug in the left column (at the  second picture we can see it).

 

But where do i find this file in the server?

 

726903Sanstitre1.png

 

733488Sanstitre2.png

 

I think if i successful one time i can do what i want then. But the first is the more difficult for me.

 

Thank you!

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

homefeatured.tpl file located in /modules/homefeatured/ or in themes/yourtheme/modules/homefeatured/

 

you've got there:

 

<ul style="height:{$ulHeight}px;">
and {$ulHeight} is the result of the:
 
{assign var='liHeight' value=250}
{assign var='nbItemsPerLine' value=4}
{assign var='nbLi' value=$products|@count}
{math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight}

so if you want to change value of height, just change it in: <ul style="height:{$ulHeight}px;"> (remove variable and put there own value) or just change value of {assign var='liHeight' value=250}

Link to comment
Share on other sites

That looks like it is set by javascript somewhere since it is an inline tag. Do you have a link to the site? 

Sorry my website it not working in line yet.

 

 

 

homefeatured.tpl file located in /modules/homefeatured/ or in themes/yourtheme/modules/homefeatured/

 

you've got there:

 

<ul style="height:{$ulHeight}px;">
and {$ulHeight} is the result of the:
 
{assign var='liHeight' value=250}
{assign var='nbItemsPerLine' value=4}
{assign var='nbLi' value=$products|@count}
{math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight}

so if you want to change value of height, just change it in: <ul style="height:{$ulHeight}px;"> (remove variable and put there own value) or just change value of {assign var='liHeight' value=250}

 

I have down the two propositions (put differents values instead of 250 and change the variable) but it doesn't change anything in my home page.  :, (

Link to comment
Share on other sites

Prestobil.

If I see it correctly:

In your example in post #3, if you look carefully, on the right of your css code (in right column), you see global.css (and probably a line number). This means you can edit this in the themes/<your theme folder>/css/global.css file. If no line number is given, search for a part of the code you see there.

 

post-455771-0-26016600-1381300450_thumb.png

 

Hope this helps,

pascal

 

 

EDIT: See now that it is element.style, which is indeed an inline style directly in the <HTML tag>.... Not in global.css.  :-(

Link to comment
Share on other sites

Sorry my website it not working in line yet.

 

 

I have down the two propositions (put differents values instead of 250 and change the variable) but it doesn't change anything in my home page.  :, (

 

make sure that you changed correct file

i mean that prestashop has got "override" feature. it mean that you can override original module files in your theme directory.

 

if file homefeatured.tpl exists in: themes/YOUR_THEME/modules/homefeatured/ directory - it mean, that you have to edit this file instead of original one.

 

in addition to what i said, make sure that you've got CACHE off and FORCE COMPILE on under adv. preferences > performance tab (if you've got cache ON and force compile off - switch these variablels TEMPORARILY)

Link to comment
Share on other sites

Prestobil.

If I see it correctly:

In your example in post #3, if you look carefully, on the right of your css code (in right column), you see global.css (and probably a line number). This means you can edit this in the themes/<your theme folder>/css/global.css file. If no line number is given, search for a part of the code you see there.

 

attachicon.giffirebug screen.png

 

Hope this helps,

pascal

 

 

EDIT: See now that it is element.style, which is indeed an inline style directly in the <HTML tag>.... Not in global.css.  :-(

 

Yes you're right! I've search a long time in dremweaver this line with the search fonction but i don't find any keyword with "1250". I have the same conclusion but not with your explication ^ ^.

But when i change this it works!

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

make sure that you changed correct file

i mean that prestashop has got "override" feature. it mean that you can override original module files in your theme directory.

 

if file homefeatured.tpl exists in: themes/YOUR_THEME/modules/homefeatured/ directory - it mean, that you have to edit this file instead of original one.

 

in addition to what i said, make sure that you've got CACHE off and FORCE COMPILE on under adv. preferences > performance tab (if you've got cache ON and force compile off - switch these variablels TEMPORARILY)

No homefeatured is not in "Your_theme" it is in /modules/homefeatured/ and the problem is probably what your are speaking about and what DH42 speak later about "Override".

 

I have a look at this in google and to override do i have to create 3 files only and rename them? Is it dangerous for the links of the website?

 

Thank you for help!

Link to comment
Share on other sites

PrestoBil,

The calculation is, as I can see it from here, made to display the featured products. Amount of products to display/products per row etc. I don't think you should mess with this one, as it depends on how many featured products there are, which may vary in time. I think the space comes from somewhere else.

 

Can you show a clear picture of the WHOLE width of your page-bottom? (i.e. including the left and right column, see example)

I have the feeling something else creates the gap...

post-455771-0-91449000-1381379897_thumb.jpg

 

 

About overrides:

 

Normally, modules put their code in /modules/<modulename>/

if you want to change for example something in the layout/order of the contents, you can edit the file <modulename>.tpl

 

but if you do that directly in the file: /modules/<modulename>/<modulename>.tpl, the next time an update of this module is installed, it will remove the modifications you made, as it overwrites this file with the new one. So the trick is to do this in your theme file.

If you use the default theme, make a copy of it and work in this copy.

(see here for details how: http://doc.prestashop.com/display/PS15/Creating+your+own+theme )

 

then, COPY the tpl file to this theme, and so that PrestaShop can check if there is a modified file. Prestashop checks in fixed places for this. For example, the tpl file, should be copied to themes<your theme folder>/modules/<modulename>/<modulename>.tpl

 

(so many times it just adds /themes/<your theme folder> in front of the path. )

 

More detailed info about overriding here:

http://doc.prestashop.com/display/PS15/Overriding+default+behaviors

and here specifically about overriding modules:

http://doc.prestashop.com/display/PS15/Overriding+default+behaviors#Overridingdefaultbehaviors-Overridingamodule%27sbehavior

 

 

pascal

Link to comment
Share on other sites

PrestoBil,

The calculation is, as I can see it from here, made to display the featured products. Amount of products to display/products per row etc. I don't think you should mess with this one, as it depends on how many featured products there are, which may vary in time. I think the space comes from somewhere else.

 

Can you show a clear picture of the WHOLE width of your page-bottom? (i.e. including the left and right column, see example)

I have the feeling something else creates the gap...

attachicon.gifbottom of shop page.jpg

 

 

About overrides:

 

Normally, modules put their code in /modules/<modulename>/

if you want to change for example something in the layout/order of the contents, you can edit the file <modulename>.tpl

 

but if you do that directly in the file: /modules/<modulename>/<modulename>.tpl, the next time an update of this module is installed, it will remove the modifications you made, as it overwrites this file with the new one. So the trick is to do this in your theme file.

If you use the default theme, make a copy of it and work in this copy.

(see here for details how: http://doc.prestashop.com/display/PS15/Creating+your+own+theme )

 

then, COPY the tpl file to this theme, and so that PrestaShop can check if there is a modified file. Prestashop checks in fixed places for this. For example, the tpl file, should be copied to themes<your theme folder>/modules/<modulename>/<modulename>.tpl

 

(so many times it just adds /themes/<your theme folder> in front of the path. )

 

More detailed info about overriding here:

http://doc.prestashop.com/display/PS15/Overriding+default+behaviors

and here specifically about overriding modules:

http://doc.prestashop.com/display/PS15/Overriding+default+behaviors#Overridingdefaultbehaviors-Overridingamodule%27sbehavior

 

 

pascal

Thank you for answer, I would answer tomorrow or Saturday because  i have a very busy day and i'm tired (00.19 in France ^^). Don't go far!

 

Thank you!

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