Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / Problem with custom tpl_whats_new.php sidebox after upgrade

Problem with custom tpl_whats_new.php sidebox after upgrade

Locked

Views: 961

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
6 May 2010, 3:30 PM
#1
jla avatar

jla

Zen Follower

Join Date:
Jul 2005
Posts:
128
Plugin Contributions:
0

Problem with custom tpl_whats_new.php sidebox after upgrade

We performed the upgrade from 1.3.7 to 1.3.9b yesterday and for the most part things seem to be working well but we have run into a few problems.

We have a custom box that we build for display of our products on other websites. In the code of our file which is equivalent of the includes\templates\custom_template\sideboxes\tpl_whats_new.php file there is a part of the code that says this

. zen_image(DIR_WS_IMAGES . $random_whats_new_sidebox_product->fields['products_image'], $random_whats_new_sidebox_product->fields['products_name'], 50, 40)

This piece of code dealt with the display of the image in this custom box and would cause the image to appear very small within the 50X40 range (in 1.3.7) Now with this upgrade it seems that the image is appearing in the store default (100X80) range regardless of the fact that in the code it says 50X40.

Any assistance would be appreciated.

8 May 2010, 12:13 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Problem with custom tpl_whats_new.php sidebox after upgrade

Sounds like your /includes/functions/html_output.php file might be damaged or maybe it's using content from another version of Zen Cart or from an addon not built for the ZC version you're using.
Or maybe you've got an image addon that's intercepting the normal image treatment, and thus giving unexpected results.
Or maybe the image itself is damaged somehow?

23 May 2010, 5:02 AM
#3
jla avatar

jla

Zen Follower

Join Date:
Jul 2005
Posts:
128
Plugin Contributions:
0

Re: Problem with custom tpl_whats_new.php sidebox after upgrade

Ok did some more work on this and narrowed this down

If we used this piece as originally written

' . zen_image (DIR_WS_IMAGES . $random_whats_new_sidebox_product->fields['products_image'], $random_whats_new_sidebox_product->fields['products_name'], 57,40 ) . '

The image size in the sidebox for some reason still defaults to 100 X 80

If we do this

' . zen_image_OLD (DIR_WS_IMAGES . $random_whats_new_sidebox_product->fields['products_image'], $random_whats_new_sidebox_product->fields['products_name'] ) . '

Same behavior

BUT if we do this

' . zen_image_OLD (DIR_WS_IMAGES . $random_whats_new_sidebox_product->fields['products_image'], $random_whats_new_sidebox_product->fields['products_name'], 57,40 ) . '

The image in the custom sidebox will now be 57X40 BUT the image now has a border around it.

How can we change the line above for the image to not have a border and why must we switch from zen_image to zen_image_OLD

Thanks

23 May 2010, 11:04 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Problem with custom tpl_whats_new.php sidebox after upgrade

There were no changes to zen_image() or zen_image_OLD() from v1.3.7 to 1.3.8 or 1.3.9, as far as original code is concerned.

Maybe you're using an addon that is changing things?