I am using a REST API to import products from an external source. All products have a price. I would like to add a custom field to the product type, which will not be imported from the API, but I fill in manually on every product. I want this to be a price field which adds to the product price.
Example:
- Imported product has a price of 25 euros;
- My custom price field: 5 euros;
- Price on product when displayed to customers and which they have to pay: 30 euros.
I am quite new to Drupal and Drupal Commerce. I have a store where I am using an API to import products from an external source.
So I built a product catalog page by creating a view and displaying all the products on this page.
With a Link to product button I can go from the catalog page to the product detail page, everything is working fine. But now I would like to have a button on this product detail page to another page with a more detailed story about this product. Now I have three questions:
When I build website using Drupal I always have to do an admin page where the site owners can set site settings (or configurations), such as telephone numbers, emails, address, social media settings etc etc. Usually what I do is create a content type called 'admin' then I'll add all the fields that I want to store all the certain site settings. I will create a class/service called 'Admin' and load the admin node and add various methods so other services can fetch the stored settings.
On my server in prod, I have a table where we can sort the columns. This works very well on the prod.
On the other hand, on another server there is the same site to be able to test the updates etc. Here the painting does not work anymore. When I want to sort, I have this error that goes back to Drupal.
I'm actually a drupal 8 development and I have an issue with REST export in views of drupal 8. The problem is that I set paginator with 5 elements, but API doesn't return the total number of objects. Anyone know a solution?
In addition, I have a normalizer on custom module for add extra data to JSON response.