quick ??? Shopping Cart Image
12 posts by 4 authors in: Forums > CMS Builder
Last Post: May 20, 2010 (RSS)
By thenetgirl - May 18, 2010
with <INPUT TYPE=HIDDEN NAME=img VALUE="<?php echo $upload['filename'] ?>"/>
but its the full size image
I have variables to add a thumb but not sure how
<INPUT TYPE=HIDDEN NAME=img VALUE="http://ssl.securesites.com/images/purse.jpg">
<INPUT TYPE=HIDDEN NAME=img2 VALUE="http://ssl.securesites.com/images/purse_large.jpg">
thanks
www.thenetgirl.com
Re: [thenetgirl] quick ??? Shopping Cart Image
By Damon - May 19, 2010
Try this for the getting the thumbnail URL:
<?php echo $upload['thumbUrlPath'] ?>
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [thenetgirl] quick ??? Shopping Cart Image
By gkornbluth - May 19, 2010
I know this may sound simplistic, but is it possible to use a foreach loop like this to display the thumbnail image somehow?
<?PHP foreach ($your_tableRecords as $record): ?>
<?php foreach ($record['uploads'] as $upload): ?>
<img src="<?php echo $upload['thumbUrlPath2'] ?>" width="<?php echo $upload['thumbWidth2'] ?>" height="<?php echo $upload['thumbHeight2'] ?>" alt="" />
<?php endforeach ?><?php endforeach ?>
If not, could you be a bit more specific or attach the code you're using outside of the one line you posted?
Thanks,
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] quick ??? Shopping Cart Image
By thenetgirl - May 19, 2010
http://npcclothing.com/adultshirtDetail.php?First-Shirt-1
and this doesnt work when you click add to cart
<INPUT TYPE=HIDDEN NAME=img VALUE="<?php echo $upload['thumbUrlPath'] ?>"/>
<FORM METHOD=POST ACTION="http://ssl.securesites.com/cart.pl">
<INPUT TYPE=HIDDEN NAME=merchant VALUE="exedor2">
<br>
Quantity<font color="#821789">: </font>
<INPUT TYPE=TEXT NAME=quantity VALUE="1" SIZE=2 MAXLENGTH=2>
<INPUT TYPE=HIDDEN NAME=name VALUE="<?php echo $adult_shirtsRecord['product_id_sku'] ?>"/>
<INPUT TYPE=HIDDEN NAME=price VALUE="<?php echo $adult_shirtsRecord['price'] ?>"/>
<INPUT TYPE=HIDDEN NAME=sh VALUE="1">
<INPUT TYPE=HIDDEN NAME=img VALUE="<?php echo $upload['thumbUrlPath'] ?>"/>
<INPUT TYPE=HIDDEN NAME=img2 VALUE="<?php echo $upload['filename'] ?>"/>
<INPUT TYPE=HIDDEN NAME=return VALUE="http://www.npcclothing.com/index.php">
<INPUT TYPE=HIDDEN NAME=custom1 VALUE="<?php echo $adult_shirtsRecord['name'] ?>"/>
<p>Size:
<SELECT NAME=custom2 SIZE=1>
<OPTION>Small $20.00
<OPTION>Medium $20.00
<OPTION>Large $20.00
<OPTION>XLarge $25.00
<OPTION>2XLarge $25.00
<OPTION>3XLarge $25.00
</SELECT></p>
<p> </p>
<p>
<INPUT TYPE=submit NAME="add" VALUE="Add To Cart"></p>
</FORM>
www.thenetgirl.com
Re: [thenetgirl] quick ??? Shopping Cart Image
By Jason - May 20, 2010
On your form you have two hidden fields that use the name of the image, img and img2. img has the actual path (cmsAdmin/uploads/thumb/), where img2 just uses the name.
On your shopping cart page (cart.pl), which variable is being used to display the picture?
Let me know.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] quick ??? Shopping Cart Image
By thenetgirl - May 20, 2010
www.thenetgirl.com
Re: [thenetgirl] quick ??? Shopping Cart Image
By Jason - May 20, 2010
If you view the source, you'll see that the path in the <a> tag is correct, but the path in the <img> tag is this:
cmsAdmin/uploads//cmsAdmin/uploads/thumb
You'll need to change this so that the only path being outputted is the path from the hidden img variable.
Give that a try.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] quick ??? Shopping Cart Image
By thenetgirl - May 20, 2010
www.thenetgirl.com
Re: [thenetgirl] quick ??? Shopping Cart Image
By Jason - May 20, 2010
What's happening is probably something like this:
your <a> probably looks like this:
<a href="*IMG VARIABLE" >
Which does work correctly.
The <img> tag however, probably looks like this:
<img src="cmsAdmin/uploads/*IMG VARIABLE*" />
What it needs to look like is this:
<img src="*IMG VARIABLE*" />
This is the correct path to the picture. You can set the height and width to whatever you like.
Hope this helps. If you're still having trouble, attach a copy of you cart script and I'll take a look.
Thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] quick ??? Shopping Cart Image
By thenetgirl - May 20, 2010
<INPUT TYPE=HIDDEN NAME=img VALUE="<?php echo $upload['thumbUrlPath'] ?>"/>
<INPUT TYPE=HIDDEN NAME=img2 VALUE="<?php echo $upload['filename'] ?>"/>
I suppose i can live with that. Only having one image in the cart & i'd rather it be the little one any way
www.thenetgirl.com