Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Qty in product listing


mark27uk3

Recommended Posts

Hi Guys,

 

I could do with a hand merging these two pieces of code, the first displays the price with the buy_now button underneath and the second is from a qty in product listing contrib.

 

My problem is I need to put the second piece of code into the first so it adds a qty box above the buy_now button.

 

I am not very good a merging bits of code together and would appreciate it if someone would help out.

 

          case 'PRODUCT_LIST_PRICE':
           $lc_align = 'center';
           if (tep_not_null($listing['specials_new_products_price'])) {
             $lc_text = ' <br><br><font color="#ff0000"><b><s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> </b></font><p>TEXT_INC_DEL;</p><p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a></p> ';
           } else {
             $lc_text = ' <br><br><font color="#ff0000"><b>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' </b></font><br>free delivery<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a></p> ';
           }
           break;

 

$lc_text = '<form name="cart_quantity" method="post" action="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'). '"><input type="hidden" name="products_id" value="' . $listing['products_id'] . '"><input type="text" name="quantity" value="1" maxlength="5" size="5"><br>' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</form>';
break;
}

 

Thanks

 

Mark

 

If you want to view my work in development then click here

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...