Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: custom inventory look

    my product id is 1, but when i do this i get the sold out button but it definitly has stock - what am i missing ? :)

    i think i have to define the product id somewhere to begin with ?

    Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      // do nothing
    } else {
    ?>
                <?php
        $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['1'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['1']) . '</p>' : '');
                if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
                  // hide the quantity box and default to 1
                  $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('1', (int)$_GET['1']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                } else {
                  // show the quantity box
        $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['1'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['1']) . '<br />' . zen_draw_hidden_field('1', (int)$_GET['1']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                }
        $display_button = zen_get_buy_now_button($_GET['1'], $the_button);
      ?>
      <?php if ($display_qty != '' or $display_button != '') { ?>
        <div id="cartAdd">
        <?php
          echo $display_qty;
          echo $display_button;
                ?>
              </div>
      <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->

  2. #12
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: custom inventory look

    ive nearly sussed it - ive added &product_id=1 to the end of the link and put product_id back in the code but i only get the add to cart button and not the quantity or buy now button!

    arrgggghhhh
    Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      // do nothing
    } else {
    ?>
                <?php
        $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
                if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
                  // hide the quantity box and default to 1
                  $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                } else {
                  // show the quantity box
        $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                }
        $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
      ?>
      <?php if ($display_qty != '' or $display_button != '') { ?>
        <div align=center">
        <br /><br />
    <table width="477" border="0" align=center cellpadding="4" cellspacing="0" bgcolor="#0000CC">
    <tr>
    <td class="whitetext">
    <p align="justify">Hosting slots available: <?php
          echo $display_qty;
    echo;
          echo $display_button;
                ?>
              </div>
      <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box--></p></td>
    </tr>
    </table>

  3. #13
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Re: custom inventory look

    need this quite urgently now - ive put a commercial help request in as well

    thanks

  4. #14
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: custom inventory look

    *bump* a

  5. #15
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,690
    Plugin Contributions
    11

    Default Re: custom inventory look

    I'm way behind the power curve here with security updates for Joomla now. Let me know the specific id of the product in question and I'll see what I can do later today.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  6. #16
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: custom inventory look

    product id is 1 ;) - honestly..

    anything you can do would be great :)

    (i used joomla on another site about 6 months ago and was able to hack something similar hence me wanting to do the same here but i had time then... )

  7. #17
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,690
    Plugin Contributions
    11

    Default Re: custom inventory look

    Here's a copy of a file that will do what you want once you fill in the requirements. Adjust the text as you like. Add css where needed. Then you will need to call it from wherever in the site you want with an include.

    PHP Code:
    <?php

      
    // Connect to the database server
        
    $dbcnx = @mysql_connect("###.###.###.###",
               
    "$$$$$$$""%%%%%%%%%");
      if (!
    $dbcnx) {
        echo( 
    "<P>Unable to connect to the @@@@@@" .
              
    "database server at this time.</P>" );
        exit();
      }

      
    // Select the @@@@@@@ database
      
    if (! @mysql_select_db("^^^^^^^") ) {
        echo( 
    "<P>Unable to locate the @@@@@@@ " .
              
    "database at this time.</P>" );
        exit();
      }

    ?><P> Here is where you put the text you want associated with the call out.  FOR INFO--The ###.###.###.### is the host of your database(could be localhost, an IP address, etc).  The $$$$$$ is the database username.  The %%%%%%%% is the database password.  The @@@@@@ is the site name. The ^^^^^^^^ is the name of your database</P><BLOCKQUOTE>

    <?php
       
    // Request the quantity of the product
      
    $result mysql_query(
                
    "SELECT products_quantity  FROM products WHERE products_id=1");

      if (!
    $result) {
        echo(
    "<P>Error performing query: " .
             
    mysql_error() . "</P>");
        exit();
      }


      
    // Display the quantity in a paragraph
      
    while ( $row mysql_fetch_array($result) ) {
        echo(
        
    "<P>Better Hurry\! We only have <strong>" $row["products_quantity"] . " left\!</strong></P>");
      }
    ?>
    Sorry for the delay. 10G irons in the fire.

    And... I'm sure there will be other suggestions.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  8. #18
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: custom inventory look

    wot a star :)

    its friday night and have been at this site for 14 days straight so i´´m taking a bit of a siesta but will let you know tomorrow :)

    top man

  9. #19
    Join Date
    Aug 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: custom inventory look

    i get this error


    Error performing query: Table 'sling.products' doesn't exist

  10. #20
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,690
    Plugin Contributions
    11

    Default Re: custom inventory look

    IF sling is your table prefix does it have an underscore instead of a period? Check with phpmyadmin to verify the table name.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Making Custom Pop up look nice
    By Halollet in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Jun 2010, 06:10 PM
  2. Custom Look to one sidebox
    By smoke133 in forum Basic Configuration
    Replies: 2
    Last Post: 3 Jul 2008, 02:49 PM
  3. Custom inventory query statement - Need help please
    By 0be1 in forum General Questions
    Replies: 11
    Last Post: 30 May 2008, 02:32 AM
  4. Each sidebox to show a custom look?
    By Taxidermy_smile in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 20 Jul 2006, 06:12 PM

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