| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Checkout Process | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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
__________________
Buy Hotel Linen |
|||||||
#2
|
|||||||
|
|||||||
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...
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Checkout Process
Actually they did - https://market.x-cart.com/addons/buy-button.html
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#4
|
|||||||
|
|||||||
Re: Checkout Process
Well, I don't think it does what OP had in mind. I think OP wants
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#5
|
|||||||
|
|||||||
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:
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:
Code:
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:
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#6
|
|||||||
|
|||||||
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?
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
|
|||
X-Cart forums © 2001-2020
|