How can we render any block in cs-cart using cm-ajax cm-ajax-full-render.
I tried to use cm-reload but didn't worked I also tried result_ids but still didn't worked.
In product view page how can we render product block without refreshing page.
I have already tried using jquery $.ceAjax() method but I want to do it without using it.
Like in checkout page when we change steps during checkout for making payments.
-Regards
There are two important things:
There div with the content which should be rendered should have the following structure:
<div id="my_id">
content here
<!--my_id--></div>
Your ajax request should contain result_ids parameter which should contain my_id
Hope this will help
Related
Here is the problem, I have a WP site that changes the display depending on the presence or not of a parameter in the URL.
If no parameter the whole post shows normally.
If the user has the parameter in the URL the post will be split into many sections (break lines are used as separators) and each time he clicks next the page will load and the URL will change to "/2" for the second element of the post for example. This is what I have for the moment and it works.
With parameter in the URL I want the users to have a slide that only loads the content without the page loading but I can't find a way to do this in WP.
Is it possible with jQuery? For example, load all the content first and show the appropriate section after each click? How would you go about it?
I'm not asking for a code but the logic that you'll use to tackle this issue if you were in my shoes.
Thank you in advance for your suggestions.
I want to add custom PHP to my wordpress site.
I managed to do it but the result is displayed in another page and it is just simple text.
I created simple calculator, and when user hits submit I want a div with the result to occur right below this calculator.
What is the simple way to do it or where can I seek some advice? Couldn't find it on google.
PS I am using wordpress themes so I added the action for the form as another file.
You could use javascipt to toggle visibility of your calendar div after response or add your custom div into response. You didn't wrote much. At first you should check out what is AJAX and find out where your response is creating.
If you didn't choose to add that for response, you can simple add PHP block to your templates files with <?php ... ?>.
Good luck! :)
I want to add or manipulate the content of template through a PHP page on runtime.
For example, In my online shopping website, I have a division for shopping cart in template then how can I change that division's content through a PHP page when user add an item to cart..
I don't want to assign values to that division on each page so, I put that division in template.
Please Help me with this..
Thanking you in advance for any Interest shown..
You will need to use Javascript in order to do that - well at least if you don't want the page to reload.
There are plenty of examples all over the web (search for setting up cookie/session variable using Javascript).
Using Javascript libraries such as jQuery would help you a lot.
For example:
User clicks on "add to cart"
Javascript updates a cookie variable with the item's information
Javascript updates content of the cart on the page
Optionally, use AJAX to communicate with the server and do something on success/error.
I'm using Drupal 6 and i want to create a block, that shows a form which also can be found on a subpage.
To do that, i created a drupal form API Form form() with its validationhandler form_validate() and its submithandler form_submit(). Then, I added a form API form widget_form(), which is basically the same as form() - just minor style adjustments, with the validation/submithandler set to form_validate() and form_submit(), also I changed the action to go to the subpage where form() is displayed.
This works fine, but if there is an validationerror (when using the widget_form()), drupal marks the block-formular, not the one on the subpage.
This seems to work as designed, but isn't the required behaviour i want. So, any way to change that?
(I want the error shown on the form() - form, not the widget_form())
Thanks!
Edit: I tried to hide the block containing the widget_form()-Form on the page displaying the form() form, no error is displayed.
I think the approach used is not quite right. What you need to create is just one form and one set of validation and submit function. For the block use hook_block and create a block and inside the block view op you can call drupal_get_form and display the form inside the block and then theme the block using CSS or custom template files. Then from the block configuration page you can decide to not show the block at the URL (menu) where the full form is loaded. You have got that part right.
thanks for coming in and looking at my question.
I have a page that has a bunch of dynamic a tags with ids like aTag1, aTag2 ans so on.
now I need to make these tags open the same lightbox that initially loads a partial page named register.php,
and the user will fill out the form, sumbit it then go to another partial page named payment.php and go on until the registration and payment are all settled.
this process needs to be done using ajax.
I think this should be relatively easy if appropriate ajax plugin is used.
Could you please advise any plugins and tips?
Thanks a bunch!
Check out jQuery and jQuery UI Dialogs. Of particular interest to you would be the modal form demo. If you definitely need to have the content loaded from separate URLs, you could put an iframe in the dialog or do something like this example.