Skip to content

SS-9019 extend possibilities for customization#12

Draft
snabela wants to merge 24 commits into
developmentfrom
task/SS-9019
Draft

SS-9019 extend possibilities for customization#12
snabela wants to merge 24 commits into
developmentfrom
task/SS-9019

Conversation

@snabela

@snabela snabela commented Oct 3, 2025

Copy link
Copy Markdown
Member

Note

Introduces SD-specific scrolling/ecommerce handlers and graphics API integration, plus a new WooCommerce field to pass parameters_settings_url to the configurator.

  • Frontend (TypeScript):
    • New file src/sd-specific.ts:
      • Implements graphics API client with caching and mappers for categories/products.
      • Adds scrolling API handlers: scrollingApiSetParameters and scrollingApiLoadMore for source graphics.
      • Provides SpecificECommerceApiActions overriding cart, sharing link, and scrolling behaviors.
      • Exposes specificECommerceApiActionsFactory and developmentUrlBuilderOptions.
  • WordPress (PHP):
    • Adds product meta field _parameters_settings_url; saves it and returns via get_product_data as query_params._parameters_settings_url.
  • Build/Config:
    • Update tsconfig.json to include src/sd-specific.ts.

Written by Cursor Bugbot for commit f6c3c36. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

@snabela
snabela force-pushed the task/SS-9019 branch 2 times, most recently from 6c313d2 to c7ce155 Compare October 3, 2025 16:36
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/sd-specific.ts Outdated
Comment thread src/sd-specific.ts Outdated

// map categories to items
const items: IScrollingApiItemTypeSelect[] = categories.map((p) => ({
item: "search:category:" + p.name,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/sd-wp.php
$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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Comment thread src/sd-specific.ts Outdated
result.items = result.items.concat(items);
}

console.log(result);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Comment thread src/sd-specific.ts Outdated
}

const base =
"https://test1.tarablooms.in/wp-json/custom/v1/graphic-components";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Comment thread src/sd-specific.ts Outdated
Comment thread src/sd-specific.ts
Comment thread src/sd-specific.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant