Jump to content

goyan

Members
  • Content count

    11
  • Joined

  • Last visited

Posts posted by goyan


  1. Thanks @@raiwa,

     

     

    I know that condition should look something like this:

     

    if ($total > 500) or ($shipping_id != spu_id) $this->enabled = false;

     

    ​but I have a problem in locating those variables.

     

    ​I have found:

     

    $order->info['shipping_method']​  - which contain a string with description of shipping module;

    $shipping['id']​ - contains a string "spu_spu" for Store Pickup, "flat_flat" for Flat Rate shipping.

     

    ​but I don't think they are appropriate for this condition.

     

    ​Which variables should I use instead?


  2. Thank you Tsimi.

     

    shoping_cart.php is not showin quantity (BS GOLD), but I have found solution and it looks nice:

     

    I ahve changed loop before "echo $products_name;": to

     

     

     

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      
      
      
      
      
       $products_quantity = tep_get_products_stock($products[$i]['id']); 
      
      
      
      
      
          $products_name .= '<tr>';
          $products_name .= '  <td valign="top" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
                            '  <td valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a>';
          if (STOCK_CHECK == 'true') {
            $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
            if (tep_not_null($stock_check)) {
              $any_out_of_stock = 1;
              $products_name .= $stock_check;
            }
          }
          if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
            reset($products[$i]['attributes']);
            while (list($option, $value) = each($products[$i]['attributes'])) {
              $products_name .= '<br /><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
            }
          }
          $products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 90px;"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' ' . tep_draw_button(NULL, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'btn-info btn-xs') . ' ' . tep_draw_button(NULL, 'glyphicon glyphicon-remove', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-xs');
       $products_name .= ' <br>' . TABLE_HEADING_QUANTITY . ": " . $products_quantity;
      
          $products_name .= '</td>';
          $products_name .= '  <td align="right" valign="top"><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' .
              
         

       '</tr>';
        }

  3. Hello osCommercialist,

     

    I'm trying to make a site based on Responsive-osCommerce-2.3.4-GOLD.

     

    In admin > configuration > product listing I have enabled (set value to 3) in for  Display Product Quantity and quantity is displayed in specials.php and product_listing.php (only in list view, not in grid)

     

    How can I see quantity in new_product.php, product_info.php and shoping_cart.php?

     

    Thanks.

     

×