Check if Product exists in another site catalog (same realm) #537
Replies: 4 comments
-
I think we cab build a client Side widget that queries the other realm
using OCAPI and creates the link via JS|HTML
…On Mon, Apr 15, 2019 at 8:12 AM Julien Inchausti ***@***.***> wrote:
Hi,
In the product list grid page (PLP), I need to check if each of the
displayed product in the grid exists in the catalog of another site in the
same realm. If it exists and it is available, I should add a link to the
productTile in order to fly to the product detail page of this other site.
It it does not exist, I should add a link to fly to a list of stores where
you can buy the product.
So far, we did the same kind of thing in the ProductDetail page using
dw.net.HTTPClient() and sending an HTTP request to see if the product
detail page exists (ie if the product is available) on the other site. In
this case I get a 200 code response, otherwise I get a 410 error code
response. This works just fine because we send only 1 request for the
product, but if I try the same one the PLP page in a loop I get a quota
error. I also tried to access directly to the catalog using CatalogMgr to
get the catalog and then ProductMgr to seek for each of the product if it
is available in the catalog within a loop, but here also I got a quota
error :
Limit for quota 'api.dw.catalog.ProductMgr.queryAllProducts()' exceeded.
Limit is 0, actual is 1
Do you have any recommendation about how to perform this ?
Thank you for your help.
Regards,
Julien
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/25>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMHgWaKKmiIdQj0R_eTa3sXNEivyAfCks5vg-cAgaJpZM4cvCFz>
.
|
Beta Was this translation helpful? Give feedback.
-
I would rather suggest to address the problem on the backend: using a custom attribute on the product and a job exploring the catalog for each site, it is possible to meet your requirements. Though it requires a considerable computational load, it is a viable and effective solution. |
Beta Was this translation helpful? Give feedback.
-
Hello Julien,
Doing it on the fly might have serious performance side effects, i would
not recommend calling a realtime service at runtime.
Rather create a offline batch job to create the url i.e plp or pdp and set
it at a product level custom attribute and then create the url from there.
Cache this url along with the product tile so that there is no extra load
on either of the sites.
…On Mon, Apr 15, 2019, 8:13 AM Julien Inchausti ***@***.***> wrote:
Hi,
In the product list grid page (PLP), I need to check if each of the
displayed product in the grid exists in the catalog of another site in the
same realm. If it exists and it is available, I should add a link to the
productTile in order to fly to the product detail page of this other site.
It it does not exist, I should add a link to fly to a list of stores where
you can buy the product.
So far, we did the same kind of thing in the ProductDetail page using
dw.net.HTTPClient() and sending an HTTP request to see if the product
detail page exists (ie if the product is available) on the other site. In
this case I get a 200 code response, otherwise I get a 410 error code
response. This works just fine because we send only 1 request for the
product, but if I try the same one the PLP page in a loop I get a quota
error. I also tried to access directly to the catalog using CatalogMgr to
get the catalog and then ProductMgr to seek for each of the product if it
is available in the catalog within a loop, but here also I got a quota
error :
Limit for quota 'api.dw.catalog.ProductMgr.queryAllProducts()' exceeded.
Limit is 0, actual is 1
Do you have any recommendation about how to perform this ?
Thank you for your help.
Regards,
Julien
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/25>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aogm5VCnzkgkC0D1cTfR25ls0byEd2Zyks5vg-c0gaJpZM4cvCFz>
.
On Mon, Apr 15, 2019, 8:13 AM Julien Inchausti ***@***.***> wrote:
Hi,
In the product list grid page (PLP), I need to check if each of the
displayed product in the grid exists in the catalog of another site in the
same realm. If it exists and it is available, I should add a link to the
productTile in order to fly to the product detail page of this other site.
It it does not exist, I should add a link to fly to a list of stores where
you can buy the product.
So far, we did the same kind of thing in the ProductDetail page using
dw.net.HTTPClient() and sending an HTTP request to see if the product
detail page exists (ie if the product is available) on the other site. In
this case I get a 200 code response, otherwise I get a 410 error code
response. This works just fine because we send only 1 request for the
product, but if I try the same one the PLP page in a loop I get a quota
error. I also tried to access directly to the catalog using CatalogMgr to
get the catalog and then ProductMgr to seek for each of the product if it
is available in the catalog within a loop, but here also I got a quota
error :
Limit for quota 'api.dw.catalog.ProductMgr.queryAllProducts()' exceeded.
Limit is 0, actual is 1
Do you have any recommendation about how to perform this ?
Thank you for your help.
Regards,
Julien
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/25>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aogm5VCnzkgkC0D1cTfR25ls0byEd2Zyks5vg-c0gaJpZM4cvCFz>
.
|
Beta Was this translation helpful? Give feedback.
-
Hi all, Thank you very much for your answers. Thanks again ! |
Beta Was this translation helpful? Give feedback.
-
Hi,
In the product list grid page (PLP), I need to check if each of the displayed product in the grid exists in the catalog of another site in the same realm. If it exists and it is available, I should add a link to the productTile in order to fly to the product detail page of this other site. It it does not exist, I should add a link to fly to a list of stores where you can buy the product.
So far, we did the same kind of thing in the ProductDetail page using dw.net.HTTPClient() and sending an HTTP request to see if the product detail page exists (ie if the product is available) on the other site. In this case I get a 200 code response, otherwise I get a 410 error code response. This works just fine because we send only 1 request for the product, but if I try the same one the PLP page in a loop I get a quota error. I also tried to access directly to the catalog using CatalogMgr to get the catalog and then ProductMgr to seek for each of the product if it is available in the catalog within a loop, but here also I got a quota error :
Do you have any recommendation about how to perform this ?
Thank you for your help.
Regards,
Julien
Beta Was this translation helpful? Give feedback.
All reactions