Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Posted1 day 20 hours ago by Alejandro Cremaschi (argiepiano) on:
No problem, let's see how it evolves.
I'd be happy to provide a suggested version if i could.
I will keep that in mind and try learn this hook chain hopefully very soon. I will...
Posted3 days 7 hours ago by RS Snyder (theflightrs) on:
I could request hashing support, but that's the lazy way
🤣
I would appreciate it if you as an active maintainer would 'officially' add a hashing support...
Hi, i understand the updating obstacle - not worth mentioning - hence it is a wacky (but working) patch until i know what to do. :-)
One of my biggest wishes is to understand the hook...
Posted3 days 7 hours ago by RS Snyder (theflightrs) on:
Comments
Yes, the easiest way do do this would be with Layouts. You can add a "Visibility condition" to the menu block that checks a User's role.
Start on the Layouts UI at admin/structure/layouts, and click "Manage Blocks" for the default layout.
For whichever menu you'd like to hide, click on the "Configure" link at the right.
When the modal opens, csroll down to the "Visibility conditions" section at the very bottom, and pop it open. Click on "Add visibility condition"
Then select the User: role option.
Then select the user role "Authenticated" if you only want people who are logged-in to see the menu!
Note that you will need to repeat these steps for all layouts where you want the block limited by role.