Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: PHP Photo Album - Cart Button Customization

  1. #1
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default PHP Photo Album - Cart Button Customization

    1) Script Title: PHP Photo Album script v2.11

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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:-
    PHP Code:
    bracelets.desc[1]="<span class=wooo price=True>0</span>" 

  2. #2
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default

    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 .

    Bud

  3. #3
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    The link to the website is. If i switch between "Page 1" or "Page 2" the add to cart buttons just disappears.

    http://www.spicyradio.net/JaDazzle/Sample.htm

  4. #4
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Can someone help me please?? I really need the help

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Add the highlighted script:

    Code:
    <!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">
    <head>
    <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">
    jQuery(function($){
    	$('.albumnavlinks').click(function(){$('.wooo').bloooming_shop();});
    });
    </script>
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you sooooo much you are so helpful. You are a true brother and gentleman. Thanks once again.

  7. #7
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by scarrface; 09-23-2011 at 03:49 PM.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    To the first question, use single quotes to delimit the string:

    Code:
    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:

    Code:
       	$('.shopme p').click(function(){
       		
       		var pid = $(this).attr('rel');
    
            $('body').prepend('<div class="sh . . .
    Make that:

    Code:
       	$('.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.
    Last edited by jscheuer1; 09-23-2011 at 06:44 PM. Reason: Thought of something to try for 2nd question
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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. #10
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •