Changeset 3429516
- Timestamp:
- 12/30/2025 09:37:40 AM (2 months ago)
- Location:
- sync-basalam
- Files:
-
- 358 added
- 32 edited
-
tags/1.7.4 (added)
-
tags/1.7.4/AsyncBackgroundProcess.php (added)
-
tags/1.7.4/CHANGELOG.md (added)
-
tags/1.7.4/JobManager.php (added)
-
tags/1.7.4/JobsRunner.php (added)
-
tags/1.7.4/assets (added)
-
tags/1.7.4/assets/css (added)
-
tags/1.7.4/assets/css/font.css (added)
-
tags/1.7.4/assets/css/logs.css (added)
-
tags/1.7.4/assets/css/onboarding.css (added)
-
tags/1.7.4/assets/css/social.css (added)
-
tags/1.7.4/assets/css/style.css (added)
-
tags/1.7.4/assets/css/sync-basalam-vendor-modal.css (added)
-
tags/1.7.4/assets/fonts (added)
-
tags/1.7.4/assets/fonts/moraba (added)
-
tags/1.7.4/assets/fonts/moraba/Morabba-Bold.woff2 (added)
-
tags/1.7.4/assets/fonts/moraba/Morabba-Regular.woff2 (added)
-
tags/1.7.4/assets/fonts/moraba/Morabba-SemiBold.woff2 (added)
-
tags/1.7.4/assets/fonts/pelak (added)
-
tags/1.7.4/assets/fonts/pelak/PelakFA-Bold.woff2 (added)
-
tags/1.7.4/assets/fonts/pelak/PelakFA-Regular.woff2 (added)
-
tags/1.7.4/assets/fonts/pelak/PelakFA-SemiBold.woff2 (added)
-
tags/1.7.4/assets/icons (added)
-
tags/1.7.4/assets/icons/arrow.svg (added)
-
tags/1.7.4/assets/icons/close.svg (added)
-
tags/1.7.4/assets/icons/create.svg (added)
-
tags/1.7.4/assets/icons/error.svg (added)
-
tags/1.7.4/assets/icons/info-black.svg (added)
-
tags/1.7.4/assets/icons/info.svg (added)
-
tags/1.7.4/assets/icons/new.svg (added)
-
tags/1.7.4/assets/icons/order.svg (added)
-
tags/1.7.4/assets/icons/product.svg (added)
-
tags/1.7.4/assets/icons/submit.svg (added)
-
tags/1.7.4/assets/icons/sync.svg (added)
-
tags/1.7.4/assets/icons/trash.svg (added)
-
tags/1.7.4/assets/icons/unsync.svg (added)
-
tags/1.7.4/assets/icons/update.svg (added)
-
tags/1.7.4/assets/images (added)
-
tags/1.7.4/assets/images/aparat.png (added)
-
tags/1.7.4/assets/images/bale.png (added)
-
tags/1.7.4/assets/images/basalam-logotype.svg (added)
-
tags/1.7.4/assets/images/basalam.svg (added)
-
tags/1.7.4/assets/images/gmail.png (added)
-
tags/1.7.4/assets/images/help.svg (added)
-
tags/1.7.4/assets/images/telegram.png (added)
-
tags/1.7.4/assets/images/woosalam.png (added)
-
tags/1.7.4/assets/js (added)
-
tags/1.7.4/assets/js/admin.js (added)
-
tags/1.7.4/assets/js/check-sync.js (added)
-
tags/1.7.4/assets/js/connect-modal.js (added)
-
tags/1.7.4/assets/js/generate-product-variation.js (added)
-
tags/1.7.4/assets/js/get-category.js (added)
-
tags/1.7.4/assets/js/help.js (added)
-
tags/1.7.4/assets/js/logs.js (added)
-
tags/1.7.4/assets/js/manage-box.js (added)
-
tags/1.7.4/assets/js/map-category-option.js (added)
-
tags/1.7.4/assets/js/mobile-category.js (added)
-
tags/1.7.4/assets/js/order.js (added)
-
tags/1.7.4/assets/js/product-fields.js (added)
-
tags/1.7.4/assets/js/round.js (added)
-
tags/1.7.4/composer.json (added)
-
tags/1.7.4/includes (added)
-
tags/1.7.4/includes/Actions (added)
-
tags/1.7.4/includes/Actions/ActionHandler.php (added)
-
tags/1.7.4/includes/Actions/Controller (added)
-
tags/1.7.4/includes/Actions/Controller/ActionController.php (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions/CreateCategoryMap.php (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions/FetchBasalamCategories.php (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions/GetCategoryMappings.php (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions/GetMappingStats.php (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions/GetWooCategories.php (added)
-
tags/1.7.4/includes/Actions/Controller/CategoryActions/RemoveCategoryMap.php (added)
-
tags/1.7.4/includes/Actions/Controller/OptionActions (added)
-
tags/1.7.4/includes/Actions/Controller/OptionActions/CreateMapOption.php (added)
-
tags/1.7.4/includes/Actions/Controller/OptionActions/RemoveMapOption.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/AutoConfirmOrders.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/CancelOrder.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/ConfirmOrder.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/DelayOrder.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/FetchUnsyncOrders.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/RequestCancelOrder.php (added)
-
tags/1.7.4/includes/Actions/Controller/OrderActions/TrackingCodeOrder.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/ArchiveProduct.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/CancelConnectAllProducts.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/CancelCreateProducts.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/CancelDebug.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/CancelUpdateProducts.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/ClearLogs.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/ConnectAllProducts.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/ConnectSingleProduct.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/CreateAllProducts.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/CreateSingleProduct.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/DetectionProductCategories.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/DisconnectProduct.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/GetCategoryAttributes.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/RestoreProduct.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/UpdateAllProducts.php (added)
-
tags/1.7.4/includes/Actions/Controller/ProductActions/UpdateSingleProduct.php (added)
-
tags/1.7.4/includes/Actions/Controller/UpdateSettings.php (added)
-
tags/1.7.4/includes/Actions/RegisterActions.php (added)
-
tags/1.7.4/includes/Activator.php (added)
-
tags/1.7.4/includes/Admin (added)
-
tags/1.7.4/includes/Admin/Components.php (added)
-
tags/1.7.4/includes/Admin/Faq.php (added)
-
tags/1.7.4/includes/Admin/Menus.php (added)
-
tags/1.7.4/includes/Admin/OnboardingManager.php (added)
-
tags/1.7.4/includes/Admin/Order (added)
-
tags/1.7.4/includes/Admin/Order/OrderColumn.php (added)
-
tags/1.7.4/includes/Admin/Order/OrderMetaBox.php (added)
-
tags/1.7.4/includes/Admin/Order/OrderStatuses.php (added)
-
tags/1.7.4/includes/Admin/Order/OrderTrackingBox.php (added)
-
tags/1.7.4/includes/Admin/Pages (added)
-
tags/1.7.4/includes/Admin/Pages/AdminPageInterface.php (added)
-
tags/1.7.4/includes/Admin/Pages/CategoryMappingPage.php (added)
-
tags/1.7.4/includes/Admin/Pages/HelpPage.php (added)
-
tags/1.7.4/includes/Admin/Pages/InfoPage.php (added)
-
tags/1.7.4/includes/Admin/Pages/LogsPage.php (added)
-
tags/1.7.4/includes/Admin/Pages/MainPage.php (added)
-
tags/1.7.4/includes/Admin/Pages/OnboardingPage.php (added)
-
tags/1.7.4/includes/Admin/Pages/UnsyncedProductsPage.php (added)
-
tags/1.7.4/includes/Admin/Product (added)
-
tags/1.7.4/includes/Admin/Product/Category (added)
-
tags/1.7.4/includes/Admin/Product/Category/CategoryMapping.php (added)
-
tags/1.7.4/includes/Admin/Product/Category/CategoryOptions.php (added)
-
tags/1.7.4/includes/Admin/Product/Data (added)
-
tags/1.7.4/includes/Admin/Product/Data/Handlers (added)
-
tags/1.7.4/includes/Admin/Product/Data/Handlers/ProductDataHandlerInterface.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Handlers/SimpleProductHandler.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Handlers/VariableProductHandler.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/ProductDataBuilder.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/ProductDataFacade.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services/AttributeService.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services/CategoryService.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services/MobileDataHandler.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services/PhotoService.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services/PriceService.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Services/VariantService.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Strategies (added)
-
tags/1.7.4/includes/Admin/Product/Data/Strategies/CreateProductStrategy.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Strategies/CustomUpdateProductStrategy.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Strategies/DataStrategyInterface.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Strategies/QuickUpdateProductStrategy.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Strategies/UpdateProductStrategy.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Validators (added)
-
tags/1.7.4/includes/Admin/Product/Data/Validators/ProductExistenceValidator.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Validators/ProductStatusValidator.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Validators/ValidatorChain.php (added)
-
tags/1.7.4/includes/Admin/Product/Data/Validators/ValidatorInterface.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations (added)
-
tags/1.7.4/includes/Admin/Product/Operations/AbstractProductOperation.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/ArchiveProduct.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/ConnectProduct.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/CreateProduct.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/ProductOperationFactory.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/ProductOperationInterface.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/RestoreProduct.php (added)
-
tags/1.7.4/includes/Admin/Product/Operations/UpdateProduct.php (added)
-
tags/1.7.4/includes/Admin/Product/ProductDataFactory.php (added)
-
tags/1.7.4/includes/Admin/Product/ProductOperations.php (added)
-
tags/1.7.4/includes/Admin/Product/Services (added)
-
tags/1.7.4/includes/Admin/Product/Services/ProductDisconnectService.php (added)
-
tags/1.7.4/includes/Admin/Product/Services/ProductQueryService.php (added)
-
tags/1.7.4/includes/Admin/Product/Services/ProductSyncService.php (added)
-
tags/1.7.4/includes/Admin/Product/Validators (added)
-
tags/1.7.4/includes/Admin/Product/Validators/ProductStatusValidator.php (added)
-
tags/1.7.4/includes/Admin/Product/elements (added)
-
tags/1.7.4/includes/Admin/Product/elements/ProductList (added)
-
tags/1.7.4/includes/Admin/Product/elements/ProductList/Actions.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/ProductList/Filter.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/ProductList/MetaBox.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/ProductList/StatusColumn.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/SingleProduct (added)
-
tags/1.7.4/includes/Admin/Product/elements/SingleProduct/MobileFields.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/SingleProduct/Tab.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/SingleProduct/TypeFields.php (added)
-
tags/1.7.4/includes/Admin/Product/elements/SingleProduct/WholesaleField.php (added)
-
tags/1.7.4/includes/Admin/ProductService.php (added)
-
tags/1.7.4/includes/Admin/Settings (added)
-
tags/1.7.4/includes/Admin/Settings.php (added)
-
tags/1.7.4/includes/Admin/Settings/OAuthManager.php (added)
-
tags/1.7.4/includes/Admin/Settings/SettingsConfig.php (added)
-
tags/1.7.4/includes/Admin/Settings/SettingsContainer.php (added)
-
tags/1.7.4/includes/Admin/Settings/SettingsManager.php (added)
-
tags/1.7.4/includes/Admin/Settings/SettingsPageHandler.php (added)
-
tags/1.7.4/includes/Jobs (added)
-
tags/1.7.4/includes/Jobs/AbstractJobType.php (added)
-
tags/1.7.4/includes/Jobs/DiscountTaskScheduler.php (added)
-
tags/1.7.4/includes/Jobs/JobExecutor.php (added)
-
tags/1.7.4/includes/Jobs/JobRegistry.php (added)
-
tags/1.7.4/includes/Jobs/JobType.php (added)
-
tags/1.7.4/includes/Jobs/LockManager.php (added)
-
tags/1.7.4/includes/Jobs/Types (added)
-
tags/1.7.4/includes/Jobs/Types/AutoConnectProductsJob.php (added)
-
tags/1.7.4/includes/Jobs/Types/BulkUpdateProductsJob.php (added)
-
tags/1.7.4/includes/Jobs/Types/CreateAllProductsJob.php (added)
-
tags/1.7.4/includes/Jobs/Types/CreateSingleProductJob.php (added)
-
tags/1.7.4/includes/Jobs/Types/UpdateAllProductsJob.php (added)
-
tags/1.7.4/includes/Jobs/Types/UpdateSingleProductJob.php (added)
-
tags/1.7.4/includes/Logger (added)
-
tags/1.7.4/includes/Logger/Logger.php (added)
-
tags/1.7.4/includes/Logger/LoggerInterface.php (added)
-
tags/1.7.4/includes/Logger/WooLogger.php (added)
-
tags/1.7.4/includes/Migrations (added)
-
tags/1.7.4/includes/Migrations/MigrationInterface.php (added)
-
tags/1.7.4/includes/Migrations/MigrationManager.php (added)
-
tags/1.7.4/includes/Migrations/MigratorService.php (added)
-
tags/1.7.4/includes/Migrations/Versions (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_3_0.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_3_2.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_3_8.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_3_9.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_4_0.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_4_1.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_5_4.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_6_2.php (added)
-
tags/1.7.4/includes/Migrations/Versions/Migration_1_7_4.php (added)
-
tags/1.7.4/includes/OrderEndpoint.php (added)
-
tags/1.7.4/includes/Plugin.php (added)
-
tags/1.7.4/includes/Queue (added)
-
tags/1.7.4/includes/Queue/QueueAbstract.php (added)
-
tags/1.7.4/includes/Queue/QueueManager.php (added)
-
tags/1.7.4/includes/Queue/Tasks (added)
-
tags/1.7.4/includes/Queue/Tasks/CreateProduct.php (added)
-
tags/1.7.4/includes/Queue/Tasks/DailyCheckForceUpdate.php (added)
-
tags/1.7.4/includes/Queue/Tasks/Debug.php (added)
-
tags/1.7.4/includes/Queue/Tasks/UpdateProduct.php (added)
-
tags/1.7.4/includes/Registrar (added)
-
tags/1.7.4/includes/Registrar/AdminRegistrar.php (added)
-
tags/1.7.4/includes/Registrar/Contracts (added)
-
tags/1.7.4/includes/Registrar/Contracts/RegistrarInterface.php (added)
-
tags/1.7.4/includes/Registrar/ListenerRegistrar.php (added)
-
tags/1.7.4/includes/Registrar/OrderRegistrar.php (added)
-
tags/1.7.4/includes/Registrar/ProductListeners (added)
-
tags/1.7.4/includes/Registrar/ProductListeners/ArchiveProduct.php (added)
-
tags/1.7.4/includes/Registrar/ProductListeners/CreateWooProduct.php (added)
-
tags/1.7.4/includes/Registrar/ProductListeners/ProductListenerAbstract.php (added)
-
tags/1.7.4/includes/Registrar/ProductListeners/ProductStatusTrait.php (added)
-
tags/1.7.4/includes/Registrar/ProductListeners/RestoreProduct.php (added)
-
tags/1.7.4/includes/Registrar/ProductListeners/UpdateWooProduct.php (added)
-
tags/1.7.4/includes/Registrar/ProductRegistrar.php (added)
-
tags/1.7.4/includes/Registrar/QueueRegistrar.php (added)
-
tags/1.7.4/includes/Services (added)
-
tags/1.7.4/includes/Services/Api (added)
-
tags/1.7.4/includes/Services/Api/AbstractApiService.php (added)
-
tags/1.7.4/includes/Services/Api/ApiRequestValidator.php (added)
-
tags/1.7.4/includes/Services/Api/ApiResponseHandler.php (added)
-
tags/1.7.4/includes/Services/Api/DeleteApiService.php (added)
-
tags/1.7.4/includes/Services/Api/FileUploadApiService.php (added)
-
tags/1.7.4/includes/Services/Api/GetApiService.php (added)
-
tags/1.7.4/includes/Services/Api/PatchApiService.php (added)
-
tags/1.7.4/includes/Services/Api/PostApiService.php (added)
-
tags/1.7.4/includes/Services/Api/PutApiService.php (added)
-
tags/1.7.4/includes/Services/ApiServiceManager.php (added)
-
tags/1.7.4/includes/Services/BasalamAppStoreReview.php (added)
-
tags/1.7.4/includes/Services/FetchVersionDetail.php (added)
-
tags/1.7.4/includes/Services/FileUploader.php (added)
-
tags/1.7.4/includes/Services/Orders (added)
-
tags/1.7.4/includes/Services/Orders/CancelOrderService.php (added)
-
tags/1.7.4/includes/Services/Orders/CancelReqOrderService.php (added)
-
tags/1.7.4/includes/Services/Orders/ConfirmOrderService.php (added)
-
tags/1.7.4/includes/Services/Orders/DelayReqOrderService.php (added)
-
tags/1.7.4/includes/Services/Orders/FetchOrders.php (added)
-
tags/1.7.4/includes/Services/Orders/FetchWeeklyUnsyncOrders.php (added)
-
tags/1.7.4/includes/Services/Orders/OrderManager.php (added)
-
tags/1.7.4/includes/Services/Orders/PostAutoConfirmOrder.php (added)
-
tags/1.7.4/includes/Services/Orders/TrackingCodeOrderService.php (added)
-
tags/1.7.4/includes/Services/Products (added)
-
tags/1.7.4/includes/Services/Products/AutoConnectProducts.php (added)
-
tags/1.7.4/includes/Services/Products/ConnectSingleProductService.php (added)
-
tags/1.7.4/includes/Services/Products/CreateSingleProductService.php (added)
-
tags/1.7.4/includes/Services/Products/Discount (added)
-
tags/1.7.4/includes/Services/Products/Discount/DiscountInterface.php (added)
-
tags/1.7.4/includes/Services/Products/Discount/DiscountManager.php (added)
-
tags/1.7.4/includes/Services/Products/Discount/DiscountTaskModel.php (added)
-
tags/1.7.4/includes/Services/Products/Discount/DiscountTaskProcessor.php (added)
-
tags/1.7.4/includes/Services/Products/Discount/SimpleProductDiscount.php (added)
-
tags/1.7.4/includes/Services/Products/Discount/VariableProductDiscount.php (added)
-
tags/1.7.4/includes/Services/Products/FetchCommission.php (added)
-
tags/1.7.4/includes/Services/Products/FetchProductsData.php (added)
-
tags/1.7.4/includes/Services/Products/FetchUnsyncProducts.php (added)
-
tags/1.7.4/includes/Services/Products/GetCategoryAttr.php (added)
-
tags/1.7.4/includes/Services/Products/GetCategoryId.php (added)
-
tags/1.7.4/includes/Services/Products/UpdateSingleProductService.php (added)
-
tags/1.7.4/includes/Services/SystemResourceMonitor.php (added)
-
tags/1.7.4/includes/Services/WebhookService.php (added)
-
tags/1.7.4/includes/Utilities (added)
-
tags/1.7.4/includes/Utilities/DateConverter.php (added)
-
tags/1.7.4/includes/Utilities/GetProvincesData.php (added)
-
tags/1.7.4/includes/Utilities/OrderManagerUtilities.php (added)
-
tags/1.7.4/includes/Utilities/TextConverter.php (added)
-
tags/1.7.4/readme.txt (added)
-
tags/1.7.4/sync-basalam.php (added)
-
tags/1.7.4/templates (added)
-
tags/1.7.4/templates/admin (added)
-
tags/1.7.4/templates/admin/CategoryMapping.php (added)
-
tags/1.7.4/templates/admin/Dashboard.php (added)
-
tags/1.7.4/templates/admin/Help.php (added)
-
tags/1.7.4/templates/admin/Info.php (added)
-
tags/1.7.4/templates/admin/InfoConnected.php (added)
-
tags/1.7.4/templates/admin/InfoNotAuth.php (added)
-
tags/1.7.4/templates/admin/InfoNotVendor.php (added)
-
tags/1.7.4/templates/admin/Logs.php (added)
-
tags/1.7.4/templates/admin/ProductSync.php (added)
-
tags/1.7.4/templates/auth (added)
-
tags/1.7.4/templates/auth/Connected.php (added)
-
tags/1.7.4/templates/auth/GetToken.php (added)
-
tags/1.7.4/templates/auth/NotConnected.php (added)
-
tags/1.7.4/templates/auth/NotVendor.php (added)
-
tags/1.7.4/templates/notifications (added)
-
tags/1.7.4/templates/notifications/AccessAlert.php (added)
-
tags/1.7.4/templates/notifications/ForceUpdateAlert.php (added)
-
tags/1.7.4/templates/notifications/LikeAlert.php (added)
-
tags/1.7.4/templates/orders (added)
-
tags/1.7.4/templates/orders/OrderMetaBox.php (added)
-
tags/1.7.4/templates/orders/Popups (added)
-
tags/1.7.4/templates/orders/Popups/CancelOrder.php (added)
-
tags/1.7.4/templates/orders/Popups/DelayRequest.php (added)
-
tags/1.7.4/templates/orders/Popups/RequestCancel.php (added)
-
tags/1.7.4/templates/orders/Popups/ShippingMethod.php (added)
-
tags/1.7.4/templates/orders/Statuses (added)
-
tags/1.7.4/templates/orders/Statuses/Cancelled.php (added)
-
tags/1.7.4/templates/orders/Statuses/Completed.php (added)
-
tags/1.7.4/templates/orders/Statuses/Pending.php (added)
-
tags/1.7.4/templates/orders/Statuses/Preparation.php (added)
-
tags/1.7.4/templates/orders/Statuses/Shipping.php (added)
-
tags/1.7.4/templates/products (added)
-
tags/1.7.4/templates/products/ConnectButton.php (added)
-
tags/1.7.4/templates/products/ConnectModal.php (added)
-
tags/1.7.4/templates/products/Popups (added)
-
tags/1.7.4/templates/products/Popups/AddProduct.php (added)
-
tags/1.7.4/templates/products/Popups/AutoConnect.php (added)
-
tags/1.7.4/templates/products/Popups/EditProduct.php (added)
-
tags/1.7.4/templates/products/sections (added)
-
tags/1.7.4/templates/products/sections/OrderManagement.php (added)
-
tags/1.7.4/templates/products/sections/ProductList.php (added)
-
tags/1.7.4/templates/products/sections/Settings.php (added)
-
tags/1.7.4/templates/products/sections/Status.php (added)
-
tags/1.7.4/vendor (added)
-
tags/1.7.4/vendor/autoload.php (added)
-
tags/1.7.4/vendor/composer (added)
-
tags/1.7.4/vendor/composer/ClassLoader.php (added)
-
tags/1.7.4/vendor/composer/InstalledVersions.php (added)
-
tags/1.7.4/vendor/composer/LICENSE (added)
-
tags/1.7.4/vendor/composer/autoload_classmap.php (added)
-
tags/1.7.4/vendor/composer/autoload_namespaces.php (added)
-
tags/1.7.4/vendor/composer/autoload_psr4.php (added)
-
tags/1.7.4/vendor/composer/autoload_real.php (added)
-
tags/1.7.4/vendor/composer/autoload_static.php (added)
-
tags/1.7.4/vendor/composer/installed.json (added)
-
tags/1.7.4/vendor/composer/installed.php (added)
-
trunk/JobsRunner.php (modified) (1 diff)
-
trunk/assets/js/get-category.js (modified) (1 diff)
-
trunk/includes/Admin/Components.php (modified) (1 diff)
-
trunk/includes/Admin/Product/Category/CategoryMapping.php (modified) (1 diff)
-
trunk/includes/Admin/Product/Data/Services/AttributeService.php (modified) (1 diff)
-
trunk/includes/Admin/Product/Data/Services/VariantService.php (modified) (1 diff)
-
trunk/includes/Admin/Product/Services/ProductQueryService.php (modified) (3 diffs)
-
trunk/includes/Admin/Product/Services/ProductSyncService.php (modified) (1 diff)
-
trunk/includes/Jobs/Types/BulkUpdateProductsJob.php (modified) (1 diff)
-
trunk/includes/Migrations/MigrationManager.php (modified) (2 diffs)
-
trunk/includes/Migrations/Versions/Migration_1_7_4.php (added)
-
trunk/includes/Plugin.php (modified) (3 diffs)
-
trunk/includes/Queue/QueueManager.php (modified) (5 diffs)
-
trunk/includes/Queue/Tasks/DailyCheckForceUpdate.php (added)
-
trunk/includes/Registrar/QueueRegistrar.php (modified) (1 diff)
-
trunk/includes/Services/FetchVersionDetail.php (added)
-
trunk/includes/Services/Orders/FetchOrders.php (modified) (2 diffs)
-
trunk/includes/Services/Orders/OrderManager.php (modified) (4 diffs)
-
trunk/includes/Services/Products/AutoConnectProducts.php (modified) (2 diffs)
-
trunk/includes/Services/Products/CreateSingleProductService.php (modified) (2 diffs)
-
trunk/includes/Services/Products/Discount/DiscountManager.php (modified) (1 diff)
-
trunk/includes/Services/Products/FetchProductsData.php (modified) (2 diffs)
-
trunk/includes/Services/Products/FetchUnsyncProducts.php (modified) (2 diffs)
-
trunk/includes/Services/Products/GetCategoryAttr.php (modified) (1 diff)
-
trunk/includes/Services/Products/UpdateSingleProductService.php (modified) (5 diffs)
-
trunk/includes/Services/WebhookService.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/sync-basalam.php (modified) (2 diffs)
-
trunk/templates/admin/Info.php (modified) (1 diff)
-
trunk/templates/auth/Connected.php (modified) (1 diff)
-
trunk/templates/notifications/ForceUpdateAlert.php (added)
-
trunk/templates/products/Popups/EditProduct.php (modified) (2 diffs)
-
trunk/templates/products/sections/Status.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/LICENSE (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sync-basalam/trunk/JobsRunner.php
r3426342 r3429516 48 48 49 49 foreach ($sortedJobTypes as $jobType => $jobExecutor) { 50 if (!$this->jobExecutor->acquireLock($jobType, 0)) { 51 continue; 52 } 53 50 if (!$this->jobExecutor->acquireLock($jobType, 0)) continue; 54 51 try { 55 52 $lastRun = floatval(get_option($jobType . '_last_run', 0)); -
sync-basalam/trunk/assets/js/get-category.js
r3426342 r3429516 24 24 ) { 25 25 var attributesData = JSON.parse(res.data.attributes); 26 if (attributesData. length && attributesData[0].attributes.length) {26 if (attributesData.data && attributesData.data.length && attributesData.data[0].attributes.length) { 27 27 html += ` 28 28 <div class="basalam-attributes-header">ویژگیهای دستهبندی:</div> 29 29 <div class="basalam-attributes-container"> 30 30 `; 31 attributesData [0].attributes.forEach(function (attr) {31 attributesData.data[0].attributes.forEach(function (attr) { 32 32 html += ` 33 33 <div class="basalam-copy-attr"> -
sync-basalam/trunk/includes/Admin/Components.php
r3428129 r3429516 489 489 public static function renderCheckOrdersButtonTraditional() 490 490 { 491 $screen = get_current_screen(); 492 493 // Only show on shop order list page when HPOS is not enabled 494 if (!$screen || $screen->id !== 'edit-shop_order') { 495 return; 496 } 497 498 // Check if HPOS is enabled - skip if it is 499 if ( 500 function_exists('woocommerce_custom_orders_table_usage_is_enabled') && 501 woocommerce_custom_orders_table_usage_is_enabled() 502 ) { 503 return; 504 } 505 506 // Check post type to ensure we're on the shop order page 507 if (!isset($_GET['post_type']) || $_GET['post_type'] !== 'shop_order') { 508 return; 509 } 510 491 511 ?> 492 512 <div class="alignleft actions custom"> -
sync-basalam/trunk/includes/Admin/Product/Category/CategoryMapping.php
r3426342 r3429516 60 60 { 61 61 $apiService = new ApiServiceManager(); 62 $response = $apiService->sendGetRequest('https:// core.basalam.com/v3/categories');62 $response = $apiService->sendGetRequest('https://openapi.basalam.com/v1/categories'); 63 63 64 64 if (!$response || !isset($response['body'])) throw new \Exception('خطا در دریافت دستهبندیهای باسلام'); -
sync-basalam/trunk/includes/Admin/Product/Data/Services/AttributeService.php
r3426342 r3429516 157 157 $responseBody = json_decode($response['body'], true); 158 158 159 foreach ($responseBody as $group) {159 foreach ($responseBody['data'] as $group) { 160 160 foreach ($group['attributes'] as $attribute) { 161 161 $attributes[] = [ -
sync-basalam/trunk/includes/Admin/Product/Data/Services/VariantService.php
r3426342 r3429516 39 39 if (!$price) return null; 40 40 41 return [ 41 $basalamVariantId = get_post_meta($variationId, 'sync_basalam_variation_id', true); 42 43 $variantData = [ 42 44 'primary_price' => $price, 43 45 'stock' => $this->getVariantStock($variation), 44 46 'properties' => $this->getVariantProperties($variation, $parentProduct), 45 47 ]; 48 49 // Add Basalam variant ID if it exists 50 if (!empty($basalamVariantId)) { 51 $variantData['id'] = $basalamVariantId; 52 } 53 54 return $variantData; 46 55 } 47 56 -
sync-basalam/trunk/includes/Admin/Product/Services/ProductQueryService.php
r3426342 r3429516 34 34 ON stock.post_id = p.ID 35 35 AND stock.meta_key = '_stock_status' 36 LEFT JOIN {$metaTable} AS price 37 ON price.post_id = p.ID 38 AND price.meta_key = '_price' 36 39 WHERE p.post_type = 'product' 37 40 AND p.post_status = 'publish' … … 39 42 AND basalam.post_id IS NULL 40 43 AND p.ID > %d 44 AND price.meta_value IS NOT NULL 45 AND CAST(price.meta_value AS DECIMAL(10,2)) > 1000 41 46 {$stockCondition} 42 47 ORDER BY p.ID ASC … … 65 70 ON basalam.post_id = p.ID 66 71 AND basalam.meta_key = 'sync_basalam_product_id' 72 LEFT JOIN {$metaTable} AS thumb 73 ON thumb.post_id = p.ID 74 AND thumb.meta_key = '_thumbnail_id' 75 LEFT JOIN {$metaTable} AS price 76 ON price.post_id = p.ID 77 AND price.meta_key = '_price' 67 78 WHERE p.post_type = 'product' 68 79 AND p.post_status = 'publish' 69 80 AND p.ID > %d 81 AND thumb.meta_value IS NOT NULL 82 AND price.meta_value IS NOT NULL 83 AND CAST(price.meta_value AS DECIMAL(10,2)) > 1000 70 84 ORDER BY p.ID ASC 71 85 LIMIT %d -
sync-basalam/trunk/includes/Admin/Product/Services/ProductSyncService.php
r3426342 r3429516 70 70 } 71 71 72 public function enqueueBulkUpdate(): array73 {74 $this->jobManager->createJob(75 self::JOB_TYPE_UPDATE_BULK,76 'pending',77 json_encode(['last_updatable_product_id' => 0])78 );79 80 return [81 'success' => true,82 'message' => 'محصولات با موفقیت به صف بروزرسانی فوری افزوده شدند.',83 'status_code' => 200,84 ];85 }86 87 72 public function enqueueSelectedForUpdate(array $productIds): void 88 73 { -
sync-basalam/trunk/includes/Jobs/Types/BulkUpdateProductsJob.php
r3426342 r3429516 44 44 if (!$productIds) { 45 45 Logger::info('بروزرسانی دستهای: همه محصولات بروزرسانی شدند.'); 46 $this->jobManager->deleteJob(['job_type' => 'sync_basalam_bulk_update_products']); 46 47 return; 47 48 } -
sync-basalam/trunk/includes/Migrations/MigrationManager.php
r3426342 r3429516 11 11 use SyncBasalam\Migrations\Versions\Migration_1_5_4; 12 12 use SyncBasalam\Migrations\Versions\Migration_1_6_2; 13 use SyncBasalam\Migrations\Versions\Migration_1_7_4; 13 14 14 15 defined('ABSPATH') || exit; … … 29 30 '1.5.4' => new Migration_1_5_4(), 30 31 '1.6.2' => new Migration_1_6_2(), 32 '1.7.4' => new Migration_1_7_4(), 31 33 ]; 32 34 } -
sync-basalam/trunk/includes/Plugin.php
r3428129 r3429516 10 10 use SyncBasalam\Registrar\ProductRegistrar; 11 11 use SyncBasalam\Registrar\QueueRegistrar; 12 use SyncBasalam\Services\FetchVersionDetail; 12 13 13 14 defined('ABSPATH') || exit; … … 15 16 class Plugin 16 17 { 17 public const VERSION = '1.7. 3';18 public const VERSION = '1.7.4'; 18 19 19 20 private static $instance = null; … … 36 37 { 37 38 $currentVersion = \get_option('sync_basalam_version') ?: '0.0.0'; 38 $manager = new MigrationManager(); 39 $manager->runMigrations($currentVersion, self::VERSION); 39 if (version_compare($currentVersion, self::VERSION, '<')) { 40 $manager = new MigrationManager(); 41 $manager->runMigrations($currentVersion, self::VERSION); 42 } 43 } 44 45 static function checkForceUpdateByVersion() 46 { 47 $currentVersion = \get_option('sync_basalam_version') ?: '0.0.0'; 48 if (version_compare($currentVersion, self::VERSION, '<')) { 49 $fetchVersionDetail = new FetchVersionDetail(); 50 $fetchVersionDetail->checkForceUpdate(); 51 } 40 52 } 41 53 -
sync-basalam/trunk/includes/Queue/QueueManager.php
r3426342 r3429516 21 21 $this->setLastRunTimestamp($timestamp); 22 22 23 return WC()->queue()->schedule_single(23 return \WC()->queue()->schedule_single( 24 24 $timestamp, 25 25 $this->taskName, … … 31 31 public function scheduleRecurringTask($intervalInSeconds, $args = []) 32 32 { 33 if (self::hasPendingTasks($this->taskName)) return false; 34 33 35 $startTimestamp = time(); 34 36 35 37 $this->setLastRunTimestamp($startTimestamp); 36 38 37 return WC()->queue()->schedule_recurring(39 return \WC()->queue()->schedule_recurring( 38 40 $startTimestamp, 39 41 $intervalInSeconds, … … 52 54 { 53 55 // Search for pending tasks in queue 54 $pendingTasks = WC()->queue()->search([56 $pendingTasks = \WC()->queue()->search([ 55 57 'hook' => $taskName, 56 58 'status' => 'pending', … … 62 64 public static function cancelAllTasksGroup($taskName) 63 65 { 64 WC()->queue()->cancel_all($taskName);66 \WC()->queue()->cancel_all($taskName); 65 67 66 68 delete_option($taskName . '_last_run'); … … 80 82 { 81 83 // Search for pending tasks with high limit 82 $pendingTasks = WC()->queue()->search([84 $pendingTasks = \WC()->queue()->search([ 83 85 'hook' => $taskName, 84 86 'status' => 'pending', -
sync-basalam/trunk/includes/Registrar/QueueRegistrar.php
r3428129 r3429516 21 21 $taskClasses = [ 22 22 'Debug', 23 'DailyCheckForceUpdate' 23 24 ]; 24 25 -
sync-basalam/trunk/includes/Services/Orders/FetchOrders.php
r3426342 r3429516 4 4 5 5 use SyncBasalam\Services\ApiServiceManager; 6 use SyncBasalam\Admin\Settings\SettingsConfig;7 6 8 7 defined('ABSPATH') || exit; … … 15 14 public function __construct() 16 15 { 17 $this->url = "https://o rder-processing.basalam.com/v3/vendor-parcels";16 $this->url = "https://openapi.basalam.com/v1/vendor-parcels"; 18 17 $this->apiservice = new ApiServiceManager(); 19 18 } -
sync-basalam/trunk/includes/Services/Orders/OrderManager.php
r3428129 r3429516 360 360 public static function cancelOrderWoo($invoice_id) 361 361 { 362 return self::updateOrderStatus($invoice_id, 'bslm-rejected' );362 return self::updateOrderStatus($invoice_id, 'bslm-rejected', 'bslm-rejected'); 363 363 } 364 364 365 365 public static function completeOrderWoo($invoice_id) 366 366 { 367 return self::updateOrderStatus($invoice_id, 'bslm-completed' );367 return self::updateOrderStatus($invoice_id, 'bslm-completed', 'bslm-completed'); 368 368 } 369 369 370 370 public static function confirmOrderWoo($invoice_id) 371 371 { 372 return self::updateOrderStatus($invoice_id, 'bslm-preparation' );372 return self::updateOrderStatus($invoice_id, 'bslm-preparation', 'bslm-preparation'); 373 373 } 374 374 375 375 public static function shippedOrderWoo($invoice_id) 376 376 { 377 return self::updateOrderStatus($invoice_id, 'bslm-shipping' );378 } 379 380 p rivate static function updateOrderStatus($invoice_id, $status)377 return self::updateOrderStatus($invoice_id, 'bslm-shipping', 'bslm-shipping'); 378 } 379 380 public static function updateOrderStatus($invoice_id, $status, $job = null) 381 381 { 382 382 global $wpdb; 383 383 $table_name = $wpdb->prefix . 'sync_basalam_payments'; 384 384 385 $order_id = $wpdb->get_var( 386 $wpdb->prepare( 387 "SELECT order_id FROM {$table_name} WHERE invoice_id = %d", 388 $invoice_id 389 ) 390 ); 385 $order_id = $wpdb->get_var($wpdb->prepare("SELECT order_id FROM {$table_name} WHERE invoice_id = $invoice_id")); 391 386 392 387 if (!$order_id) { 393 Logger::error("سفارشی با این شناسه فاکتور پیدا نشد: $invoice_id"); 394 388 Logger::error("سفارشی با این شناسه فاکتور پیدا نشد: $invoice_id . عملیات '$job' انجام نشد."); 395 389 return false; 396 390 } 397 391 398 392 $order = wc_get_order($order_id); 399 if ($order && $order instanceof WC_Order) { 393 394 if ($order && $order instanceof \WC_Order) { 400 395 $order->update_status($status); 401 402 396 return $order_id; 403 397 } … … 462 456 } 463 457 464 /**465 * تنظیم قیمت آیتم سفارش از financial_report466 *467 * @param WC_Order $order468 * @param int $order_item_id469 * @param array $item470 * @param int $quantity471 * @return void472 */473 458 private static function set_item_price_from_financial_report($order, $order_item_id, $item, $quantity) 474 459 { 475 // استخراج قیمت محصول از financial_report476 460 $product_price = 0; 477 461 if (isset($item['financial_report']['report_items']) && is_array($item['financial_report']['report_items'])) { … … 484 468 } 485 469 486 // اگر قیمت پیدا شد، آن را تنظیم کن487 470 if ($product_price > 0) { 488 // تبدیل ارز اگر لازم بود489 471 $currency = get_woocommerce_currency(); 490 472 if ($currency === 'IRT') { … … 496 478 } 497 479 498 // گرفتن آیتم سفارش و تنظیم قیمت499 480 $order_item = $order->get_item($order_item_id); 500 481 if ($order_item) { -
sync-basalam/trunk/includes/Services/Products/AutoConnectProducts.php
r3426342 r3429516 11 11 class AutoConnectProducts 12 12 { 13 private $url;14 15 public function __construct()16 {17 $vendorId = syncBasalamSettings()->getSettings(SettingsConfig::VENDOR_ID);18 $this->url = "https://core.basalam.com/v3/vendors/$vendorId/products";19 }20 21 13 public function checkSameProduct($title = null, $page = 1) 22 14 { … … 25 17 if ($title) { 26 18 $title = mb_substr($title, 0, 120); 27 $syncBasalamProducts = $getProductData->getProductData($t his->url, $title);28 } else $syncBasalamProducts = $getProductData->getProductData( $this->url,null, $page);19 $syncBasalamProducts = $getProductData->getProductData($title); 20 } else $syncBasalamProducts = $getProductData->getProductData(null, $page); 29 21 30 22 if ($title) return $syncBasalamProducts['products']; -
sync-basalam/trunk/includes/Services/Products/CreateSingleProductService.php
r3426812 r3429516 81 81 $cleanAttributeName = str_replace('attribute_', '', $attributeName); 82 82 $value = $variation->get_attribute($cleanAttributeName); 83 84 $value = urldecode($value); 85 $value = trim($value); 86 $value = mb_strtolower($value, 'UTF-8'); 87 $value = str_replace(['ي', 'ك'], ['ی', 'ک'], $value); 88 $value = str_replace(['-', '_', '–', '—'], ' ', $value); 89 $value = preg_replace('/\s+/', ' ', $value); 90 83 91 if (!empty($value)) { 84 92 $attributeValues[] = $value; … … 98 106 if (!empty($variant['properties'])) { 99 107 foreach ($variant['properties'] as $property) { 100 $attributeValues[] = $property['value']['value']; 108 $val = trim($property['value']['title']); 109 $val = mb_strtolower($val, 'UTF-8'); 110 $val = str_replace(['ي', 'ك'], ['ی', 'ک'], $val); 111 $val = str_replace(['-', '_', '–', '—'], ' ', $val); 112 $val = preg_replace('/\s+/', ' ', $val); 113 if (!empty($val)) { 114 $attributeValues[] = $val; 115 } 101 116 } 102 117 } -
sync-basalam/trunk/includes/Services/Products/Discount/DiscountManager.php
r3426342 r3429516 15 15 $this->apiService = new ApiServiceManager(); 16 16 $vendorId = syncBasalamSettings()->getSettings(SettingsConfig::VENDOR_ID); 17 $this->url = "https:// core.basalam.com/v3/vendors/$vendorId/discounts";17 $this->url = "https://openapi.basalam.com/v1/vendors/$vendorId/discounts"; 18 18 } 19 19 -
sync-basalam/trunk/includes/Services/Products/FetchProductsData.php
r3426342 r3429516 4 4 5 5 use SyncBasalam\Services\ApiServiceManager; 6 use SyncBasalam\Admin\Settings\SettingsConfig; 6 7 7 8 defined('ABSPATH') || exit; … … 9 10 class FetchProductsData 10 11 { 11 public function getProductData($url, $title = null, $page = 1, $perPage = 100) 12 private $url; 13 public function __construct() 14 { 15 $vendorId = syncBasalamSettings()->getSettings(SettingsConfig::VENDOR_ID); 16 $this->url = "https://openapi.basalam.com/v1/vendors/$vendorId/products"; 17 } 18 19 public function getProductData($title = null, $page = 1, $perPage = 100) 12 20 { 13 21 if ($title) { 14 $ url .= '?title=' . $title;22 $this->url .= '?title=' . $title; 15 23 } else { 16 $ url .= '?page=' . $page;17 $ url .= '&per_page=' . $perPage;24 $this->url .= '?page=' . $page; 25 $this->url .= '&per_page=' . $perPage; 18 26 } 19 27 20 28 $apiservice = new ApiServiceManager(); 21 $response = $apiservice->sendGetRequest($ url);29 $response = $apiservice->sendGetRequest($this->url); 22 30 23 31 $products = []; -
sync-basalam/trunk/includes/Services/Products/FetchUnsyncProducts.php
r3426342 r3429516 10 10 { 11 11 private $getProductsService; 12 private $url; 13 12 14 13 public function __construct() 15 14 { 16 15 $this->getProductsService = new FetchProductsData(); 17 $vendorId = syncBasalamSettings()->getSettings(SettingsConfig::VENDOR_ID);18 $this->url = "https://core.basalam.com/v3/vendors/$vendorId/products";19 16 } 20 17 21 18 public function getUnsyncBasalamProducts($page) 22 19 { 23 $productData = $this->getProductsService->getProductData( $this->url,null, $page);20 $productData = $this->getProductsService->getProductData(null, $page); 24 21 25 22 if (empty($productData['products'])) return []; … … 38 35 } 39 36 40 if (empty($products)) { 41 return $this->getUnsyncBasalamProducts($page + 1); 42 } 37 if (empty($products)) return $this->getUnsyncBasalamProducts($page + 1); 43 38 44 39 return $products; -
sync-basalam/trunk/includes/Services/Products/GetCategoryAttr.php
r3426342 r3429516 10 10 public static function getAttr($categoryId) 11 11 { 12 $url = "https:// core.basalam.com/api_v2/category/$categoryId/attributes?exclude_multi_selects=true";12 $url = "https://openapi.basalam.com/v1/categories/$categoryId/attributes?exclude_multi_selects=true"; 13 13 $apiservice = new ApiServiceManager(); 14 14 $data = $apiservice->sendGetRequest($url, []); -
sync-basalam/trunk/includes/Services/Products/UpdateSingleProductService.php
r3426342 r3429516 17 17 public function updateProductInBasalam($productData, $productId) 18 18 { 19 20 19 if (!get_post_type($productId) === 'product') throw new \Exception('نوع post محصول نیست.'); 21 20 … … 26 25 $request = $this->apiservice->sendPatchRequest($url, $productData); 27 26 27 $body = $request['body'] ?? ''; 28 29 if (is_string($body)) $body = json_decode($body, true); 30 28 31 if ($request['status_code'] != 200) { 29 32 if ($request['status_code'] == 403) throw new \Exception("این محصول متعلق به غرفه فعلی نیست."); 30 31 $body = $request['body'] ?? '';32 33 if (is_string($body)) $body = json_decode($body, true);34 33 35 34 if (!is_array($body)) $body = []; … … 65 64 if ($product && $product->is_type('variable')) { 66 65 $variations = $product->get_children(); 67 68 if (isset($request['body']['variants'])) { 66 if (isset($body['variants'])) { 69 67 $wcVariations = []; 70 68 $attributes = $product->get_attributes(); … … 80 78 81 79 $value = urldecode($value); 82 $value = trim(mb_strtolower($value, 'UTF-8')); 80 $value = trim($value); 81 $value = mb_strtolower($value, 'UTF-8'); 83 82 $value = str_replace(['ي', 'ك'], ['ی', 'ک'], $value); 83 $value = str_replace(['-', '_', '–', '—'], ' ', $value); 84 $value = preg_replace('/\s+/', ' ', $value); 85 86 error_log('WC normalized value: ' . $value); 84 87 85 88 if (!empty($value)) { … … 96 99 97 100 $syncBasalamVariations = []; 98 foreach ($ request['body']['variants'] as $variant) {101 foreach ($body['variants'] as $variant) { 99 102 $attributeValues = []; 100 103 if (!empty($variant['properties'])) { 101 104 foreach ($variant['properties'] as $property) { 102 $val = trim(mb_strtolower($property['value']['value'], 'UTF-8')); 105 $val = $property['value']['title']; 106 107 $val = trim($val); 108 $val = mb_strtolower($val, 'UTF-8'); 103 109 $val = str_replace(['ي', 'ك'], ['ی', 'ک'], $val); 104 if (!empty($val)) { 105 $attributeValues[] = $val; 106 } 110 $val = str_replace(['-', '_', '–', '—'], ' ', $val); 111 $val = preg_replace('/\s+/', ' ', $val); 112 113 if (!empty($val)) $attributeValues[] = $val; 107 114 } 108 115 } -
sync-basalam/trunk/includes/Services/WebhookService.php
r3428129 r3429516 75 75 $header = ['Authorization' => 'Bearer ' . $this->basalamToken]; 76 76 77 $response = $this->apiService->sendGetRequest('https:// webhook.basalam.com/v1/webhooks', $header);77 $response = $this->apiService->sendGetRequest('https://openapi.basalam.com/v1/webhooks', $header); 78 78 79 79 if ($response && $response['status_code'] == 200) return $response['body']; … … 95 95 ]; 96 96 97 $response = $this->apiService->sendPostRequest('https:// webhook.basalam.com/v1/webhooks', $data, $header);97 $response = $this->apiService->sendPostRequest('https://openapi.basalam.com/v1/webhooks', $data, $header); 98 98 99 99 if ($response && $response['status_code'] == 200) return true; … … 113 113 ]; 114 114 115 $updateWebhookUrl = 'https:// webhook.basalam.com/v1/webhooks/' . $webhookId;115 $updateWebhookUrl = 'https://openapi.basalam.com/v1/webhooks/' . $webhookId; 116 116 117 117 $response = $this->apiService->sendPatchRequest($updateWebhookUrl, $data, $header); … … 123 123 private function removeCurrentWebhook($webhookId) 124 124 { 125 $deleteWebhookUrl = 'https:// webhook.basalam.com/v1/webhooks/' . $webhookId;125 $deleteWebhookUrl = 'https://openapi.basalam.com/v1/webhooks/' . $webhookId; 126 126 $header = ['Authorization' => 'Bearer ' . $this->basalamToken]; 127 127 -
sync-basalam/trunk/readme.txt
r3428129 r3429516 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.7. 37 Stable tag: 1.7.4 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
sync-basalam/trunk/sync-basalam.php
r3428129 r3429516 11 11 * Plugin Name: sync basalam | ووسلام 12 12 * Description: با استفاده از پلاگین ووسلام میتوایند تمامی محصولات ووکامرس را با یک کلیک به غرفه باسلامی خود اضافه کنید، همچنین تمامی سفارش باسلامی شما به سایت شما اضافه میگردد. 13 * Version: 1.7. 313 * Version: 1.7.4 14 14 * Author: Woosalam Dev 15 15 * Author URI: https://wp.hamsalam.ir/ … … 32 32 } 33 33 }); 34 35 Plugin::checkForceUpdateByVersion(); 36 37 if (get_option('sync_basalam_force_update')) { 38 add_action('admin_notices', function () { 39 $template = __DIR__ . '/templates/notifications/ForceUpdateAlert.php'; 40 require_once $template; 41 }); 42 return; 43 } 34 44 35 45 add_action('init', 'syncBasalamInit'); -
sync-basalam/trunk/templates/admin/Info.php
r3426342 r3429516 19 19 } 20 20 21 $api_url = "https:// core.basalam.com/v3/vendors/$syncBasalamVendorId";21 $api_url = "https://openapi.basalam.com/v1/vendors/$syncBasalamVendorId"; 22 22 $api_service = new ApiServiceManager(); 23 23 $response = $api_service->sendGetRequest($api_url, ['Authorization' => 'Bearer ' . $syncBasalamToken]); -
sync-basalam/trunk/templates/auth/Connected.php
r3426342 r3429516 7 7 global $wpdb; 8 8 9 $count_of_published_wooc amerce_products = wp_count_posts('product')->publish;9 $count_of_published_woocommerce_products = wp_count_posts('product')->publish; 10 10 $count_of_synced_basalam_products = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = 'sync_basalam_product_id'")); 11 11 -
sync-basalam/trunk/templates/products/Popups/EditProduct.php
r3426342 r3429516 16 16 17 17 18 18 19 19 <div class="basalam-bg-light-warning-margin basalam-p"> 20 20 <div class="basalam-display-flex-gap-20"> … … 44 44 45 45 <?php elseif ($quick_update_processing_job): ?> 46 <!-- Display when quick update job (sync_basalam_bulk_update_products) is running -->47 46 <div id="quick-update-in-progress" class="basalam-display-block-10"> 48 47 <div class="basalam-bg-warning-info-margin basalam-p"> -
sync-basalam/trunk/templates/products/sections/Status.php
r3426342 r3429516 9 9 <div class="basalam_status_data_container"> 10 10 <div class="basalam_status_data_item"> 11 <p class="basalam-p basalam-font-12 basalam-text-justify">محصولات منتشر شـده ووکامرس :</p> <?php echo '<p class="basalam_status_data_number basalam-p">' . esc_html($count_of_published_wooc amerce_products) . '</p>' ?>11 <p class="basalam-p basalam-font-12 basalam-text-justify">محصولات منتشر شـده ووکامرس :</p> <?php echo '<p class="basalam_status_data_number basalam-p">' . esc_html($count_of_published_woocommerce_products) . '</p>' ?> 12 12 </div> 13 13 <div class="basalam_status_data_item"> -
sync-basalam/trunk/vendor/autoload.php
r3426342 r3429516 15 15 } 16 16 } 17 throw new RuntimeException($err); 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 18 21 } 19 22 -
sync-basalam/trunk/vendor/composer/LICENSE
r3426342 r3429516 1 2 1 Copyright (c) Nils Adermann, Jordi Boggiano 3 2 … … 19 18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 19 THE SOFTWARE. 21 -
sync-basalam/trunk/vendor/composer/autoload_static.php
r3426342 r3429516 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'S' => 10 'S' => 11 11 array ( 12 12 'SyncBasalam\\' => 12, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'SyncBasalam\\' => 17 'SyncBasalam\\' => 18 18 array ( 19 19 0 => __DIR__ . '/../..' . '/includes',
Note: See TracChangeset
for help on using the changeset viewer.