Results 1 to 10 of 1681

Threaded View

  1. #11
    Join Date
    Dec 2009
    Posts
    24
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Get well soon chrome

    Please can someone help me with this little problem. I don't know PHP very well at all but I've tried my best.

    I'm using DPUv2 which is working great BTW! The problem is I have replaced the code from "<!--bof Add to Cart Box -->" to "<!--eof Add to Cart Box -->" in my "tpl_product_info_display.php" with this code that I got from another thread:

    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 != '') { ?>
    
        <?php
          echo $display_qty;
          ?>
    
          <div id="cartAdd" style="display:none;"> Wait .....  images are uploading ......<br>
          This can take several minutes .... Please wait ...<br> <img border="0" src="/includes/templates/pc020/images/progress.gif" width="350" height="50"> </div><a href="javascript:ShowDiv()"></a> <div onclick="ShowDiv()">
           <center><br>
          <?
            if  ($pr_attr->fields['total'] > 0 && (!$_SESSION['customer_id'])) {
    
           echo '<a href=index.php?main_page=login><b><font size="3" color="red">IMPORTANT:<br>You have to login before order this item<br>
    --- Log in here ---</a></font></b>';
    
            } else {
    
        echo $display_button;
      }
                ?>
              </div>
              </div>
    
    <script language="javascript">
    function ShowDiv()
    {
    document.getElementById("cartAdd").style.display = '';
    }
    </script>
      <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    What it does is hides the add to cart function until the user logs in. I want this in order to prevent the user uploading files without logging in.

    The problem, this has caused with DPU is that the price is displayed as 0 until the user logs in. I would like the user to be able to see the prices whether logged in or not.

    I'm not very good at PHP but have played around to try and get the price to display with no luck. Does anyone have any idea if I could make this work.

    Any help very much appreciated!!!
    Last edited by gl3ny; 4 Jan 2010 at 01:47 AM. Reason: read better

 

 

Similar Threads

  1. v151 Help with dynamic price updater
    By anderson6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 23 Jul 2014, 08:52 AM
  2. v139h Dynamic Price Updater 3.0 Help!
    By Newbie 2011 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Mar 2014, 06:46 AM
  3. Dynamic Price Updater Error
    By Inxie in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2012, 06:19 PM
  4. Alternative to Dynamic Price Updater?
    By thebigkick in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2012, 11:41 PM
  5. Dynamic Price Updater with href
    By maxell6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Mar 2012, 12:34 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR