Project:Ubercart Google Merchant Integration
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review

Issue Summary

I use several product classes (content types) for our store however this only works with the main Ubercart product content type.

Is it possible to make it work with other product content types?

David

Comments

#1

I am interested in this functionality as well. Is there any work being done on this?

#2

Yes, me too! Most of my products are listed within alternative product classes.

Thanks for a great module.

#3

if you're looking for a quick fix you can always change line 225 of uc_gbase.module to include the product types you need. For example if you want to include a product class called 'nyloop' (you can use the devel module to get the node type, or easier firefox/firebug/drupal for firebug module) you can change the line to look something like:

<?php
   
if ($form['type']['#value'] == 'product' || $form['type']['#value'] == 'nyloop') {
?>

It's not a good solution long term of course, and I'm still in the process of setting this up so that might not be the complete solution.

Of course every time the node type is checked you'll need to change the line ...

#4

Great Module! Subscribing!

#5

#6

There is a quick fix to this in version 1.0. Open uc_gbase.module and change line 225 from this:

if ($form['type']['#value'] == 'product') {

to this:

if (uc_product_is_product_form($form)) {

Thankfully ubercart has a built-in method to detect whether a node edit form belongs to a product or product class. Don't have time to submit a patch right now, but if somebody wants to do it feel free.

#7

Category:feature request» bug report
Priority:normal» critical
Status:active» needs review

Changing this to a critical bug, because it renders this module useless. It is not up to this module to decide what a product is, that is Ubercart's job and Ubercart provides API function to determine which node is a product. I attached a patch that changes the hard-coded content-type checks into Ubercart API calls.

AttachmentSize
uc_gbase-product_classes-610414-7.patch 1.2 KB

#8

I can verify that the patch works on my end.