Jump to content

[solved] Help editing contact block module


zee28

Recommended Posts

Hi,

I am trying to edit the text of some modules such as the contact block. I have been searching for the file where i change it but i can not seem to find it. Can anyone please help me out.

i am trying to chnage the text 'Our hotline is available 24/7' which can not be changed in the module section in the back office.

 

The block highlighted in red is the one i wish to change

PLEASE HELP ME :)

 

ZEE....

post-625572-0-60901600-1374143973_thumb.jpg

Link to comment
Share on other sites

you have to use translations feature: localization > translate tab in your back office

 

then from first dropdown list select "modules translations"

 

then you will be able to modify the text, just find it on the list and change the translation

  • Like 1
Link to comment
Share on other sites

When I try to do this I get this message

 

"Warning! Your PHP configuration limits the maximum number of fields allowed in a form:

1000 for max_input_vars.

Please ask your hosting provider to increase the this limit to 1649 at least or edit the translation file manually."

Link to comment
Share on other sites

thanks for info zee28

now i can mark thread as [solved]

 

anyway, you can also mark own threads as [solved], here is an instruction:

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.

 

best regards

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

in the file:

modules/blockcontact/blockcontact.tpl

 

you've got:

  {if $email != ''}<a href="mailto:{$email|escape:'htmlall':'UTF-8'}">{l s='Contact our expert support team!' mod='blockcontact'}</a>{/if}

 

 

you can also go to the localization > translation

from first dropdown select "modules"

then click on flag

search for field you want to translate "Contact our expert support team!"

Link to comment
Share on other sites

in the file: modules/blockcontact/blockcontact.tpl you've got:
 {if $email != ''}[email="{$email|escape:"]{l s='Contact our expert support team!' mod='blockcontact'}[/email]{/if} 

you can also go to the localization > translation from first dropdown select "modules" then click on flag search for field you want to translate "Contact our expert support team!"

 

Hi vekia,

 

Thanks for the information.

 

But I realized there are two files with the same name blockcontact.tpl but slightly different content. The one you mentioned is residing in the main modules directory and there is a warning saying the content should not be changed if I wish to upgrade Prestashop version in future. The other file is found in the \themes\ folder, which I managed to change for the 24/7 default message.

 

Can you tell me why the files have the same name but one left out the CONTACT OUR EXPERT SUPPORT TEAM message?

 

Also if I change the content in the file as what you suggested, how will it affect my website when I upgrade in future?

Link to comment
Share on other sites

it is because prestashop has got "override" feature. It mean, that you can create module .tpl files in the theme directory. If module files exist in the theme directory - you have to change the content there.

 

Hello vekia,

 

I tried your method but it didn't work. Seems like I have to copy the .tpl from the modules folder to the theme folder to override it, as mentioned in another thread.

 

By the way, how do I increase the font size of the phone number? I can't seem to find any size commands in the .tpl file. Thanks!

Link to comment
Share on other sites

Hello vekia,

 

I tried your method but it didn't work. Seems like I have to copy the .tpl from the modules folder to the theme folder to override it, as mentioned in another thread.

 

i just wrote it above.

If module files exist in the theme directory - you have to change the content there.

 

moreover, if you changing something in the .tpl file, you have to turn force compilation on

sometimes it is necessary, especially while you're working on .tpl files

Link to comment
Share on other sites

i just wrote it above.

 

 

moreover, if you changing something in the .tpl file, you have to turn force compilation on

sometimes it is necessary, especially while you're working on .tpl files

 

Hello vekia,

 

Thanks for the clarification.

 

You forgot to answer the question below. Kindly assist.

 

By the way, how do I increase the font size of the phone number? I can't seem to find any size commands in the .tpl file. Thanks!

Link to comment
Share on other sites

in the file: /modules/blockcontact/blockcontact.css near the line: 18

you've got something like this:

 

#contact_block p.tel {
margin: 0 0 0 60px;
padding-left: 26px;
font: bold 11px/20px Arial, Verdana, sans-serif;
background: url(images/block_contact_pict_tel.png) no-repeat 0 0 transparent;
}

 

font: bold 11px/20px Arial, Verdana, sans-serif, this is definition of the font style , just customize it :)

Link to comment
Share on other sites

  • 3 months later...

Vekia,

 

Can you clarify? I am using the default theme and I am trying to change "Our hotline is available 24/7". I go to Modules, then find contactblock and click Configure. I then click the flag at the top and I'm brought to the Manage Translations page in the "Module blockcontact" section.

 

I change the text next to "Our support hotline is available 24/7" then click "Update translations" but the text does NOT change on the page. I have "Force Compile" turned on and I refreshed the page.

 

Seems straight-forward, so what am I missing?

Link to comment
Share on other sites

