Custom woocommerce cart

Hi

(I’m trying to) build a custom cart page because the WooCommerce cart is so ugly… :grinning_face_with_smiling_eyes:

First of all, I’m not a developer :slightly_smiling_face:

I’ve gotten so far that I can display product (gallery) images, product titles and prices on the page with a query loop. But I don’t know how to display the product quantity and subtotal on the page. I read the bricks.academy instructions and I understood that I use the “form” custom tag and for example {woo_cart_quantity}. Is the use of the custom tag blocked without the code snippet below (bricks.academy / developer: Filter: bricks/allowed_html_tags)?

add_filter( ‘bricks/allowed_html_tags’, function( $allowed_html_tags ) {
// Define the additional tags to be added (e.g. ‘form’ & ‘select’)
$additional_tags = [‘form’, ‘select’];

// Merge additional tags with the existing allowed tags
return array_merge( $allowed_html_tags, $additional_tags );
} );

So where do I put this code snippet that I copied from bricks.academy? In the function.php file of the Bricks builder child theme? Doesn’t that allow the use of the “form” custom tag - if I understood the instructions correctly? I tried putting it in functions.php but nothing happened (other than an error message about the “form” custom tag).

-Milko

Have you looked at the docs on Woo? They show you how to build your own Cart and Checkout.

Woo Cart: Cart (WooCommerce) – Bricks Academy

Woo Docs: WooCommerce Builder – Bricks Academy

Hi

Yes, I have read the instructions but they do not answer all my questions? Especially since the Builder blocks the use of the form custom tag. So I can’t move forward. Maybe I don’t understand something?

First question then is, are you using Woocommerce or not?

What is woocommerce??

Just kidding. Of course I use it when I ask a question related to it :slightly_smiling_face:

Then this part is what you are looking for: Cart (WooCommerce) – Bricks Academy

It shows you how to create your own custom cart within a query loop.

The page in question reads, on a blue background:

“IMPORTANT: Using Bricks 1.10.2+ you have explicitly allowed the form HTML tag programmatically. Please follow the instructions at Filter: bricks/allowed_html_tags – Bricks Academy

EDIT: I’m using Brick builder version 2.1.4.

My friend, you need to read the documentation. Why are you giving me the image from the documentation when right below that image it tells you need to add that filter to your functions file.

I get that you are not a developer, but maybe you are working over your skill level? I just say this as I don’t want to see you get into trouble or things to go “crash”.

In order to use custom HTML tags you need to allow them via the Bricks filter. The filter is this.

add_filter( 'bricks/allowed_html_tags', function( $allowed_html_tags ) {
// Define the additional tags to be added (e.g. 'form' & 'select')
$additional_tags = ['form', 'select'];

// Merge additional tags with the existing allowed tags
return array_merge( $allowed_html_tags, $additional_tags );
} );

Be careful though … if you have a comma or single quote out of place it will all break.

Well…thank you…

My friend, you need to read the documentation. Why are you giving me the image from the documentation when right below that image it tells you need to add that filter to your functions file.

Really?

Why are you giving me the image from the documentation when right below that image it says you need to add that filter to your functions file.

Sorry, I’m blind! :wink:

I get that you are not a developer, but maybe you are working over your skill level? I just say this as I don’t want to see you get into trouble or things to go “crash”.

Well, I always make a backup before touching something I don’t fully understand… I’m smart!

In order to use custom HTML tags you need to allow them via the Bricks filter. The filter is this.

I’m blind - again!

Be careful though … if you have a comma or single quote out of place it will all break.

I’m going to copy-paste it, I’m not rewriting it line by line.

Just because someone “doesn’t fully understand something” doesn’t stop others from helping.

If you don’t do it, you won’t learn… or something… :thinking:

I never said don’t do it — I said be careful. If you never drove a car before or changed the brake pads, do you just say, “Screw it and just do it”? No! I am trying to help you here, but I am also giving some caution – which is also a form of help.

As for the image … not sure why you said, “Really?” This is right from the docs … does the image there look familiar to the image you shared?

No! I am trying to help you here, but I am also giving some caution – which is also a form of help.

I feel like you haven’t been much help with this problem. But, whatever. I’m looking for answers elsewhere… Thanks though…

As for the image … not sure why you said, “Really?” This is right from the docs … does the image there look familiar to the image you shared?

Yeah…

Ok, sorry that my helping direct you to the docs that addressed your exact question was not helpful. Seems you are struggling with more then just understanding development.

Thank you for your feedback; in the future I will ensure I do not share and help you in any queries you may have.

Cheers