arkanimus Posted November 26, 2013 Share Posted November 26, 2013 (edited) Can i do use the issubmit function in a href object...?? for example. in the controller: if(Tools::issubmit('insertHref')) { $cantidad = Tools::getValue('txtboxes'); $this->context->cart->updateBoxed($cantidad); } in the view: <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}" class="exclusive standard-checkout" name ="insertHref" id="insertHref" onclick="document.getElementById('voucher').submit();"title="{l s='Next'}">{l s='Next'} »</a> </form> how can i solve it? Edited November 26, 2013 by arkanimus (see edit history) Link to comment Share on other sites More sharing options...
Krystian Podemski Posted November 26, 2013 Share Posted November 26, 2013 Tools:isSubmit looking for params in url such us "myParam=1" or input name like <input type="submit" name="myParam" in your example form#voucher should have for example <input type="hidden" name="myParam" value="1" /> then you can do: if(Tools:isSubmit('myParam')) 1 Link to comment Share on other sites More sharing options...
arkanimus Posted November 26, 2013 Author Share Posted November 26, 2013 (edited) Tools:isSubmit looking for params in url such us "myParam=1" or input name like <input type="submit" name="myParam" in your example form#voucher should have for example <input type="hidden" name="myParam" value="1" /> then you can do: if(Tools:isSubmit('myParam')) thank you for reply but i need to modify the "Next Button" in shopping-cart.tpl <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}" class="exclusive standard-checkout" title="{l s='Next'}">{l s='Next'} »</a> Edited November 26, 2013 by arkanimus (see edit history) Link to comment Share on other sites More sharing options...
xiparos Posted January 8, 2015 Share Posted January 8, 2015 This post really helps me tackle with how to pass parameters via ajax call, +1 for "myParam=1" Link to comment Share on other sites More sharing options...
Kogkalidis Posted October 20, 2018 Share Posted October 20, 2018 I know a bit late but I faced the issue another way. I make an ajax login interface for my PrestaShop 1.7 shop. For some reason even with debug true, issubmit is not working at all. So I serialize the submitted data and then (on the php side) I made a function to convert the serialized string into an array. I have a hidden field name='submit' value=1 and I check if(!empty($data['submit']) { //Custom code here } where $data is the result from the custom function above. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now