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:

  1. ASIN input leta hai
  2. RapidAPI / Amazon API se product fetch karta hai
  3. Queue table me save karta hai
  4. OpenAI API se “Why We Love It” generate karta hai
  5. 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:

save ho rahe hain.


Current Product Queue Columns


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:

Store into:


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:


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:

  1. Loops
  2. Arrays
  3. Functions
  4. Classes
  5. OOP PHP
  6. WordPress Hooks
  7. AJAX
  8. REST API
  9. 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. ????

Leave a Reply

Your email address will not be published. Required fields are marked *