Hey there! That error message is definitely a head-scratcher. Even though you uninstalled Views, it sounds like something is still referencing a Views-related constant. Maybe a custom module or...
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...
Posted4 days 6 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...
Posted5 days 17 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...
Comments
This issue may be related (and it looks like it has a PR that can be tested):
https://github.com/backdrop/backdrop-issues/issues/2134
That PR wont be in production any time soon. But you could make a quick access condition module, its quite simple. Use as a guide: https://github.com/backdrop/backdrop/blob/1.x/core/modules/layout/plugins/access/path_layout_access.inc or https://github.com/backdrop-contrib/block_scheduler
Your form function would probably be something like:
$form['nid'] = array( '#type' => 'textfield', '#title' => t('Node NID'), '#default_value' => isset($this->settings['nid']) ? $this->settings['nid'] : '', ); $form['term'] = array( '#type' => 'textfield', '#title' => t('Term'), '#default_value' => isset($this->settings['term']) ? $this->settings['term'] : '', );And your access function:
function checkAccess() { $entity = $this->contexts[$this->entity_type]->data; return isset($entity->{$this->settings['term']}); }Some adjustment may be necessary.
As an easy workaround without any coding Views could be your friend.
We'd need some more info about your use-case though. Could you describe a bit more, please?