bhbilbao Posted January 3, 2012 Share Posted January 3, 2012 I need to get the products_id as variable($listing[$x]['products_id']) from product_listing.php page after clicking a submit button (quote_button.gif) aplication_top.php case 'quote' : $quote = $listing[$x]['products_id']; if ( ! tep_session_is_registered('quote') ) { tep_session_register('quote'); } break; product_listing.php ... $lc_text['button_buy_now'] = '<form name="quote" method="post" action="' . tep_href_link(FILENAME_REQUEST_QUOTE, tep_get_all_get_params(array('action')) . 'action=quote', 'SSL'). '"><input type="hidden" name="quote" value="' . $listing[$x]['products_id'] . '">' . tep_image_submit('button_quote_list.gif', IMAGE_BUTTON_QUOTE, 'name="quote" value="quote"') . '</form>'; break; } else { $lc_text['button_buy_now'] = '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '" rel="nofollow">' . tep_image_button('add_buy_list.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-bottom: 5px;"') . '</a>'; After clicking the quote button, it goes to the other page but the variable $quote is empty. Need help. Link to comment Share on other sites More sharing options...
♥mattjt83 Posted January 3, 2012 Share Posted January 3, 2012 How about in FILENAME_REQUEST_QUOTE at the top (under include application_top) you have: $quote = $_POST['quote']; Matt Link to comment Share on other sites More sharing options...
bhbilbao Posted January 4, 2012 Author Share Posted January 4, 2012 Thanks for your response mattjt83, but I think you would not understand my question. I think you are refering to this contrib: http://www.oscommerc...tributions,3753 but I need to implement in this one: http://www.oscommerc...tributions,6675 I use a modified version. In product_info.php page works fine, it gets the products_id from (int) $_GET['products_id']; product_info.php (good) $quote = $product_info['products_id']; if ( ! tep_session_is_registered('quote') ) { tep_session_register('quote'); } <td><?php echo '<a href="' . tep_href_link(FILENAME_QUOTES, '', 'SSL') . '" rel="nofollow">' . tep_image_button('button_quote.gif', IMAGE_BUTTON_QUOTE) . '</a>'; ?></td> quotes.php (good) echo $quote; ...then... tep_session_unregister('quote'); --------------------------------- includes/modules/product_listing.php (bad) There is 2 type of buttons, buy or quote. I need to register the variable($listing[$x]['products_id']) when clicking the button quote need help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.