Thanks for the Add On.
A customer wanted to add MPNs that were different from their Model Number, and I had alread installed the Product Fields mod so I duplicated the SKU folder from optional fields, changed all instances of "sku" or "SKU" to "mpn" or "MPN"
and then in googlefroogle.php changed this:
PHP Code:
if ($products->fields['products_model'] != '') {
$content["mpn"] = '<g:mpn>' . $google_base->google_base_sanita($products->fields['products_model'], true) . '</g:mpn>';
to this:
PHP Code:
if ($products->fields['products_mpn'] != '') {
$content["mpn"] = '<g:mpn>' . $google_base->google_base_sanita($products->fields['products_mpn'], true) . '</g:mpn>';
and added "p.products_mpn," right after "p.products_model" in a couple of places.
I'm sure this concept can be used for other fields as well.
Hope this is helpful to someone.
On a side note:
Before I did this, actually when I first installed the mod, I was getting an error about a missing column, p.products_category, so in line 126 I changed
PHP Code:
$additional_attributes .= ", p.products_condition, p.products_category";
to
PHP Code:
$additional_attributes .= ", p.products_condition";
Got rid of the error.
Bookmarks