Jump to content

Thickbox larger?


Recommended Posts

Hello,

I'm new here and installed Prestashop with no problem. I have to problem, and I hope you can help me:

1. Everything work fine, excepting the thickbox . I know that the thickbox size is 70 or75% from the screen resolution. I want to make it bigger. Let's say 90-95%. Do you have any idea which is the file should I modify? I would like to change 75% into 90% for example.

2. The second problem is. I succeed to translate the prestashop 100% excepting one thing:
I can not transate the subject of the email sent when we contact a customer via the back office. The original email subject is: "New message regarding your order #". I want to translate this. I know that it should be someting in the lang.php file like:
$_LANGMAIL['New message regarding your order'] = 'and translation goes here'; -- But it does not work,

Any idea where should I translate this subject?

Thank you,
Marius

Link to comment
Share on other sites

Hi,

It may be worth experimenting with different values in the thickbox javascript file (/js/jquery/thickbox-modified.js), particularly lines 196 and 197:

TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL

Link to comment
Share on other sites

I haven't tried this, but in the Back Office you'll find Preferences-->Images. There a value for the image size for thickbox..... does changing that (and recreating all the images, I guess) make a difference? My theory is that if the maximum size is 600x600 it isn't going to display any bigger....

For the second question, you need to change these using the Back Office again. Its under Tools-->Translations.

Paul

Link to comment
Share on other sites

Hello,

Thanks for the reply but...yes we can increase the thickbox. Please see here an example:
http://www.4-pieds.com/746-chaise-de-cuisine.html

but who know how to increase this....

Regarding the translation please note that in Tools>>translation we can only translate the content of the website, but no the subject of the email. In order to change the email subject I think we need to change it directly into the database, but I'm not sure.

Any other ideas?

Thanks,
Marius

Link to comment
Share on other sites

hi guys,
to modify thickbox size follow instructions below:

open thickbox-modified.js in root/js/jquery
on the line 112 you will find following code:

// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;

If you replace minus sign with plus, then you'll get bigger frame.


If you want to adjust vertical position of Thickbox, just replace red bold number with 2.5 for instance.
on the line 291 you will find:

function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( !(jQuery.browser.msie6)) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}


Good luck!

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for all your replies.

One more question here:

Do you know which is the place I should edit to inrease the image quality the Prestashop uploads? It seems that the image quality from my shop are not the same high quality as the images I uploaded from my compter. I think prestashop changes the image DPI when uploading it. Where should I keep the same DPI?

Thanks.

Link to comment
Share on other sites

Thanks for all your replies.

One more question here:

Do you know which is the place I should edit to inrease the image quality the Prestashop uploads? It seems that the image quality from my shop are not the same high quality as the images I uploaded from my compter. I think prestashop changes the image DPI when uploading it. Where should I keep the same DPI?

Thanks.


As far as I know PrestaShop only does Image resizing, the defauld maximum image size is 2000Kb. I'll stronger suggest to format your picture in Photoshop to adjust it's size. I do use HQ pictures as well but they are all much less than 2000Kb. Suggest you to read some tutorials about web images optimization. Ufortunately I don't know how to increse this limit in the code.

Cheers,
Max
Link to comment
Share on other sites

Thanks Max,

Still have to question if you are so kind to help me with them:

1. I noticed that when I replace a product image with another, the old image still show in back office (the front office works fine). Do you know how to fix it? My only chance is to delete that product and add another one, but this is not what I want. I just want to replace an image with a new one and can't see the new one in Back Office.

2. The second problem is. I succeed to translate the prestashop 100% excepting one thing:
I can not transate the subject of the email sent when we contact a customer via the back office. The original email subject is: “New message regarding your order #”. I want to translate this. I know that it should be someting in the lang.php file like:
$_LANGMAIL[‘New message regarding your order’] = ‘and translation goes here’; — But it does not work,

Any idea where should I translate this subject?

Thank you,
Marius

Link to comment
Share on other sites

Thanks Max,

Still have to question if you are so kind to help me with them:

1. I noticed that when I replace a product image with another, the old image still show in back office (the front office works fine). Do you know how to fix it? My only chance is to delete that product and add another one, but this is not what I want. I just want to replace an image with a new one and can't see the new one in Back Office.

Good question; I have a feeling that there is a bug in the code, however without any modification you can just press CTRL+R to refresh the page after uploading new image, this should help. Also make sure you've selected "USE AS PRODUCT COVER OPTION"

2. The second problem is. I succeed to translate the prestashop 100% excepting one thing:
I can not transate the subject of the email sent when we contact a customer via the back office. The original email subject is: “New message regarding your order #”. I want to translate this. I know that it should be someting in the lang.php file like:
$_LANGMAIL[‘New message regarding your order’] = ‘and translation goes here’; — But it does not work,

