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)
-   -   Very Cool Detailed Images Mod (https://forum.x-cart.com/showthread.php?t=7414)

Donne Giovani 05-02-2004 10:10 PM

Very Cool Detailed Images Mod
 
Hey guys -

Take a look at the following URL -

http://www.angelacarol.com/customer/product.php?productid=547

I have tried to get this to work and I got the images to show up, but I can not get them to link to the specific image.

Can someone help me with this?

Thanks so much,

David Young

Donne Giovani 05-03-2004 07:37 AM

Nevermind, I got it...
 
Guys -

Nevermind.

I got it to work.

Thanks,

David Young

TelaFirma 05-03-2004 09:41 AM

Hmmm...

I am glad that you like the way I did that :D

RobotDeathSquad 05-10-2004 09:39 AM

How DID you do that? Would you like to share?

magder 05-15-2004 06:09 AM

telafirma

Any chance of telling us how you setup your product validation.

How did you get it to work on only one product option?

I can't figure out how to do it without having to put validation in for all options.

Nice Site.

TelaFirma 05-15-2004 07:19 AM

Thank you for the compliment on the site :)

Well, there is a littel bit going on there. First, I wanted to display the "name" of the option within the dropdowns. So, I had to modify the product.tpl file from this:
Code:

<select name=amount>
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}

to this:
Code:

<select name="amount">
<option value="0">quantity</option>
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}

This put the name "quantity" as the first value in the quantity dropdown.

Then when entering my product options, I added the name of the option as the first selection in each listing. So for instance, I create an option named Size. The options would be:

Code:

select a size
Small
Medium
Large
x-Large


Next I needed to edit the customer_options.tpl file to remove the feild names (since they would be displayed in the dropdown).

Then I have to add Product Option Validation to each product. If I have all three options (Size, Color, Quantity) then the validation would look like this:

Code:

if (product_option('Color').selectedIndex == 0)
{ alert('Please Select A Color'); return false; }
if (product_option('Size').selectedIndex == 0)
{ alert('Please Select A Size'); return false; }
if (product_option('amount').selectedIndex == 0)
{ alert('Please Select A Quantity'); return false; }
{ return true; }


If I only have to options (Size, Quantity), then I just enter the appropriate validations:

Code:

if (product_option('Size').selectedIndex == 0)
{ alert('Please Select A Size'); return false; }
if (product_option('amount').selectedIndex == 0)
{ alert('Please Select A Quantity'); return false; }
{ return true; }


Since the default for any dropdown box is to have option "0" selected, this validation checks to make sure that "0" is not selected. So, they are not able to submit to the cart without making a selection from each of the dropdowns.

**Disclaimer** This is a modification that I made on my site and I do not make any warranties that it will work in your sitiation.

magder 05-15-2004 09:40 AM

thanks for taking the time to post this explanation.

I think I've lost you somewhere.
http://oustore.org/customer/product.php?productid=16259&cat=264&page=1

My Option is=Volume
selections are:
Choose a volume
Volume I
Volume II
Slipped Case Set

If I do not include validation for all choices, the product does not go into the cart.

Code:

if (product_option('Volume').selectedIndex== 0)
{ alert('You must chose Volume I, Volume II or Slip-Cased Set. Please close this window and select an option.'); return false; }
if (product_option('Volume').selectedIndex== 1)
{ alert('You chose Volume I'); return true; }
if (product_option('Volume').selectedIndex== 2)
{ alert('You chose Volume I'); return true; }if (product_option('Volume').selectedIndex== 3)
{ alert('You chose Slipped Case Set'); return true; }


What have I missed in your post?
Sorry If I'm a bit thick here.

BTW The brownie site is also very nice. Are they selling them?

TelaFirma 05-15-2004 10:38 AM

Try this....


Code:

if (product_option('Volume').selectedIndex == 0)
{ alert('You must chose Volume I, Volume II or Slip-Cased Set. Please close this window and select an option.'); return false; }
{ return true; }


magder 05-15-2004 10:59 AM

That did it!!

THanks so much.

I can't beleive it was that simple.

Would you accept a small thank-you donation?

TelaFirma 05-15-2004 02:45 PM

No need :) But I appreciate the gesture :)

GM 05-18-2004 01:54 PM

Am I missing something here? How does this factor in to the "Cool Popup Detailed Image"?

Donne Giovani 05-18-2004 07:40 PM

Different Mod - Same Author...
 
GM -

It doesn't, but TelaFirma did a great job with the website which includes a lot of mods, including the last mentioned one.

Thanks,

David Young

GM 05-18-2004 08:10 PM

Oh... I agree... but I was in here to find out how to create a detailed image popup... not surf websites... maybe this should have been posted in "Users Websites"... no offence intended :wink:

TelaFirma 05-19-2004 03:11 AM

Maybe the thread should be split apart. The first part of the thread was someone asking how to do the Detailed Popup and in the middle of the thread someone asked how I did the JavaScript option validation (which I answered).

The thread just got a little off topic is all....

Danielle 01-26-2005 11:30 AM

So how did you do the Detailed Image Popup lol! I would love to know, I can't get it so that the popup is of whichever image you click on. It always opens up to the first image only.

TheComputerGuy 02-20-2005 07:53 AM

Are you using a modified version of B00MER's detailed image mod?

Donne Giovani 02-20-2005 01:12 PM

Detailed Image Mod....
 
I basically built my own since I am on an old version.

I went through a lot of changes and it is very kludgy, but it works.

I am on a very old version and just can not make the justification for upgrading.

I have tried my code in the newer versions and it does not work.

Thanks,

DY

TelaFirma 02-24-2005 03:39 PM

I just built my own also. Seems to work across different version (with a few adjustments here and there).


All times are GMT -8. The time now is 05:46 AM.

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