Looping through the Cart Items is straightforward and achievable through the code:
When the cart include products from different shops ( within the MultiSite Netowrk ), the same code can be used. Still, a...
Each of the Network Shops run their own cart page. This can be changed so the cart link redirects the user to a specific Shop Cart in the network, which is usually the Check-out Shop, when using Single Site Check-out type.
The feature can be achieved through a custom code. The WOOGC_REQUIRED_CART_URL value should be updated with the required shop cart URL:
The filter is being used to disable the Global Cart functionality. The Global Cart works as a unique cart for all shops in the MultiSite Network, a product pushed to the cart will be show on all other shops too.
add_filter( 'woogc/disable_global_cart', 'WooGC_Disable_GlobalCart', 10, 2 );
function WooGC_Disable_GlobalCart ( $status, $_blog_id = '' )
The filter is being used to change the $checkout_url for specific shops. As default this is being controlled through admin settings but can be adjusted to particular shops if need.
The following code change the checkout url to shop default when blog_id is 4:
add_filter( 'woogc/get_checkout_url', 'WooGC_get_checkout_url');
function WooGC_get_checkout_url ( $checkout_url )
Using the WooCommerce Global Cart all shops in the network will share the same cart, products from different sites can be added and checked-out in a single process. To make cart content more descriptive and clearer to the customers, a shop name can be append to each product title, to indicate the location where the product come from. Also other necessarily information's can append if apply.
The following bit of code append the origin Shop name, to each product title...