Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default zencart mysql and php help needed

    im making an addon to the site which is an image scrolling slideshow which can be added to any page within zencart.

    This mod will take the images and links from the featured items.

    Their is no mod like this in the download section or seaching on the net so im going to have to make on my self. Im bound to run into some problems so will be asking for help in here.

    so who is good with the mysql working of zencart??

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: zencart mysql and php help needed

    The SQL would be the same as is used for the featured products sidebox, except that you might want to change the number of products extracted.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: zencart mysql and php help needed

    cheers for that, now i just need to get it to output in a in a way to for the scolling javascript code to work.

  4. #4
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: zencart mysql and php help needed

    does the standard code only show one item in the featured item box??

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_featured.php 6128 2007-04-08 04:53:32Z birdbrain $
     */
      $content = "";
      $featured_box_counter = 0;
      while (!$random_featured_product->EOF) {
        $featured_box_counter++;
        $featured_box_price = zen_get_products_display_price($random_featured_product->fields['products_id']);
        $content .= '<div class="sideBoxContent centeredContent">';
        $content .=  '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); 
        $content .= '<br />' . $random_featured_product->fields['products_name'] . '</a>';
        $content .= '<div>' . $featured_box_price . '</div>';
        $content .= '</div>';
        $random_featured_product->MoveNextRandom();
      }
    ?>
    i need to to output more than one item image and these need to be wrapped like so

    Code:
    leftrightslide[0]='<a href="http://link to product"><img src="image.gif" border=0></a>'
    leftrightslide[1]='<a href="http://ling to product"><img src="image.gif" border=0></a>'
    leftrightslide[2]='<a href="http://ling to product"><img src="image.gif" border=0></a>'

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: zencart mysql and php help needed

    No. There's a while loop in there allowing the code to display as many products as were pulled from the database.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: zencart mysql and php help needed

    co i can edit the $content senction in the side box code so i can remove the div etc and add my own tags but how can i make it so if i say get 10 items from the features items how can i out put the code to include the leftrightslide[0]=' then for next image leftrightslide[1]=' the 2 3 4 etc ??

 

 

Similar Threads

  1. zencart and SSL certificate help needed
    By DarkAngel in forum General Questions
    Replies: 4
    Last Post: 1 Dec 2009, 03:16 AM
  2. PHP, Apache, MySQL all needed for paypal?
    By jamesdavid in forum Basic Configuration
    Replies: 6
    Last Post: 23 Apr 2008, 01:35 PM
  3. Help needed with epdq and zencart checkout
    By dna in forum General Questions
    Replies: 0
    Last Post: 14 Sep 2006, 11:56 AM

Posting Permissions

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