Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help to change script to scrolling

    I would like some help to change this script to a scroller, right now it will on change when images is clicked, I don't know if it is possible or not.
    Code:
    if ($form_data{'order_form_button'} || $form_data{'order_form_button.x'} ||
        $form_data{'submit_order_form_button'} || $form_data{'submit_order_form_button'} ||
        $form_data{'viewOrder'} || $form_data{'viewOrder.x'} ||
        $form_data{$process_variable{$gateway}})
    {
       $random_products = "";
    } else {
    	$imageURL = "$URL_of_images_directory";
    
       open(DATAFILE, "$sc_log_file_directory_path/products.txt") || &errorcode(__FILE__, __LINE__, "$sc_log_file_directory_path/products.txt", "$!", "print", "FILE OPEN ERROR", "0");
       @line=<DATAFILE>;
       close (DATAFILE);
    
       srand;
    
       $array1 = $line[int rand(@line)];
       $array2 = $array1;
    
       $d_counter = 0;
    
       while ($array2 eq $array1 || $d_counter eq 20)
       {
          $array2 = $line[int rand(@line)];
          $d_counter++;
       }
    
       @special1 = split (/\|/, $array1);
       @special2 = split (/\|/, $array2);
    
       $image1 = $special1[4];
       $image2 = $special2[4];
    
       $special1[2] = &display_price(&format_price($special1[2]));
       $special2[2] = &display_price(&format_price($special2[2]));
    
       $random_products .= qq~
          <p align="center">
             <font face="Arial" size=1><a href="$sc_store_url?pid=$special1[0]&amp;cart_id=$cart_id"><img src=$imageURL/product/$special1[4] border=0></a><br>
             </font><font size="1"><font face="Arial"><a href="$sc_store_url?pid=$special1[0]&amp;cart_id=$cart_id">$special1[3]</a><br>
             <b>Only: <font color="#FF0000"> $special1[2]
             </font></b></font><BR>
             <font color="#000000" face="Arial"><b>&lt; </b><a href="$sc_store_url?pid=$special1[0]&cart_id=$cart_id">More
             Info</a><b> &gt;</b></font>
             </font>
          </p>
          <p align="center">
             <font face="Arial" size=1><a href="$sc_store_url?pid=$special2[0]&cart_id=$cart_id"><img src=$imageURL/product/$special2[4]
             border=0></a><br>
             </font><font size="1"><font face="Arial"><a href="$sc_store_url?pid=$special2[0]&amp;cart_id=$cart_id">$special2[3]</a><br>
             <b>Only:<font color="#FF0000"> $special2[2]
             </font></b></font><BR><font color="#000000" face="Arial"><b>&lt;</b> <a href="$sc_store_url?pid=$special2[0]&cart_id=$cart_id">More
             Info</a> <b>&gt;</b></font>
             </font>
          </p>
       ~;
    }
    
    1;

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    I think your best solution is to take Jason's advice which was given in your cross post on EE.

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you for your help


  •  

    Posting Permissions

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