MarthaD Posted December 12, 2005 Share Posted December 12, 2005 I need to limit the quanity of an item to ONE in the shopping cart as the products are ONE of a kind... How can i do this. Help is urgently required. Thank you. Link to comment Share on other sites More sharing options...
gscreations Posted December 12, 2005 Share Posted December 12, 2005 I need to limit the quanity of an item to ONE in the shopping cart as the products are ONE of a kind... How can i do this. Help is urgently required. Thank you. not tested but: in shopping_cart.php around line 152 is: $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); this is the text field to change quantity, change this to just diaplay the figure 1 and add a new hidden field setting the quantity to 1 like: $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => '1' .tep_draw_hidden_field('cart_quantity[]', '1'). tep_draw_hidden_field('products_id[]', $products[$i]['id'])); think that will do it Link to comment Share on other sites More sharing options...
MarthaD Posted December 12, 2005 Author Share Posted December 12, 2005 Many thanks. Link to comment Share on other sites More sharing options...
MarthaD Posted December 12, 2005 Author Share Posted December 12, 2005 So that works and again thank you. Now how do i prevent the QTY from even shoing on the shopping cart page, as thr above still displays the quantity of "1" on the page.... Link to comment Share on other sites More sharing options...
gscreations Posted December 12, 2005 Share Posted December 12, 2005 So that works and again thank you. Now how do i prevent the QTY from even shoing on the shopping cart page, as thr above still displays the quantity of "1" on the page.... ok change code to: $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_hidden_field('cart_quantity[]', '1'). tep_draw_hidden_field('products_id[]', $products[$i]['id'])); glad it worked Link to comment Share on other sites More sharing options...
MarthaD Posted December 12, 2005 Author Share Posted December 12, 2005 Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.