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

How to display a field of the parent store in my module ?

I have a Drupal 8.7 site with the Drupal Commerce 2.14 module.

I created a marketplace (several merchants on the same site). In the store type, I created a "Text (formatted, long)" field with the machine name field_terms_and_conditions.

In this field, the merchant writes his general conditions of sale, which the customer will have to accept during the order process.

Commerce 8 adding price products attributes

Hi,

I am developing a e-commerce web site with drupal commerce, everything is okey but I have a problem,

I want to add price(add to cart) product attributes. 

Exp: Coffee: 2$

      add milk: +1 $

     add honey: +2 $

cart: 5$

thanks.

Elastic search not indexing the updated content

I am using group module and indexing the "group content" entity. Elastic search is indexing only the newly created content but not the updated content. Can anyone please help me with this issue?

Modules used:

1) Group, Group Node 

2) Elastic Search Connector (8.x-5.0-alpha3)

3) Search Api

Search results are displayed under {group_name}/search and rendered using view.

How to retrieve information from the parent store of a product ?

I have a site with Drupal 8.7 and Drupal Commerce 2.14

I created a template for my stores :

commerce-store--professionnel--full.html.twig

And I added this code :

<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 bs-region-legal">
{{ store.field_professionnel_cgv }}
</div>

It works.

Now I have created a template for my products :

commerce-product--produit--full.html.twig

Error with foreach loop after making a database query

Hi,

I have a table in the database that looks like this:

https://imgur.com/a/VNvZSQl

I want to loop over different langcode values. So far, I have coded as follows:

$source_language = db_query("SELECT langcode FROM table_name WHERE bundle = :textname", [':textname' => 'gita'])->fetchAll();
 foreach($source_language as $lang) {

// do stuffs

}

How to remove Vary: Cookie,Accept-Encoding from header response

I want to remove Vary: Cookie,Accept-Encoding (from HTTP header response) from homepage, for anonymous user in drupal 7.

header_remove("Vary");  in template_preprocess() is not working for me. I also commented from .htaccess file.

I have Authcache module also installed, but dont know from where I can disable it.

Can anyone please help me on this!

Thanks a lot!

Pages

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