Yes, the default theme is selected. Under Preferences->Themes it is the only one available and it is selected. I can find only $ themes so I am going to just use the default for now, but I need to change a few minor things (for example I only have email support, so I have to remove references to "24 hour telephone support".

 

I am VERY confused. There is a module named "Block Contact Info" and another named "Contact Block". One says "blockcontactinfos" and the other "blockcontact". The similarity is confusing, but I determined that the second one is the one I want.

 

BTW- I have caching turned off, I clicked "clear cache", and I selected "Force compile".

 

After selecting "Configure" for Contact Block (under Modules->Modules), I clicked the flag next to "Manage Translations" at the top and I'm brought to "Installed Modules translations", scrolled down to blockcontact where I made the textual change. The page does not reflect the change. This location appears to be the same place you get to from Localization->Translation, but when I do that, there is NO blockcontact section. Why is there a difference?

 

I grepped the files on my server and found 2 locations for blockcontact (one under .../modules and the other under .../themes/default/modules). PrestaShop seems to be getting some information from one location and some information from the other location. The "Our support hotline is available 24/7" text is hard coded (thus there is no way to change it through BO) in themes/default/modules/blockcontact/blockcontact.tpl. If I change the text in this file, the text changes on the generated page. The .css and some images come from the other location: /modules/blockcontact directory.

 

Another problem I am having: Since I am providing only email support, I removed the phone number from the module configure page. When I did this, the telephone icon disappeared which caused the entire contact block to be about 20 px shorter, and the first line of text is displayed on top of the background image, which looks terrible. It seems the only fix for this is to edit the .css to add some padding or margin, or create a blank image the exact size of the telephone icon and put it in the same place as a placeholder. Either solution requires editing the .tpl template file as well.

Link to comment
Share on other sites

I'm still looking for help with this. I can't get rid of the "Our support hotline is available 24/7" from the contact block or change it to something like "Email support only".

 

I tried changing the text in several places (I don't understand why are there so many locations for essentially the same thing-- and none of them actually work). Some examples: From Localization->Translations I set it via Front Office Translations (only "default" can be selected here). I changed it via "Installed Modules Translations" for "default" and there is no translation available for "Core (no theme selected)". I set it via the module configure page for blockcontact. NOTHING WORKS!!! I can't be the only user who needed to change this particular piece of text. How is it done???

 

I think PrestaShop is great, but I'm REALLY frustrated. I have now spent 20+ hours on this one issue and if I can't get a resolution soon I will be forced to consider abandoning PrestaShop which would be unfortunate after working full time for a week and a half on my new site. The platform seems wonderful, but if I have to spend 2 days to configure one line of text (and still not succeed) I have to wonder, what kind of issues will I find when actually trying to enter products, etc., which I have not even tried yet?

Link to comment
Share on other sites

  • 7 months later...

Hi,

 

I am currently making minor changes to a free theme, and have a problem with blockcontact module.

 

The 24x7 text line spacing were too close and I thought it's because of the theme's design. Inspecting the element revealed the line-height was set to 8px, but after I tracked down the blockcontact.css the line-height is correctly set to 18px. Any changes to the 18px value doesn't get reflected, the value of 8px persists.

 

Am I missing an override value somewhere?

Link to comment
Share on other sites

Hi,

 

I am currently making minor changes to a free theme, and have a problem with blockcontact module.

 

The 24x7 text line spacing were too close and I thought it's because of the theme's design. Inspecting the element revealed the line-height was set to 8px, but after I tracked down the blockcontact.css the line-height is correctly set to 18px. Any changes to the 18px value doesn't get reflected, the value of 8px persists.

 

Am I missing an override value somewhere?

 

hello

you touched some other css styles that are connected to line-height param?

it's possible to see it live?

Link to comment
Share on other sites

  • 1 month later...

I also have a question about this module. I try to edit it, so adress will look like:

 

Street <enter>

City <enter>

Country

 

I tried to write <br>, look for it in files and search google/this forum. Could you point me which line or at least which file should I edit? I have also doubts should I do it in BlockContact or BlockContactinfos.

post-806085-0-27512900-1408018198_thumb.jpg

post-806085-0-32678900-1408018199_thumb.jpg

post-806085-0-28028000-1408018200_thumb.jpg

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

  • 11 months later...

in the file: /modules/blockcontact/blockcontact.css near the line: 18

you've got something like this:

 

#contact_block p.tel {
margin: 0 0 0 60px;
padding-left: 26px;
font: bold 11px/20px Arial, Verdana, sans-serif;
background: url(images/block_contact_pict_tel.png) no-repeat 0 0 transparent;
}
font: bold 11px/20px Arial, Verdana, sans-serif, this is definition of the font style , just customize it smile.png

 

I don't know what I am doing wrong, but when I edit this line, nothing happens! The font size stays the same... What can I do?

Link to comment
Share on other sites

  • 1 year later...
  • 4 years later...
  • 3 weeks later...

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