Jahanziab bhai, yeh summary copy kar lo aur dusre account me paste kar dena. Is se main exact context samajh jaunga.
PROJECT SUMMARY
Plugin Name
Amazon Product Fetch
Goal
WordPress plugin jo:
- ASIN input leta hai
- RapidAPI / Amazon API se product fetch karta hai
- Queue table me save karta hai
- OpenAI API se “Why We Love It” generate karta hai
- End me products ko WordPress post type me upload karega
CURRENT STATUS
APIs Connected
RapidAPI
Connected and working
OpenAI API
Connected and generating Why We Love It points
Example:
WBP1
WBP2
WBP3
successfully generate ho rahe hain.
Queue System Working
ASIN enter karne par product queue me add ho raha hai.
Data database me save ho raha hai.
Example fields:
- asin
- product_title
- featured_image
- image_1
- image_2
- image_3
- image_4
- bp1
- bp2
- bp3
- bp4
- bp5
- bp6
- rating
- price
- brand_name
- wbp1
- wbp2
- wbp3
save ho rahe hain.
Current Product Queue Columns
- ASIN
- Image
- Product Title
- Price
- Rating
- Brand
- Why We Love It
- Position
- Badge
- Status
Why We Love It Prompt
Using OpenAI API.
Prompt:
You are my Product Microcopy Writer.
Write “Why we love it” reasons for each product.
Rules:
- Exactly 3 reasons
- 8–15 words
- Benefits not features
- No fluff
- No repetition
- Plain English grade 3
- No icons
- No explanations
- No dashes
- No colons
Store into:
- wbp1
- wbp2
- wbp3
DATA MAPPING NOW WORKING
Example successful response:
featured_image
image_1
image_2
image_3
image_4
bp1
bp2
bp3
bp4
bp5
bp6
brand_name
rating
price
all coming correctly.
CURRENT BUGS
Bug #1
Featured Image and Image 1 are same.
Current:
featured_image = image[0]
image_1 = image[0]
Required:
featured_image = image[0]
image_1 = image[1]
image_2 = image[2]
image_3 = image[3]
image_4 = image[4]
Bug #2
Delete button not working properly.
Current:
Delete click karne ke baad row turant remove nahi hoti.
2 refresh ke baad delete hoti hai.
Required:
- AJAX delete
- Instant database delete
- Instant row removal
- Success message
- No refresh required
Upload To Post
Abhi upload functionality complete nahi hai.
Current popup:
“Product post type not found”
because current test website me required post type exist nahi karta.
Before Final Upload
Claude ko instruction diya gaya:
Upload button temporarily post create na kare.
Instead:
Preview / Debug Screen khole.
Preview Screen Requirements
Show all fields:
ASIN
Product Title
Available Store
Affiliate URL
Featured Image
Image 1
Image 2
Image 3
Image 4
Quantity Sold
Main Highlights
BP1
BP2
BP3
BP4
BP5
BP6
Why We Love It
WBP1
WBP2
WBP3
Product Badge
Position
Rating
Price
Brand Name
Debug Section
Bottom par:
Raw Database JSON
show karna hai.
Example:
{
“asin”: “…”,
“product_title”: “…”,
…
}
Purpose:
Verify field mapping before final uploader.
Final Goal
Queue Product
↓
Fetch Amazon Data
↓
Generate Why We Love It using OpenAI
↓
Edit Queue Item
↓
Upload to WordPress Product Post Type
↓
Create Post + Meta Fields + Images
PHP Learning Progress
Learned:
Variables
Example:
$name = "Bobziee";
If Else
if($price >= 300){
echo "expensive";
}else{
echo "cheap";
}
AND Operator
if($provider == "amazon" && $amazon_connected == true)
OR Operator
if($is_admin || $is_editor)
Currently starting:
Loops
Next topics:
- Loops
- Arrays
- Functions
- Classes
- OOP PHP
- WordPress Hooks
- AJAX
- REST API
- Plugin Development
Main Objective
User wants to eventually publish this plugin on WordPress.org and potentially monetize a premium version later.
Is summary ko save kar lo. Dusre account me paste karoge to main isi point se continue kar sakunga. ????