Thickbox mod for V1.3.4 r2

BINGO!!! the snake is uploaded and working, so the only bugs i have are



2. the thumbs are loaded not the larger image



4. some of the pictures do not open in thickbox but gets redirected to a blank html page with a thumb

Final Piece of the puzzle, so far only tested on images stored in file area



edit skins/…/customer/products_pages/exceptions.js



Replace the following line (its near middle of entire code)



[COLOR=seagreen]new_ref[id] = "javascript:fn_open_popup_image('"+image_index+"?object_type=detailed&image_id="+pr_i[id][row]['detailed_id']+"&window=popup', "+pr_i[id][row]['detailed']['image_x']+", "+pr_i[id][row]['detailed']['image_y']+"+ 30);"[/COLOR]



with this one if your images are stored in the file system



[COLOR=red]new_ref[id] = ""+pr_i[id][row]['detailed2']+""[/COLOR]





Or this one if your images are stored in the database




[COLOR=Red]new_ref[id] = ""+image_index+"?object_type=detailed&image_id="+pr_i[id][row]['detailed_id']+""[/COLOR]







Next edit product_options.tpl



and add the following code as shown in red




pr_i[{$id}][{$smarty.foreach.ii.iteration}-1]['detailed_id'] = '{$imag.detailed_id}';
[COLOR=red]pr_i[{$id}][{$smarty.foreach.ii.iteration}-1]['detailed2'] = '{$imag.detailed.image_path}';
[/COLOR] pr_i[{$id}][{$smarty.foreach.ii.iteration}-1]['options'] = '{$imag.options}';



This allows images that change with additional product options to work correctly.



Anything else im missing here let me know, and if you fancy testing with images from dbase it would be appreciated, I have a live store now so cannot play as much with things like that.

here is a link that shows



4. some of the pictures do not open in thickbox but gets redirected to a blank html page with a thumb



[url]http://mirkury.com/shop/image.php?object_type=product&image_id=286[/url]

[quote name=‘mpjbay’]BINGO!!! the snake is uploaded and working, so the only bugs i have are



2. the thumbs are loaded not the larger image

[/quote]



Ok ive just sent my images to the dbase temporarily…



change this code :



{if $show_detailed_link && $images.detailed_id}

{if $settings.General.images_location == "database"}
{assign var="detailed_href" value="$image_index?object_type=detailed&image_id=`$images.detailed_id`"}
{else}
{assign var="detailed_href" value="`$images.detailed.image_path`"}
{/if}

{/if}




I will also update main post to reflect this…

how can i tell?



when i added the images to the “additional images” i added using the admin backend/manage products/images"additional images"



then i uploaded the thumbs and popup image by browsing my computer.



see image.

Untitled-1.jpg

[quote name=‘mpjbay’]how can i tell?



when i added the images to the “additional images” i added using the admin backend/manage products/images"additional images"



then i uploaded the thumbs and popup image by browsing my computer.



see image.[/quote]



Think we posted at same time, check above !

[quote name=‘mpjbay’]how can i tell? [/QUOTE]



Click on the images in the admin area to see what sizes they are in full and thumbnail size.

ha ha you’re right. i will change the code.



thanks =)

I have now tested with / without database and with additional options / images all seems to work cross browser from my site ok.

I see, the popup image are the larger size from the thumbnails. Before I installed the mod the popup would load the larger image.



BTW thank you for your help on this. Everyone is busy and I appreciate your time.





Quote:

Originally Posted by mpjbay

how can i tell?





Click on the images in the admin area to see what sizes they are in full and thumbnail size.

i will give it a go. thank you

No worries, after seeing it on sculpting’s website I had to get it working on mine, so all the hours spent where well worth it.



The last few fixes just make it a better more usable mod for everybody else !



Just to make sure, it may be worth referring back to my first post, its fully updated with all changes gone on today…



Let me know when its live, so I can have a look :cool:



P.S



Am I correct in saying images from the database are not cached ? wouldnt this slow down loading of repeated pages being browsed considerably ?? (what a nooob question) Im using images in the file area but worth asking for others

Hi SWS,



it is working solid except the thumbnails are loading instead of the larger images.



in admin i have the correct larger images to popup after the thumbnails are clicked.



again, thank you for your help. i was having a hard time figuring this out.

it is good to meet other people who think the same way i do. i will recheck the update to see if there was something i missed that is causing the thumbs to load instead of the larger image (other than this issue everything works), i made the change so the database is referenced (the last post).



i will let you know when my store is live. hopefully monday although you can see it now in “test” mode. i just have a few more graphics and back end stuff to do and it will be ready to go live.


[quote name=‘SWS’]No worries, after seeing it on sculpting’s website I had to get it working on mine, so all the hours spent where well worth it.



The last few fixes just make it a better more usable mod for everybody else !



Just to make sure, it may be worth referring back to my first post, its fully updated with all changes gone on today…



Let me know when its live, so I can have a look :cool:[/QUOTE]

Goto first post and replace the first section…



[COLOR=Red]You will notice the change from object_type and also the removal of a typo

( an extra ` before $image_index )



Correct images will then load

[/COLOR]

SWS, I still have some weird bug. Check at the link I gave you. It loads the first image and sets the current on Prev.



I’m not getting the product text on the popup either.



My page has no “additional images”, try your site without them. Only add different images for the options and see if it works for you.

That is wierd…



Ill set up another product option on my site to test it, incase its something to do with that… I dont have that issue though and must admit have updated the code quite a few times in the past hour… may be worth just double checking that also.

Definatly dont have a problem my end.



It may be worth you restoring the few template files and re-adding the code



It shouldnt take that long !

Looking good Mpjbay



You gotta love this mod… makes all your images look like polaroids !

Can you add your code of popup_image.tpl into the first post again? I’ll try recreate everything again.