[
https://issues.apache.org/jira/browse/OFBIZ-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538347
]
Marco Risaliti commented on OFBIZ-1372:
---------------------------------------
Hi Jacopo,
also I prefer your different approaches on keywordsearch that now is more
reusable in different places.
I have also two new ideas :
- instead of looking for GoodIdentification for a google product only if one
specify insert in the form we can che everytime if the product is in
GoodIdentification then for us is an update.
String googleProductId = null;
if (!"insert".equals(actionType)) {
try {
GenericValue googleProduct =
delegator.findByPrimaryKey("GoodIdentification", UtilMisc.toMap("productId",
prod.getString("productId"), "goodIdentificationTypeId", "GOOGLE_ID"));
if (UtilValidate.isNotEmpty(googleProduct)) {
googleProductId =
googleProduct.getString("idValue");
}
} catch(GenericEntityException gee) {
Debug.logError("Unable to get the Google id for
product [" + prod.getString("productId") + "]: " + gee.getMessage(), module);
}
}
if ("update".equals(actionType) &&
UtilValidate.isEmpty(googleProductId)) {
itemActionType = "insert";
}
String googleProductId = null;
try {
GenericValue googleProduct =
delegator.findByPrimaryKey("GoodIdentification", UtilMisc.toMap("productId",
prod.getString("productId"), "goodIdentificationTypeId", "GOOGLE_ID"));
if (UtilValidate.isNotEmpty(googleProduct)) {
googleProductId =
googleProduct.getString("idValue");
}
} catch(GenericEntityException gee) {
Debug.logError("Unable to get the Google id for
product [" + prod.getString("productId") + "]: " + gee.getMessage(), module);
}
}
so if googleProductId is not null then we will send an update on google.
Because now if you have already the product sent to google and you send again
the same product with an insert action you will have double products on google.
- Why don't we add a new tab in the google base application to show which
products are sent to google base reading the table GoodIdentification with code
GOOGLE_ID ?
Thanks
Marco
> Enhance the integration with Google Product
> -------------------------------------------
>
> Key: OFBIZ-1372
> URL: https://issues.apache.org/jira/browse/OFBIZ-1372
> Project: OFBiz
> Issue Type: Improvement
> Affects Versions: SVN trunk
> Environment: mac os x
> Reporter: Marco Risaliti
> Assignee: Jacopo Cappellato
> Priority: Minor
> Fix For: SVN trunk
>
> Attachments: google.patch, google_2.patch, googlebase.zip
>
>
> This is the first patch for implementing the new Google Base application,
> this job is still not completed it's only a preview if someone wants to check
> it.
> Thanks
> Marco
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.