Thare is order_merchant_comment.html in the /mails /en/ folder, edit it as you want.

Let us know about results.
Cheers!
Link to comment
Share on other sites

Thanks Max,

Still have to question if you are so kind to help me with them:

1. I noticed that when I replace a product image with another, the old image still show in back office (the front office works fine). Do you know how to fix it? My only chance is to delete that product and add another one, but this is not what I want. I just want to replace an image with a new one and can't see the new one in Back Office.

Good question; I have a feeling that there is a bug in the code, however without any modification you can just press CTRL+R to refresh the page after uploading new image, this should help. Also make sure you've selected "USE AS PRODUCT COVER OPTION"

Yes, I think too this is a bug. However I entered today in the product detail and I found the right image (maybe it takes some times before the new image display). However I found the wrong thumbnail image in the category. Maybe I need to wait more time until the images on every product from a certain category to change.

2. The second problem is. I succeed to translate the prestashop 100% excepting one thing:
I can not transate the subject of the email sent when we contact a customer via the back office. The original email subject is: “New message regarding your order #”. I want to translate this. I know that it should be someting in the lang.php file like:
$_LANGMAIL[‘New message regarding your order’] = ‘and translation goes here’; — But it does not work,

Thare is order_merchant_comment.html in the /mails /en/ folder, edit it as you want.

No, you miss understood me!. I do not want to change the content of that email I just want to change the subject of the email that shows in the customer mail inbox (not the content of the email). Any ideas how?
Let us know about results.
Cheers!
Link to comment
Share on other sites

  • 1 month later...

hello guys

I know am alittle bit late but I really need an answer

I changed "-" to "+"
on my personal pc (localhost appache) it worked but when I did it to the online version it didn't work nothing changed!!!

other thing is that I want to increase the size of product img in home page so I put 120*120 instead 80*80 but it does not look ok
the image is over the description and in (viewed products) it comes out of the box
in product page if you add more than one img they are under each other not next to each other!!!

I wanted to try to enlarge the img default size in Css or Tpl will that work and how to do it

AND one more thing as mentioned above the quality of the img is much less than the original one
I use GIF < how to fix that too

regards,

Link to comment
Share on other sites

  • 2 weeks later...

Hi

I changed the "-" to "+" and it worked fine but my original picture is larger than the screen (which is what i want). How do i make the thickbox scroll instead of the background or page behind the thickbox?

I dont know javascript so i appreciate any help

Link to comment
Share on other sites

  • 11 months later...

Hi,

I want to bring this issue up again. I have not found a solution to scroll the thinkbox instead of the background. It does not make any sense to scroll the background. The problem I am facing is alarge thinkbox image getting stuck in the page. You cannot see the navigation or the close button. Any expert can help? I am sure a lot of people are having the same problem.

Link to comment
Share on other sites

  • 4 months later...
hi guys,
to modify thickbox size follow instructions below:

open thickbox-modified.js in root/js/jquery
on the line 112 you will find following code:

// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;

If you replace minus sign with plus, then you'll get bigger frame.
Thanks for the instructions, it worked for me. I'm using PS 1.2.5.0. Although the code is different in mine, it looks like this
var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;

Still changing the + to - worked.

Link to comment
Share on other sites

  • 1 month later...

I also would love to know how to make Thickbox scroll WITH the browser window scrollbars. Who cares if the background scrolls, in fact that's useless when a Thickbox is open. When a Thickbox is open it's the foreground, that should be the focus of the scrollbars. Any developers out there have this working correctly? Yes, correctly, because it's incorrect to scroll the background and not the foreground.

Very frustrated... shadowbox resizes when the browser resizes, and there is NO way to get it not to. So, I switched to Thickbox, and what does it do, it won't scroll at all!

Link to comment
Share on other sites

  • 2 months later...

I would like to know how to scroll the thickbox as well .... Has anyone got an answer ?

EDITED :

Ok here's what I got. Change the FIXED to ABSOLUTE in the file root/css/thickbox.css this will make your thickbox scrollable with the background as well

#TB_window {
   position: fixed;
   background: #ffffff;
   z-index: 102;
   color:#000000;
   display:none;
   border: 4px solid #525252;
   text-align:left;
   top:50%;
   left:50%;



to

#TB_window {
   position: absolute;
   background: #ffffff;
   z-index: 102;
   color:#000000;
   display:none;
   border: 4px solid #525252;
   text-align:left;
   top:50%;
   left:50%;




This is done in Prestashop version 1.3.1.1

Link to comment
Share on other sites

  • 1 year 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...