X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Detailed Image(s) Popup 2.1 [3.4.x-4.0.x] (https://forum.x-cart.com/showthread.php?t=8460)

scraps 03-08-2005 08:35 AM

I did not give up :)
 
I did not give up and finally got this working for me in 4.04. I had been not commenting out the part where you take out the detailed images from bottom of page. I am not all that familiar with how to do this stuff, so that doesn't help, but I am learning. :) I had commented out the part I was suppose to, but I didn't realize you have to also comment the "if" statements under the scripting lines as well.

I do have a question, is it possible when the window pops up to have the window open slightly larger so you can see the "next" and "previous" buttons. My images are small enough that I'm not seeing these on the pages that popup. (Possibly a note could be added to "resize" there windows to see more images before the first image pops up)

Thank you so much, left a donation for you today, as I really love this option.

B00MER 03-08-2005 10:17 AM

Any 30,40 or 85 values, you find in the script you can simply increase these values to get a larger viewing area (padding/margin).

Thanks for the donation ;)

scraps 03-08-2005 12:37 PM

I managed to get that window a bit larger and am happy with how it works now Boomer, one last question on this mod, is there a way to have it "close" when it comes to the last detailed image and they click on the next button for next image, but if no image is there it would close window automatically, or have it say how many images such as a 1 of 3 at image 2 might say 2 of 5, image 3 in the window or just some way of the customer knowing how many images are there? For new people to carts especially, they will wonder why no "next" image is coming up.

Thank you,

B00MER 03-08-2005 01:42 PM

The script is setup to simply loopback to the 1st image, the customer should realize they are back at the begining or you can auto close if they reach the end by editing the function forward() in product_images.tpl:

Code:

function forward(){
        if (which<photos.length-1){
                which++
        } else {
                which=0;
        }


to:

Code:

function forward(){
        if (which<photos.length-1){
                which++
        } else {
                window.close();
        }


weckie 03-08-2005 03:08 PM

language
 
have you read my message BOOMER. on page six last message....

B00MER 03-09-2005 05:56 AM

Re: language in product_images.tpl
 
Quote:

Originally Posted by weckie
Q: I have changed the words Previous and Next to {$lng.lbl_previous} and {$lng.lbl_next}.

I created the labels in each language. BUT. nothing appears.
maybe i did something wrong. Could you help me a bit.


Try removing the entries you added and add this to SQL patch area:
Code:

INSERT INTO xcart_languages (code, descr, name, value, topic) VALUES ('US', 'next', 'lbl_next', 'Next', 'Labels');
INSERT INTO xcart_languages (code, descr, name, value, topic) VALUES ('US', 'prev', 'lbl_previous', 'Previous', 'Labels');


issay 03-11-2005 09:26 AM

Will it be possible to have the detailed image appearing in the default location set by xcart, but only one image at a time. If there are more than one image, have a <previous> and <next> button to navigate through the imges. It all happens in the product page not in a pop-up window ... pop-ups are a nusiance sometimes .. hope someone can help.

velander 03-16-2005 08:45 AM

Code to automatically close the pop-up window.
 
I found that if the user doesn't close the pop-up window, and then selects another detailed image from another product, it will display in the same pop-up window, but it doesn't get focus, so it can stay hidden if it is behind another window.

I have added code to automatically close the pop-up window if the user clicks on another window.

Add the following code to product_images.tpl before the end of the java script which ends with:

Existing code:
Code:

//-->
</script>
{/literal}



Insert code:
Code:

function kill_it() {
        window.close();
}


Then change the body tag from:

Code:

<body LEFTMARGIN=0 TOPMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
to:

Code:

<body LEFTMARGIN=0 TOPMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onblur="kill_it()">

I made this change on a version 4.0.12 cart, but it should work on any version.

Thanks for the great mod, Boomer. You saved me lots of time.

weckie 03-16-2005 10:33 AM

works only with one detailed image....
 
hi eric

The automatic kill is great, BUT.... if you have more than one detailed image you can not use previous or next function. if you click on NEXT the window will close instead of showing the next image.

May be you can solve this problem somehow...

longhorn180 03-18-2005 02:09 PM

Hey Boomer. I sell books online and I have an image that I call on the product_thumbnail.tpl file that displays above the picture if it is an audio book. It's just a way to let the customer know whether or not it's an audio book. I also need it to show above the image on the product.tpl, but I don't know the proper way to write it to work with your javascript in the detailed_popup.tpl file. Here is the code:
Code:

{if $products[product].param08 eq "Audio Books"}[img]{$ImagesDir}/audio.gif[/img]
{/if}


I was hoping you might be able to help me figure this out. Here is an example of the what I'm talking about:

http://www.thecrackedbook.com/xcart/customer/home.php?cat=294


All times are GMT -8. The time now is 01:50 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.