View Full Version : PHP Photo Album - Cart Button Customization

09-23-2011, 03:37 AM
1) Script Title: PHP Photo Album script v2.11

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

3) Describe problem: Successfully installed the script and corrected the javascript bug that messes up the source order. I managed to use a <SPAN></SPAN> as the description for each image because i want to use each image as a product with a "add to cart" button". The first page with the items displays the add to cart buttons but the other page "PAGE 2" doesn't show. How can i fix this? sample code below:-

bracelets.desc[1]="<span class=wooo price=True>0</span>"

09-23-2011, 04:12 AM
Please post a link to you site and relevant codes .

Otherwise noby will be able to tell what is happening because they don't know where to look .


09-23-2011, 04:14 AM
The link to the website is. If i switch between "Page 1" or "Page 2" the add to cart buttons just disappears.


09-23-2011, 05:25 AM
Can someone help me please?? I really need the help

09-23-2011, 08:20 AM
Add the highlighted script:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="/JaDazzle/wooo/js/jquery-1.4.2.min.js"></script>
<script src="/JaDazzle/wooo/js/bloooming.woooshop.js"></script>
<script type="text/javascript">
<script src="/JaDazzle/wooo/js/jquery.stylish-select.min.js"></script>
<link href="/JaDazzle/wooo/css/woooshop.css" rel="stylesheet" type="text/css" />
<script src="/JaDazzle/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="images/getalbumpics.php?id=bracelets"></script>
<script type="text/javascript">

//Optional, manual description for particular pictures inside album
//Syntax: albumid.desc[index]="Picture description here"
bracelets.desc[16]="<span class=wooo price=True>0</span>"
bracelets.desc[17]="<span class=wo . . .

to the top of the page there as shown.

09-23-2011, 01:03 PM
Thank you sooooo much you are so helpful. You are a true brother and gentleman. Thanks once again.

09-23-2011, 01:06 PM
Ok one more question is it possible for this line of code

bracelets.desc[16]="<span class="wooo" price="True" text="add to cart">0</span>"
The price="true" is used to display the price on the button also

Problem #1: If i add the quote symbols for the class, price and text i get a syntax error. How can i correct this. The price="true" allows the button to have the price attached to it.

Problem #2: The add to cart buttons work fine, but when i click on page 2 the carts button doesn't work. Even if i switch back to page one they don't work. They would only work if i refresh the entire page. Any solution? Thanks a lot

09-23-2011, 06:30 PM
To the first question, use single quotes to delimit the string:

bracelets.desc[16]='<span class="wooo" price="True" text="add to cart">0</span>'

For the second question I'd try editing spicyradio.net/JaDazzle/wooo/js/bloooming.woooshop.js where it has:

$('.shopme p').click(function(){

var pid = $(this).attr('rel');

$('body').prepend('<div class="sh . . .

Make that:

$('.shopme p').live('click', function(){

var pid = $(this).attr('rel');

$('body').prepend('<div class="sh . . .

I'm not sure if you can access that file, or if the change will help. But it's worth a shot.

Browser cache may need to be cleared and/or the page refreshed to see changes.

10-06-2011, 02:48 AM
Need a little more assistance with the PHP Photo Album Script. The problem i am having is that i have renamed my images for example :- 300 ($1), 301($2), 302($3), 303($4)....which shows up fine and exactly how i want it. The only problem is if i delete or remove image 301($2), the image 302($2) moves in place of 301($2) and messes up my prices.

How can i stop my images from moving, i want the images to be stationary. Can someone help me please. I would really appreciate the help and Thanks!

10-06-2011, 02:40 PM
Is there a way to stop PHP Photo Album script from changing the images id's if a image is deleted? What i would prefer is if a image with id 203 is removed i would want 203 removed completely not for another image to given the id 203.

10-06-2011, 03:34 PM
I'm not sure of the situation here but it sounds like, since the descriptions, which I think include what I think is the id (highlighted) you are talking about, are being assigned on the basis of the numeric order (highlighted and red - from the test page's source code)::

<script type="text/javascript">

//Optional, manual description for particular pictures inside album
//Syntax: albumid.desc[index]="Picture description here"
necklaces.desc[0]='<span class="wooo" price="True">102</span>'
necklaces.desc[1]='<span class="wooo" price="True">103</span>'
necklaces.desc[2]='<span class="wooo" price="True">104</span>'
necklaces.desc[3]='<span class="wooo" price="True">105</span>'
necklaces.desc[4]='<span class="wo . . .

When you take one away, they shift with all that follow the removed one getting out of order. If that's the problem. there is an alternative way to do the descriptions that should work, see:


particularly post number 3. You need the modified script. It's attached to that 3rd post.