Checkout Process
Hi, Everyone, I want to put add to cart and checkout in https://buyhotellinen.com, Any Suggestion or idea will be helpful, Thanks
|
Re: Checkout Process
I looked around and haven't found how to implement such a feature easily. It is quite amazing that nobody has thought about "quick buy" feature...
|
Re: Checkout Process
Actually they did - https://market.x-cart.com/addons/buy-button.html
|
Re: Checkout Process
Well, I don't think it does what OP had in mind. I think OP wants
|
Re: Checkout Process
I thought this would be a children's game, but somehow I can't make this work.
So my idea is to add a button on ListItem, that is skins/customer/modules/EdB/QuickBuy/items_list/product/parts/mybutton.twig Code:
{## The button widget looks like Code:
<?php Again, the button looks terribly ugly, but we can deal with it later. Normally, it only remains to define the function doActionQuickBuy() in the appropriate controller class, that is Code:
<?php Code:
parent::doActionAdd(); parent::doActionCheckout(); However, this code produces the button, but clicking on the button does nothing. Presumably because the regular button is for submitting a form, and there is no form. I have also tried to use "Link" class, but then I can't define "getDefaultAction". Another approach would be somehow to decorate View/Product/ListItem.php to get a second button, the class use a method getAdd2CartBlockWidget to show the "add to cart" button, but I fail to see how to use this method to produce another button. or call twice this method within the class. Would anyone know how to do this? [added] Maybe the simplest thing to do is to write a method similar to getAdd2CartBlockWidget in a class decorating ListItem and call it from an appropriate twig, but then where can I define getDefaultAction() or something similar? The getAdd2CartBlockWidget() looks like Code:
protected function getAdd2CartBlockWidget() |
Re: Checkout Process
I gave up on buttons, instead, I tried
twig file [code] {## # # @ListChild (list="itemsList.product.grid.customer.tail", weight="99") #} <div class="company-logo"> <a href={{ url('cart', 'QuickBuy', { 'param_1': 'some_param_value' }) }}> Quick Buy</a> </div> with Controller class Code:
As a matter of fact, if I remove setReturnURL, then nothing happens when the customer clicks on the link. What am I doing wrong here? |
All times are GMT -8. The time now is 12:50 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.