SS-9019 extend possibilities for customization#12
Conversation
6c313d2 to
c7ce155
Compare
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
|
||
| // map categories to items | ||
| const items: IScrollingApiItemTypeSelect[] = categories.map((p) => ({ | ||
| item: "search:category:" + p.name, |
There was a problem hiding this comment.
Bug: Category item prefix mismatch
Category items are returned with the prefix "search:category:" but the parsing logic checks for "category:". When a user selects a category from the returned items, the item value like "search:category:Foo" won't match the startsWith("category:") check, causing it to fall through to the else branch and be incorrectly treated as a search term instead of a category selection.
Additional Locations (1)
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| $parameter_settings_url = sanitize_text_field(get_post_meta($product_id, '_parameters_settings_url', true)); | ||
| if (!empty($parameter_settings_url)) { | ||
| $query_params = array(); | ||
| $query_params['_parameters_settings_url'] = $parameter_settings_url; |
There was a problem hiding this comment.
Bug: Wrong query parameter name for parameters settings URL
The query parameter key '_parameters_settings_url' includes a leading underscore, but the description on line 504 states the parameter should be "parameters_settings_url" (without underscore). If the configurator expects the parameter without the underscore prefix (as documented), this URL parameter will be ignored and the feature won't work as intended.
| result.items = result.items.concat(items); | ||
| } | ||
|
|
||
| console.log(result); |
There was a problem hiding this comment.
Bug: Debug console.log statement left in production code
The console.log(result) statement logs all scrolling API results to the console on every call to returnAndMapCachedResults. Unlike the other console.log statements in the file which have TODO comments indicating they're placeholders for customization, this one appears to be leftover debug logging that will clutter the browser console in production.
| } | ||
|
|
||
| const base = | ||
| "https://test1.tarablooms.in/wp-json/custom/v1/graphic-components"; |
There was a problem hiding this comment.
Bug: Test server URL hardcoded instead of production URL
The API base URL uses test1.tarablooms.in (a test server), but the documentation comment on line 132 states it should fetch from tarablooms.in (production). This mismatch suggests the test URL was accidentally left in the code. In production, this could cause the graphics API integration to fail if the test server is not accessible or contains different data.
f0c83f2 to
b6b3897
Compare
Note
Introduces SD-specific scrolling/ecommerce handlers and graphics API integration, plus a new WooCommerce field to pass parameters_settings_url to the configurator.
src/sd-specific.ts:scrollingApiSetParametersandscrollingApiLoadMorefor sourcegraphics.SpecificECommerceApiActionsoverriding cart, sharing link, and scrolling behaviors.specificECommerceApiActionsFactoryanddevelopmentUrlBuilderOptions._parameters_settings_url; saves it and returns viaget_product_dataasquery_params._parameters_settings_url.tsconfig.jsonto includesrc/sd-specific.ts.Written by Cursor Bugbot for commit f6c3c36. This will update automatically on new commits. Configure here.