Checkout or cart link

Do you have any suggestions on how to add a cart or checkout to the right side utility nav if an item is in the cart? If someone adds to their cart to checkout, and then clicks something else, they have no way to get back to the checkout.

There are 2 ways to do this:

  1. Adding a new item to the main menu (this doesn’t require code changes).
  2. Inserting a new block into the HivePress header area via the hivepress/v1/templates/site_header_block (this one requires custom snippets).

Please consider using the built-in Buy Now functionality, if you use cart with the HivePress Marketplace listings and add listings from different vendors to cart, this may cause issues with commission calculations & refunds. If you use cart for regular WooCommerce products listed on your site it should be ok though.

I tried adding it in the regular navigation, but it just puts it next to the last nav item on the lest, and will not align right towards the utility nav on the right side of the page.

There are many reasons someone might not decide to check out at the moment, and want to return later to check out. Currently there is no way for them to return and check out.

#2 there is not enough information there for me to take any action on it.

Yes, the only way that doesn’t require code changes is adding the Cart link to the main menu in Appearance/Menus. If you want to add some custom HTML to the HivePress links/buttons area please try this code snippet:

add_filter(
	'hivepress/v1/templates/site_header_block',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'site_header_menu' => [
						'blocks' => [
							'custom_name_here' => [
								'type'    => 'content',
								'content' => 'custom HTML here',
								'_order'  => 123,
							],
						],
					],
				],
			]
		);
	}
);

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.