Closed (won't fix)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Contributed modules
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2011 at 10:23 UTC
Updated:
12 Nov 2019 at 00:22 UTC
Jump to comment: Most recent
Comments
Comment #1
agentrickardYes, using hook_field_extra_fields().
Moving queues for comment from the Commerce maintainers. Any idea why this happens?
Comment #2
rszrama commentedCurious... haven't tried it yet, but there's no particular reason I can think of that Product types wouldn't get extra fields. However, do you need the restriction on the product itself or the product display node?
Comment #3
dazz commentedOn the product itself, each domain stands for a country and each product has a different price in another country. The display node can be reused for countries with the same language.
If i add this
to domain_field_extra_fields() i get the field Domain Access settings in the Manage Fields of a product, but the field doesn't show when i edit a product itself.
Comment #4
rszrama commentedHow many countries are you looking at? I don't see any particular reason to use separate products for that criteria unless those products are managed differently from a warehousing / stock control standpoint. You could for example just use a price field per country on your product type and then swap in the appropriate price using a product pricing rule.
Aside from that, does Domain actually attach itself to every entity on a site? Perhaps there's a Domain reference field you need to attach to it or something?
Comment #5
agentrickardHere's the code we're using now. Might be missing something:
If Commerce is declaring it's own entity type, then support for that would have to go in a new extension module, since there is no entity_access storage in Drupal.
Comment #6
rszrama commentedThat's the ticket. We'll likely need a Commerce Domain (or Domain Commerce? Codomainerce?) module that implements hook_field_extra_fields(), gets the element into our various entity forms, and then hooks into our entity view access control to restrict access by domain. Marking as postponed until someone takes this on - it'll need to be in its own contrib module.
Comment #7
dazz commentedFor the moment 13.
That was my first thought, use a different field for each country but than i would have 13 fields for the price, 13 for the tax and so on.
And since for each country there is a translated version of each product they are in essence all different products with there own product code.
The idea was to not have to duplicate data that isn't depending on a country, so things like box covers and descriptions can be reused for countries with the same language like the uk and the us. But something like price is different for each country so when i reference the uk and us version of the product to the english product display i should be able the filter out the right price using the domain the product was assigned to.
But after some days of testing i believe this is going to be to complicated, there is always something that doesn't integrate just right. So i switched to a differed approach where each country has its own products and product displays and by using a module like node clone i should be able to minimize the boring task of copying the content.
Domain attaches itself to every node, user and some settings. But the products from Commerce aren't nodes so it doesn't attach itself to it. I started on a custom module to implement this but i don't really got it fully working.
Comment #8
rszrama commentedComment #9
agentrickardIn Drupal 6, there was an Ubercart Domain module that handled this type of integration.
Comment #10
mester9 commentedhow far are we with the Domain Commerce module ? :)
Comment #11
farald commentedThere are obvious reasons why some want domain_access. :)
Let's say you have 4 stores in the same Drupal installation, separated by domain & domain_access. These stores may have their own campain product not accessible to other domains. The point is that sellers or those administering the store should not "know" of the other sites. Nevertheless they need to set up products for their own sites. on-the-fly, without having to get confused by infor from other sites. Or even worse, thinking products or orders belong to their own system & changing them.
Comment #12
dhcadmin commented+1
Another vote for the Commerce + Domain integration module.
Comment #13
wadmiraal commented+1 for me as well. This would be really useful
Comment #14
jeremymcminn commented+1 for me also
Comment #15
agentrickardNO MORE +1. Please use the "Follow" button in the upper right.
Comment #16
michiellucas commentedYou can easily do it yourself!
1) Create content type product display
2) Add product reference to commerce product
3) Add domain acces to product display
4) Alter commerce view -> add relationshop to referenced node (Require relationship)
5) Create hook_insert_entity for commerce product to create automatic product display node, also update, delete ...
Now you have all the power of nodes and domain access webshop.
Comment #17
summit commentedHi Michiellucas, I think this issue is about the product entities, not the product nodes.
greetings, Martijn
Comment #18
delta commentedi'm working on a module that can suit your use case here, i use it to "domainize" the commerce entities and also the taxonomy_term, but you can choose what you want to do with it
you can get it here: http://drupal.org/sandbox/delta/1674202
This module is still in active development.
if it make u happy, or not, any reviews will be welcome in the issue queue.
Comment #18.0
delta commentede
Comment #19
geek-merlinThis should be solved by https://drupal.org/project/domain_entity
Feel free to reopen if not.
Comment #21
fox_01 commentedreopening this because domain access entity module should support this but there is an issue seems to have a relationship with commerce product reference fields.
Order and line item enties can be handled by the domain_entity module but the commerce_product entity not
#2043677: how to configure this module with Drupal commerce and these referenced entities
Because this is a really mixed topic issue here the interesting posts
Error described in #0
aditional info in #8 and #22
Comment #22
bojanz commentedClosing old issue. Any additional integration should be done in contrib.