{{-- TASK BADGES — like old Central's green/orange header badges --}} @include('filament.partials.task-badges') {{-- QUEUE STATUS — full width --}} @php $qs = $this->queueStatus; @endphp @if($qs['pending'] > 0 || $qs['processing'] > 0 || $qs['fpi_files'] > 0)

QUEUE STATUS

@if($qs['fpi_files'] > 0)

Import queue {{ $qs['fpi_files'] }} files with {{ number_format($qs['fpi_items']) }} items (including processing now files)

@endif @if($qs['pending'] > 0)

{{ $qs['pending'] }} task(s) waiting in queue

@endif @if($qs['processing'] > 0)

{{ $qs['processing'] }} task(s) currently processing

@endif
@endif {{-- MAIN 2-COLUMN LAYOUT — Left: Forms, Right: Help --}}
{{-- ============ LEFT COLUMN: ALL FORMS ============ --}}
{{-- PRICE UPLOAD --}}

Price Upload

Upload limits: {{ ini_get('upload_max_filesize') }}/{{ ini_get('post_max_size') }}

Uploading...
{{-- IMPORT SUPPLIER PARTS DATA --}}

Import Supplier Parts Data

Add $9 to each imported PBI product (due to their $9 per-item handling fee). We are adding the $9 here instead of on "UPDATE PRODUCT STOCKS & PRICES" so as to not throw off B2B pricing - which as of now only strictly takes prices from parts_suppliers and doesnt add additional handling charges to them.

Add $15 to each imported DEPO-CA, DEPO-IL & DEPO-NJ product (due to their $15 per-order handling fee)

price = multiplier × price from csv.

@if(!empty($importResult))

Import Result

@if(isset($importResult['error']))

{{ $importResult['error'] }}

@else

Supplier: {{ $importResult['supplier'] ?? '' }} • Time: {{ $importResult['timestamp'] ?? '' }}

@if(isset($importResult['output']))
{{ $importResult['output'] }}
@endif @endif
@endif
{{-- UPDATE PRODUCTS --}}

Update Products

price = multiplier × supplier_price_from_db

{{-- UPDATE PRODUCT STOCKS & PRICES --}}

Update Product Stocks & Prices

Detect markup by rules:

If price < 50 , then (markup) = 1.45

If 50 <= price < 100 , then (markup) = 1.40

If price >= 100 , then (markup) = 1.35


final_price = (price + s/h cost) * markup; (markup is not applied to usauto smartpost handling charges);

If part has shipping / handling columns - s/h cost calculated from them, ELSE IF supplier IS NOT USAUTO then use product.average_shipping (if not set, then use it value as 10) + 2 ($2 added to cover cost of fulfillment)

Also for calculating use only in_stock items with price > 0

After all of that get cheapest from all parts, and

product price = round(final_price - 10) + 0.95; - for all categories

If the Cheapest price is > 100, then we deduct $15.

If the cheapest price is > 50 and < 100 we deduct $12


For products with skus beginning "BC0001-|B00001" make (final price * 1.15); (BUT DO NOT APPLY THIS ON KITS/SETS)

For products with skus beginning "RS0001-|H00001" make (final price * 1.65) + 0.95; (raise all radiator support and hoods prices by 65% - BUT DO NOT APPLY THIS ON KITS/SETS)

For products with skus beginning "ARC001" make (final price * 1.45);

For products with skus beginning "CAM001" make (final price * 1.25);

For products with skus beginning "ARB004" make (final price * 1.20);

For products with skus beginning "ARG003" make (final price * 1.12);

For products with skus beginning "HL0001-|TEC001" make (final price * 1.10);

For products with skus beginning "FT0002-|BB0001-|V00001" make (final price * 1.05);

For products with skus beginning "F00001-" make (final price * 1.05) + 0.95; (raise all fender prices by 5%)

For products with partslink beginning "KIT-" and "SET-" make (final price * 1.10) + 0.95; (raise all KIT and SET prices by 10%)


Add 2% to DEPO-EC, DEPO-WC supplier prices

Add 2% to USAVA, USAIL, USANV, USATX, USACH, USAFL supplier prices

Subtract $3 from PBI, PVI-VA, PBI-TX (to counteract our markup on their $9 drop-ship fee which we build into their price

Set minimum product price to $4.95

ADD 8% TO ALL PRODUCT PRICES


Discount by 15% the products which have num sold < 1 (more than 180 days) in table goparts.non_selling_items AND have qty > 0 in stock (partscan_inventory).

Discount by 30% the products which have num sold < 1 (more than 365 days) in table goparts.non_selling_items AND have qty > 0 in stock (partscan_inventory).

Discount by 50% the products which have num sold < 1 (more than 730 days) in table goparts.non_selling_items AND have qty > 0 in stock (partscan_inventory).


Add custom % markups to product price based on values inserted in table 'product_markup_increase'

For products with skus beginning "ET0001-"|"TL0001-"|"ARC001-" always set stock = 0

Comma separated category codes like ARN001, ARM001
Leave empty to use all

{{-- UPDATE PRODUCTS AVERAGE SHIPPING --}}

Update Products Average Shipping

{{-- ============ RIGHT COLUMN: HELP ============ --}}

Help

Upload file is simple csv file with heading row, in which column names must present
csv column separator is , (comma)

Allowed column list

supplier_partnumber - unique required column, by which we identify needed row.

If supplier uses brand in its partname, then brand would be identified by brand column or by partnumber with code

@foreach(['brand','dpi','partslink','oem','barcode','description','notes','price','shipping','handling','qty','in_stock','weight','width','length','height'] as $col) {{ $col }} @endforeach
{{-- CSV Examples --}}

Motovicity example:

Brand,supplier_partnumber,price
ACL,6B2640H-STD,"$63,95 "
ACL,4B1972H-STD,"$48,34 "

Turn14 example:

"Brand","supplier_partnumber","price","qty"
"Eibach","5.69450K","154.94","Out of Stock"
"Eibach","2572.14","201.02",2
"Eibach","2053.312","177.98",4

TYC example:

supplier_partnumber,description,partslink,oem,price,dpi
20-5646-01,98-01 AC INTGR H.L LH,AC2502104,33151-ST7-A03," $166,90 "
20-6904-01,06-08 AC T.S.X H.L LH,AC2502112,33151-SEC-A62," $141,45 "

DEPO-EC example:

supplier_partnumber,Description,oem,partslink,DPI,price,qty,weight,...
317-58001-000,AC CL 2.2/2.3/3.0 97-99/INTEGRA 94-01/HD CIVIC 92-00/...
327-58001-000,AC LEGEND 91-95 BLOWER MOTOR ASSY,79310SP003,AC312610...
{{-- OLD DESCRIPTION PART --}}

OLD DESCRIPTION PART:

Required columns ID (in it can be DPI or Part #)

Will search this value in parts table on columns dpi_number or partslink_number (Later will get it from uid field which would be unique field for both)
All other columns are optional

Additional columns can be processed:

Price
If exists, then would be processed with multiplier
Updates: products table, parts_suppliers table, magento attribute price
Qty
Would be converted to number - if > 0 then product is in stock
Updates: products table, magento stock availability
PBI
Would be processed to determine if KOYO or not radiator is
Rule: if PBI has "K" in it, then this is KOYO, else not
If field doesn't exists then all products would be processed as NOT KOYO
Description
Would be processed only on parts_suppliers table update (if price column also exists)
Updates: parts_suppliers table

All other columns would be ignored

{{-- Example CSV files --}}

Example of csv files:

"PBI","ID","Description","Price","OEM","Receiver Dryer"
"PR0170A",170,"86-88 SUZ SAURAI A/T 4CY 1.3L RADIATOR (TO VIN J42356..."
"PR0171K",171,"1/86-92 SUPRA WO-TBO 1/87-89 W/TBO /T 6CY 3.0L PT/BC..."

Spyder example:

ID,Description,Price,QTY
ALT-YD-AA402-BK,( Spyder ) Audi A4 02-05 Euro Style Tail Lights - B...
ALT-YD-AA402-LED-BK,( Spyder ) Audi A4 02-05 LED Tail Lights - Black...

Spec-D example - stock only:

ID,Description,qty
2LB-C1088CLED-KS,88-98 CHEVY C10 LED BUMPER LIGHT - CLEAR,OUT OF STOCK
2LB-C1088GLED-KS,88-98 CHEVY C10 LED BUMPER LIGHT - SMOKE,OUT OF STOCK
{{-- Task cards are now in the header badges (topbar) — click the list icon to see them --}} {{-- Uploaded Files Table — full width --}}

Uploaded Files ({{ count($uploadedFiles) }})

@if(count($uploadedFiles) > 0) @foreach($uploadedFiles as $file) @endforeach
Supplier File Size Date
{{ $file['supplier'] }} {{ $file['original'] }} {{ $file['size'] }} {{ $file['modified'] }}
@else
No files uploaded yet
@endif