Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple block loading javascript. #600

Closed
paales opened this issue Jun 28, 2014 · 4 comments
Closed

Simple block loading javascript. #600

paales opened this issue Jun 28, 2014 · 4 comments
Assignees
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@paales
Copy link
Contributor

paales commented Jun 28, 2014

Related to #322 and #82.

The idea is that it should be possible to load a certain block (cart, toplinks, wishlist block) without creating a controller, with a nice Javascript API that is scalable for frontend developers.

As @kandy metioned, it is already possible to load certain blocks (although, that seems to have been build for the pagecache, not partial reloads), but I couldn't find a proper JS library to achieve this.

This issue focusses on the JS API.

We have created such a solution for our own needs: https://github.com/ho-nl/Ho_AjaxCart

In short, We have an action source:

<a href="#" data-ho-ajax-link="cart">foo</a>

And have target:

<div data-ho-ajax="<?php echo $this->getNameInLayout(); ?>" data-ho-ajax-group="cart">
   ...
</div>

When the action is called, the target is reloaded without reloading the complete page.

This solution works well for us, allows us to create fully ajax-reloaded pages. For example: The cart page allows you to clear an item from your cart an it reloads the products table, totals, shipping costs and the cart header. When someone estimates their shipping the shipping block is reloaded and the totals, but the products table.

Something like this would be really handy if it were in the core and would greatly improve compatibility with modules.

@kandy
Copy link
Contributor

kandy commented Jun 28, 2014

Magento 2 already have one to show private content (see: \Magento\PageCache\Controller\Block::renderAction)

@ilol
Copy link

ilol commented Jul 3, 2014

@paales, thank you. We will investigate this. I will keep you informed. @kandy, thanks also.

@vpelipenko
Copy link
Contributor

Internal ticket: MAGETWO-25908

@vpelipenko vpelipenko added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Mar 18, 2015
@piotrekkaminski
Copy link
Contributor

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

8 participants