I am working on a project with drupal 7. My drupal experience is limited and Im a bit stuck on how to achieve a good structure.
The site will have products like wine, sherries and spirits. Each of these product types will have subcategories. (example: like red / white wine) Within these subcategories there will be certain brands of wines.
Since the website is focussing only on displaying the products and not selling them, I really do not want to use any ecommerce software, or modules.
Preferably I would like the products to be a content type. There is a little catch to it. All categories, so in the examples above; wines, sherries, spirits BUT ALSO red / white wines should have a description and a image.
Can anyone shed some light on how to create this in drupal 7. I have googled a lot but im not sure what the right approach would be. Thanks!
I think you could create the different pages using the taxonomy structure and views. You would set up a custom content type of products, then for each product put in the proper tags. This should group together the different categories for you.
Related
To whoever has used Saleor with React. There is very little resources for various implementations so I thought I'd ask here.
What is the best way to add colors to products for saleor dashboard? And if possible is there a short example anywhere of how that can be used in storefront react application?
For example I got product with "Size" and "Color" Variant Attributes, and "Delivery" and "Returns" Product Attributes. Let's say I want to have a product that has 2 sizes and 4 colors. Do I have to create all 8 variants (each color for each size) or is there a better way of doing it?
Because right now what I'm doing is I have 8 variants each size for each color and it's very difficult to manipulate the data that I need in the storefront which is using React.
Essentially what I want to accomplish is have the 2 sizes, and each size has the 4 colors. But the way I'm doing it with variant attributes requires so much data manipulation in the front-end that I'm thinking it's not the right way to do it.
Any suggestions/pointers are appreciated
It makes sense to add all variants (color × size) since each one of them needs to have a unique identifier SKU which acts as a unique identity of the product (typically a bar code)
I'm new to JSON-LD. I find the syntax fairly straightforward but my query lies more with deciding which pages it is best to add the JSON-LD to. I've spent a bit of time looking for an answer online but so far nothing has been clear.
My example:
The site is for a business that has roughly 20 branch locations across the country. Each office has a dedicated contact details page, and there is also a "contact us" page for the site as a whole.
Should I
A: Add 'Organisation' JSON-LD snippet for the organisation as a whole to the homepage of the site, and then add individual 'LocalBusiness' JSON-LD snippets to each office details page?
B: Consolidate all this into one snippet of JSON-LD that has 'Organisation' with nested 'LocalBusiness'es and place it on ALL office pages, with a separate 'Organisation' snippet for the homepage?
C: Consolidate all this into one snippet of JSON-LD that has 'Organisation' with nested 'LocalBusiness'es and place it on ALL pages sitewide?
D: None of the above... Instead you should ____________________.
I realise there may not be one correct answer for this, but any help at all in achieving what would be considered best practice, would be greatly appreciated!
Cheers
Per the JSON-LD specification, it’s totally up to the authors. Consumers of your JSON-LD might of course have their own expectations.
You seem to use the vocabulary Schema.org, which is sponsored by the big Web search engine services. They are of course typically interested in your page content. The general idea of Schema.org is to mark up your existing content (+ closely related metadata).
This becomes clear when looking at the other syntaxes supported by Schema.org (Microdata and RDFa), as they define attributes that get added to existing HTML elements used for your content. So JSON-LD is the exception here, as it doesn’t get coupled with the HTML/content.
tl;dr: On a page about a branch location, provide structured data about this branch location.
It typically makes sense to provide structured data about related entities (e.g., the parent organization) in addition. This can be done by including the data and/or by referencing it via its URI (see an example). Make use of the properties the type offers (e.g., parentOrganization).
If this question is still relevant to someone, here is my recommendation:
on the homepage, create a "LocalBusiness" markup and use the "department" attribute for each branch.
So in your case, there should be one main office and 19 departments.
For the main office, indicate all attributes (opening hours, logo, image, etc.) For branches, mark up only distinct properties, such as address or telephone (they are apparently different for each branch).
For example, if all branches have the same working hours, no need to repeat them again and again - indicate working hours only for the main office.
Then on each dedicated contact details page add "LocalBusiness" markup only for that specific branch - without departments. You can indicate all attributes in detail.
Do not add "LocalBusieness" sitewide - Schema markup must be relevant to a specific page.
Also, here is an article that can help to understand it better:
https://postelniak.com/blog/local-business-schema-for-multiple-locations/
There you can also find JSON-LD code snippets.
I would like to get your opinions and solutions on how can I solve this problem.
I have a website that displays restaurants, events and attractions in multiple cities and countries.
Right now I implemented the following structure:
Country A
--City A-1
----Restaurants
----Events
----Attractions
--City A-2
----Restaurants
----Events
----Attractions
Country B
--City B-1
----Restaurants
----Events
----Attractions
--City B-2
----Restaurants
----Events
----Attractions
There is so much redundancy, specially when it comes to modules that display content from specific categories.
What I thought would be a good solution, is to only create categories for Restaurants, Events and attractions, and figure out a way to specify which country and city by adding parameters to the URLS.
I would appreciate any thoughts and suggestions.
Thank you
You can't avoid creating the full menu in the menu manager.
As for modules you could add a textfield inside the module with an array like: 1,7:2,8... = menu_id_1,content_of_city_7:menu_id_2,content_of_city_8...
You will have just one module for each type (restaurant, event, attraction) connected to all menus you want to be displayed and you will check the content of it matching the menu id from url with your array.
I'm using drupal 7 to make a kind of humanities collaborative portal.
Let's say I have 3 taxonomies : authors, concepts, dissertation and the corresponding content-types.
I would like to bind the terms in these taxonomies together.
If I write a dissertation, I would like to be able to choose at least one couple of author-concept as though it was one new tag.
For example, I wrote a dissertation about "What is the self ?", and used Husserl's cogito on one hand and Hume's self on the other hand.
I'm coding my own search engine to fetch these couples so that if I search "Hume cogito" my dissertation won't be in the results.
My problem is that I don't know how to bind taxonomies in that way nor linking those taxonomies when the user creates a content.
I thought about hierachical taxonomy but it doesn't seem to make sense.
Any idea welcome !
In our Project we were using a similar functionality for glossary search.
There are 2 methods one is
Create a content-type for Items.
1)Any term can be mapped to multiple other terms by creating two fields of term reference and making the second field with add many(1 term -may terms relationship) .
2)There was a module in drupal 6 called "Term Relations" which i believe has dev version for drupal 7
There is a list of cars for rent (list of nodes of material type "car rental"). Each car has a page of details. On the page there is a table of the cost depending on the duration of the lease (here is page screenshot):
As I see it, I need to add fields for the type of material "car rental":
Day
Week
Weekend
7-21 days
21 days
Deposit
And then, somehow, render this fields to a table.
How to best implement it in Drupal 7?
How to do it best might vary depending on who you talk to. But I would probably use a node--car_rental.tpl.php solution. And code the table my self in html. This restricts the page to be dynamic with more fields, but it is easy to implement. But if you want more dynamic solution without needing to coding files, I would use the Display Suit module
and some CSS.