Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    439
    Plugin Contributions
    0

    Virtual Product configuration

    Hello.

    I've got my custom document - registration product type working. It is based on document - product.

    I've set the admin layout configuration for the type to "virtual". This should mean that stock level is irrelevant, correct?

    However, the display shows this as out of stock, instead of an add-to-cart button.

    I need to keep the stock setting for all other products in my store, to not permit add-to-cart when out of stock. But I thought that a "virtual product" by definition should not refer to stock.

    http://coreknowledge.org/register/in...index&cPath=40

    So, do I have to make up some bogus stock level to make the add-to-cart active?

    Thanks in advance for any guidance.

    ---Diana

  2. #2
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    439
    Plugin Contributions
    0

    Default Re: Virtual Product configuration

    I tried commenting out the stock conditional test code to force "add to cart" to display, but no luck. I put this edited tpl_document_register_info_disply.php in the custom template overrides folder, but it has no effect. Right now, the only way I can get the add-to-cart button to display for my virtual product is by faking a quantity in stock.

    includes/templates/[MY CUSTOM TEMPLATE]/templates/tpl_document_register_info_display.php
    Code:
                <?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>' : '');
    	// DIANAB COMMENT don't hide quantity box!
              //  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);
              //  } //this is part of the if/else hide quantity box
        $display_button = zen_get_buy_now_button($_GET['products_id'], $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 ?>

  3. #3
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    439
    Plugin Contributions
    0

    Default Re: Virtual Product configuration

    in summary:

    Virtual products must have a stock count, if the global store stock count setting is used?

    ---signature MIA although it's in my profile and I see it in post preview.

    ---Diana

  4. #4
    Join Date
    Mar 2006
    Posts
    200
    Plugin Contributions
    0

    Default Re: Virtual Product configuration

    In the product edit area, check do not show quantity, max of 1 and quantity of some large number like 1000000. Then it allows the item to be add to cart but no quantity shows on the product page.
    Zen Cart: Diva Knitting

 

 

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
  •