This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Clearing the cart before adding the product. Drupal 8 + Commerce 2

I am using Drupal8, Commerce 2, Commerce Recurring and Commerce Licence. 

I am selling yearly subscription.

Issue and Steps

  • User can add subscription product into cart
  • User redirecting to cart page
  • User hits back button and visit product page(subscription page) again.
  • User again add subscription product into cart. 
  • Then user end up with 2 same subscription products into cart. Need to restrict user to add multiple product into cart.

Possible solution:

Bibliography and Cite

Hello,

I wish to have a bibliography handled as it is in TeX: a bib file somewhere, in the text I call \cite{ref} and a bibliography appears.

\cite{ref} is transfromed into a well formed expression in the text, that it only depends on a key attached to the full reference in the bib file, and the bibliography lets appear only what I have cited.

Any idea of a module doing this?

Thanks,

-Fred

custom block hook

hello, how can i get the hook of a custom block ? 

Change view filter depending of url origin

Hello , i've a bloc with a link to a view. This bloc is on severals pages. I would like to applied filter on the view depending of the page where the link is clicked. 

Select option for languages in custom forms

Hi,

I am trying to add a field where the languages could be selected from list of available languages in Drupal 8. The code to handle the language dropdown looks like:

$form['text_info']['fieldset']['source_formats']['selected_langcode'] = [
'#type' => 'language_select',
'#title' => $this->t('Language'),

'#languages' => \Drupal::service('language_manager')->getLanguages(),
];

But the form field is showing as (I have a screenshot):

Proper way to override a method in a Drupal/Core class

I am relatively new to developing with Drupal, and I hoped to get some information on the best way to approach a simple problem.

In efforts to add support for entity labels containing parentheses, I would like to alter the method call extractEntityIdFromAutocompleteInput($input) in the \Drupal\Core\Entity\Element\EntityAutocomplete class.  

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions