Jump to content

El_Heso

Members
  • Content count

    150
  • Joined

  • Last visited

Posts posted by El_Heso


  1. Hi again!

    everything works in my code as well, i missed to put the .js under includes directory

    Great contrib

    Regards Tony :thumbsup:

     

    Hi!

    i have tryed to even download but dont work.

     

    Maybe i have done something bad :-)

    can you see if i missed something in my try to alter the new products:

     

    <!-- new_products //-->

    <?php

    $new_products_query = tep_db_query("SELECT distinct p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name

    FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id)

    LEFT JOIN " . TABLE_CATEGORIES . " c USING (categories_id)

    LEFT JOIN " . TABLE_FEATURED . " f ON p.products_id = f.products_id

    LEFT JOIN " . TABLE_SPECIALS . " s ON p.products_id = s.products_id

    LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id AND pd.language_id = '" . (int)$languages_id . "'

    where p.products_status = '1' AND f.status = '1' ");

     

     

    $no_of_new_products = tep_db_num_rows($new_products_query);

     

    $pblock_html = '';

    while ($new_products = tep_db_fetch_array($new_products_query)) {

    $pblock_html .= '<div class="scrollblock"><div><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></div>'.

    '<div class="scrollblock_img"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>'.

    '<div class="scrollblock_price">'. $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</div></div>';

    }

     

     

    ?>

    <table class="scroller" border="0" width="100%" cellspacing="0" cellpadding="0">

    <tr><td width="100%" align="right">

    <span class="scrollcnter">Page <span class="txt_pn">1</span> of <span class="txt_maxpn"><?php echo ceil($no_of_new_products/5); ?></span>

    <a href="#" onclick="return false;" class="scrollrestart"> (start over) </a></span>

    </td></tr>

    <tr><td width="100%">

    <table><tr>

    <td width="5%" align="right"><img src="images/icons/button_scroll_left_up.gif" class="gol"></td>

    <td width="90%" class="smallText">

    <span class="scrollcontainer"><span class="scrollbox">

    <?php echo $pblock_html; ?>

    </span></span>

    </td>

    <td width="5%" align="left"><img src="images/icons/button_scroll_right_up.gif" class="gor"></td>

    </tr></table>

    </td></tr>

    </table>

    <!-- new_products_eof //-->

     

    Regards Tony


  2. Hi!

    i have tryed to even download but dont work.

     

    Maybe i have done something bad :-)

    can you see if i missed something in my try to alter the new products:

     

    <!-- new_products //-->

    <?php

    $new_products_query = tep_db_query("SELECT distinct p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name

    FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id)

    LEFT JOIN " . TABLE_CATEGORIES . " c USING (categories_id)

    LEFT JOIN " . TABLE_FEATURED . " f ON p.products_id = f.products_id

    LEFT JOIN " . TABLE_SPECIALS . " s ON p.products_id = s.products_id

    LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id AND pd.language_id = '" . (int)$languages_id . "'

    where p.products_status = '1' AND f.status = '1' ");

     

     

    $no_of_new_products = tep_db_num_rows($new_products_query);

     

    $pblock_html = '';

    while ($new_products = tep_db_fetch_array($new_products_query)) {

    $pblock_html .= '<div class="scrollblock"><div><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></div>'.

    '<div class="scrollblock_img"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>'.

    '<div class="scrollblock_price">'. $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</div></div>';

    }

     

     

    ?>

    <table class="scroller" border="0" width="100%" cellspacing="0" cellpadding="0">

    <tr><td width="100%" align="right">

    <span class="scrollcnter">Page <span class="txt_pn">1</span> of <span class="txt_maxpn"><?php echo ceil($no_of_new_products/5); ?></span>

    <a href="#" onclick="return false;" class="scrollrestart"> (start over) </a></span>

    </td></tr>

    <tr><td width="100%">

    <table><tr>

    <td width="5%" align="right"><img src="images/icons/button_scroll_left_up.gif" class="gol"></td>

    <td width="90%" class="smallText">

    <span class="scrollcontainer"><span class="scrollbox">

    <?php echo $pblock_html; ?>

    </span></span>

    </td>

    <td width="5%" align="left"><img src="images/icons/button_scroll_right_up.gif" class="gor"></td>

    </tr></table>

    </td></tr>

    </table>

    <!-- new_products_eof //-->

     

    Regards Tony

     

    Seems like you don't have the jQuery running? If you are in your local testing machine, make sure you have internet turned on, otherwise downloand and run your local copy of jQuery. If you have jQuery loaded before this add-on, you don't need to load it again.

     

    Also don't alter the table structure in new_products.php file unless you modify the js file accordingly.

     

    Hope this helps.


  3. Hi!

    Hopefully a great contrib, but my problem is that i can´t scroll to next page

    any idea how to fix the problem?

     

    HORIZONTAL PRODUCT SCROLLER

     

    http://addons.oscommerce.com/info/7938

     

    Basic function of this addon: scrolling a set of product with image horizontally with left and right buttons, a page counter shows current position and a start over button to reset the scroller. (A screenshot is included in the download file.)

     

    Shouldn't too hard to adapt this to CSS and/or template based versions, I may add one later.


  4. Hi!

    I have a problem with STS, i have this code i header in index.php.html:

    <script language='javascript' type='text/javascript'>

     

    function showDiv(pass) {

    var divs = document.getElementsByTagName('div');

    for(i=0;i<divs.length;i++){

    if(divs.id.match(pass)){//if they are 'see' divs

    if (document.getElementById) // DOM3 = IE5, NS6

    divs.style.visibility="visible";// show/hide

    else

    if (document.layers) // Netscape 4

    document.layers[divs].display = 'visible';

    else // IE 4

    document.all.divs.visibility = 'visible';

    } else {

    if (document.getElementById)

    divs.style.visibility="hidden";

    else

    if (document.layers) // Netscape 4

    document.divs.visibility = 'hidden';

    else // IE 4

    document.all.divs.visibility = 'hidden';

    }

    }

    }

     

    </script>

     

    then this under the body tag:

    <?php

    if (HOLIDAY_SETTINGS == 'on')

    {

    ?>

     

     

    <div id="F512" >

     

    <a href="javascript:showDiv('F256')"><img src="info.png" border="0"></a>

    </div>

     

    <div id="F256" style="position: absolute; left:250px; top:0px; visibility: hidden">

    " here is the ordinary code for the page "

     

    </div>

     

    and my problem is that in the case i click the image the "normal" page shows ( that´s the point ) but every sts tag ex. $categorybox$ don´t show at all it´s blank in the space there it should be a category menu

     

    Any idea how to make this work?

     

    Regards Tony


  5. Hi!

    I have a problem with STS, i have this code i header in index.php.html:

    <script language='javascript' type='text/javascript'>

     

    function showDiv(pass) {

    var divs = document.getElementsByTagName('div');

    for(i=0;i<divs.length;i++){

    if(divs.id.match(pass)){//if they are 'see' divs

    if (document.getElementById) // DOM3 = IE5, NS6

    divs.style.visibility="visible";// show/hide

    else

    if (document.layers) // Netscape 4

    document.layers[divs].display = 'visible';

    else // IE 4

    document.all.divs.visibility = 'visible';

    } else {

    if (document.getElementById)

    divs.style.visibility="hidden";

    else

    if (document.layers) // Netscape 4

    document.divs.visibility = 'hidden';

    else // IE 4

    document.all.divs.visibility = 'hidden';

    }

    }

    }

     

    </script>

     

    then this under the body tag:

    <?php

    if (HOLIDAY_SETTINGS == 'on')

    {

    ?>

     

     

    <div id="F512" >

     

    <a href="javascript:showDiv('F256')"><img src="info.png" border="0"></a>

    </div>

     

    <div id="F256" style="position: absolute; left:250px; top:0px; visibility: hidden">

    " here is the ordinary code for the page "

     

    </div>

     

    and my problem is that in the case i click the image the "normal" page shows ( that´s the point ) but every sts tag ex. $categorybox$ don´t show at all it´s blank in the space there it should be a category menu

     

    Any idea how to make this work?

     

    Regards Tony


  6. I find it difficult to provide FREE STS support when one begins with:

     

     

     

    STS is very powerful and very easy to install. Please follow the directions very closely. If all else fails, use a file comparison tool such as Beyond Compare or WinMerge to compare your installed files with those from the contribution.

     

    Hi Bill!

    I wonder if you can give me some hint how i can manage to include the additional_image to product_info.php.html.

     

    Is there a guide or something how to include contributions in sts? how to code for example attributes etc etc so i can figure out how to make the codes for the different logics of each contribution i want to make possible to include in product_info.php.html?

     

    Regards Tony


  7. Hi!

    Im trying to manage to inlude additional_image.php in product_info.php.html. from this contribution ( Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox_1 )

     

    I tryed to replicate the function of this beeacuse that was the only function that i found that reminded me of what im trying to do.

     

    $sts->start_capture();

    if ((USE_CACHE == 'true') && empty($SID)) {

    echo tep_cache_also_purchased(3600);

    } else {

    include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }

    $sts->stop_capture ('alsopurchased'); // Get the result to the main array

    $template_pinfo['alsopurchased']= $sts->template['alsopurchased']; // Put it in the product info

     

    I thought that this would work beacuse that file also includes from modules as additional_image also do

     

    but i cant make this work...

    Has anyone manage to get it work to use $additionalimage in product_info under content?

     

    Regards Tony


  8. Hi Bill!

    Im trying to manage to inlude additional_image.php in product_info.php.html. from thiscontribution ( Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox_1 )

     

    I tryed to replicate the function of this beeacuse that was the only function that i found that reminded me of what im trying to do.

     

    $sts->start_capture();

    if ((USE_CACHE == 'true') && empty($SID)) {

    echo tep_cache_also_purchased(3600);

    } else {

    include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }

    $sts->stop_capture ('alsopurchased'); // Get the result to the main array

    $template_pinfo['alsopurchased']= $sts->template['alsopurchased']; // Put it in the product info

     

    I thought that this would work beacuse that file also includes from modules as additional_image also do

     

    but i cant make this work...

    any idea how to get it to work so i only put $additionalimage in product_info under content?

     

    Regards Tony


  9. Hi Bill!

    Im trying to manage to inlude additional_image.php in product_info.php.html. from thiscontribution ( Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox_1 )

     

    I tryed to replicate the function of this beeacuse that was the only function that i found that reminded me of what im trying to do.

     

    $sts->start_capture();

    if ((USE_CACHE == 'true') && empty($SID)) {

    echo tep_cache_also_purchased(3600);

    } else {

    include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }

    $sts->stop_capture ('alsopurchased'); // Get the result to the main array

    $template_pinfo['alsopurchased']= $sts->template['alsopurchased']; // Put it in the product info

     

    I thought that this would work beacuse that file also includes from modules as additional_image also do

     

    but i cant make this work...

    any idea how to get it to work so i only put $additionalimage in product_info under content?

     

    Regards Tony


  10. Tony,

     

    Try something like this and then let me know if it worked for you:

     

    Insert the following code into includes/modules/sts_inc/product_info.php just before the last ?>

     

     
    
    $sts->start_capture();
    $prod_quantity = tep_get_products_stock($products_id); 
    switch ($prod_quantity) { 
    case 0: 
    print '<img src="images/stock_soldout.gif" border="0">'; 
    break; 
    case 1: 
    print '<img src="images/stock_limitedstock.gif" border="0">'; 
    break; 
    case 2: 
    print '<img src="images/stock_limitedstock.gif" border="0">'; 
    break; 
    case 3: 
    print '<img src="images/stock_instock.gif" border="0">'; 
    break; 
    case 4: 
    print '<img src="images/stock_instock.gif" border="0">'; 
    break; 
    default: 
    print '<img src="images/stock_instock.gif" border="0">'; 
    } 
    $sts->stop_capture ('prod_quantity'); // Get the result to the main array
    
    $template_pinfo['prod_quantity']= $sts->template['prod_quantity']; // Put it in the product info

     

    The above would create a product_info content template tag named $prod_quantity that you could place in your product_info content template.

     

    Hope this worked out for you,

    Thanks Bill!!

    It worked perfectly.


  11. Hi Bill!

    Do you know how to put this code into product_info.php.html so it works??

     

    this code come from http://addons.oscommerce.com/info/968 ( Stock display (images / text ))

     

     

    CODE

    <?php

    $prod_quantity = tep_get_products_stock($products_id);

    switch ($prod_quantity) {

    case 0:

    print '<img src="images/stock_soldout.gif" border="0">';

    break;

    case 1:

    print '<img src="images/stock_limitedstock.gif" border="0">';

    break;

    case 2:

    print '<img src="images/stock_limitedstock.gif" border="0">';

    break;

    case 3:

    print '<img src="images/stock_instock.gif" border="0">';

    break;

    case 4:

    print '<img src="images/stock_instock.gif" border="0">';

    break;

    default:

    print '<img src="images/stock_instock.gif" border="0">';

    }

    ?>

     

     

    I have tryed to implement the code into includes/modules/sts_inc/product_info.php

     

    But i dont know how i should make the code

     

     

    Need help

     

    Regards Tony


  12. Hi!

    Does someone know how to put this code into product_info.php.html so it works??

     

    <?php 
     $prod_quantity = tep_get_products_stock($products_id); 
     switch ($prod_quantity) { 
      case 0: 
      print '<img src="images/stock_soldout.gif" border="0">'; 
      break; 
      case 1: 
      print '<img src="images/stock_limitedstock.gif" border="0">'; 
      break; 
      case 2: 
      print '<img src="images/stock_limitedstock.gif" border="0">'; 
      break; 
      case 3: 
      print '<img src="images/stock_instock.gif" border="0">'; 
      break; 
      case 4: 
      print '<img src="images/stock_instock.gif" border="0">'; 
      break; 
      default: 
      print '<img src="images/stock_instock.gif" border="0">'; 
     } 
     ?>

     

    I have tryed to implement the code into includes/modules/sts_inc/product_info.php

     

    But i dont know how i should make the code

     

     

    Need help

     

    Regards Tony

    Nobody know??


  13. Hi!

    Does someone know how to put this code into product_info.php.html so it works??

     

    <?php 
     $prod_quantity = tep_get_products_stock($products_id); 
     switch ($prod_quantity) { 
      case 0: 
      print '<img src="images/stock_soldout.gif" border="0">'; 
      break; 
      case 1: 
      print '<img src="images/stock_limitedstock.gif" border="0">'; 
      break; 
      case 2: 
      print '<img src="images/stock_limitedstock.gif" border="0">'; 
      break; 
      case 3: 
      print '<img src="images/stock_instock.gif" border="0">'; 
      break; 
      case 4: 
      print '<img src="images/stock_instock.gif" border="0">'; 
      break; 
      default: 
      print '<img src="images/stock_instock.gif" border="0">'; 
     } 
     ?>

     

    I have tryed to implement the code into includes/modules/sts_inc/product_info.php

     

    But i dont know how i should make the code

     

     

    Need help

     

    Regards Tony


  14. have you installed STS 4.5.8? this will allow you to change the look and content of your product_info.php trough a template so you don't mess up the actual OSc code. you can even have a template for each product if you'd like. it's pretty straightforward if you follow the instructions. There is a whole section in the STS manual (chapter 3) that explains how to make a product_info template.

     

    good luck!

    Yes i have STS installed

×