Hi,
Would it be possible to add the option to select an image field from the Product Display-node in stead of the referenced products at admin/config/services/mailchimp/ecommerce ?
PS: I'm using the latest github-version of the module.
Best,
Hi,
Would it be possible to add the option to select an image field from the Product Display-node in stead of the referenced products at admin/config/services/mailchimp/ecommerce ?
PS: I'm using the latest github-version of the module.
Best,
Comments
Comment #2
greg boggsThat would be a fine addition! Pull Requests are welcome.
Comment #3
kristofferromCool, but can I create a pull request without contributing to the code?
I'd love to contribute but coding-skills aren't sufficient...
Comment #4
torgospizzaHere's a patch that should work! It adds image fields from the chosen node (product display) type.
Then, when building the image_url, looks for the image on the product first; if it's not found there, it will try the display node. This means that you will want to avoid having the same image field
machine_nameon both your display node types and product entity types.Comment #5
torgospizzaWhoops, forgot to include the change to the admin form. New patch attached.
Comment #6
RaphaelBriskie commented@torgosPizza the latest patch is missing
$field_name = variable_get('mailchimp_ecommerce_commerce_image_field', '');Without it, you'll get a lot of "variable undefined" errors.
Additionally, the following code:
Provides the error "Warning: strip_tags() expects parameter 1 to be string, array given".
Comment #7
RaphaelBriskie commentedChanging status to needs work. As it stands the patch does not work.
Comment #8
RaphaelBriskie commentedMy attempt at a patch for this issue. Please review.
Comment #9
firewaller commentedThe above patch didn't work for me. Here is an updated patch.
Comment #10
kristofferrom#9 works for me!
Comment #11
ahimsauzi#9 worked for me as well on version 7.x-1.5. Thanks, @firewaller!
Comment #12
firewaller commentedRe-rolled #9 against latest dev.
Comment #14
samuel.mortensonLooks good, thanks all!