When first adding an item to the cart the Cart block is appended to a specified block id. Also adds Checkout and View Cart links.

Comments

kamkejj created an issue. See original summary.

replicaobscura’s picture

Thanks, looks good!

Couple of things we should consider:

  1. The 'cart' id used to append if you're adding the first item is configured when creating the block, 'cart' is the default for the first block but depending on the settings it might not be the block that should be appended, or the user might have named it something different entirely.
  2. I wonder if we could programmatically determine the id of the block's region and append the block to that ID so we don't have to ask for it?
  3. Finally, I wonder how we can programmatically determine which blocks are already rendered and which aren't. Perhaps based on the block type or block settings we can tell which cart blocks would be hidden if there were 0 items in the cart and append those instead of replacing.
replicaobscura’s picture

Version: 8.x-1.0-alpha1 » 8.x-1.x-dev
Status: Active » Needs work
amklose’s picture

Status: Needs work » Needs review
StatusFileSize
new10.85 KB

I added a Keep Browsing button and reconfigured the settings form a little bit. I also made the dialog window responsive.

  • bmcclure committed 076c008 on 8.x-1.x
    Issue #2894640 by kamkejj, amklose, bmcclure: Append Cart block and add...
replicaobscura’s picture

Thanks kamkejj & amklose! These changes were eventually rolled into a larger changeset and committed back to the module, so I gave you guys credit for the commit as well.

replicaobscura’s picture

Assigned: Unassigned » replicaobscura
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.