| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add to Cart Button for Out of Stock | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
Re: Add to Cart Button for Out of Stock
How did you add this code?
Also, I believe the default controller class reloads the page after processing the method, so this may be the reason why you don't see the message.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#12
|
|||||||
|
|||||||
Re: Add to Cart Button for Out of Stock
Quote:
Thank you, that definitely confirms my suspicions. I was just randomly throwing it in different functions that are called when the button is pressed. As of right now, I have it so that it just pops up when the page is loaded (which also makes it pop up when clicked the button is clicked due to the reload). Can you think of any way to get it to pop up before the page is reloaded when the button is clicked?
__________________
5.2.16 Cloud Search Market Price Volume Discounts |
|||||||
#13
|
|||||||||
|
|||||||||
Re: Add to Cart Button for Out of Stock
You can render the widget upfront and hide it with CSS, and then change the CSS class when users click the button.
Another way is to load the widget via an asynchronous request to the server. If this is what you are looking for, you should look through the existing source code and search for examples of use of ALoadable object. Usually, this is how you use it: 1. You create a new "view" object that is extended from ALoadable object, then you extend the prototype of that object with custom methods and properties. This object will handle the rendering of the widget and loading its contents from the server. 2. You create another object extended from AController and make it autoloaded by the core. This object will check for particular element on the page (specific for your widget) and, when exists, create and start your "view" object.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|