← back to Hollywood Price 2026

__pycache__/price_524.cpython-314.pyc

64 lines

+
�SjX�
� �Rt^RIt^RIt^RIt^RIt^RIt^RIt]PP^R4^RI	H
t
Rt]PPRR4t
RR/RR0R	R1R
R2/tRtRtR
tRtRtRtRtR3Rlt]R8XEd]!]P2!]!]444t]!4tR]P:9d�]!]P:]P:P?R4^,,4t ]Uu.uFp]!!VR,4]9gKVNK	upR] t"]#!R]$!]"4R24]"FBt%]#!R]%R,R,R]%R,R]%R,R24]#!R ]!]%R!R"74KD	]PL!^4]Uu.uFp]!!VR,4]9gKVNK	upt"]#!R#]$!]"4R$]$!]4R%24^;t';t(t)]*!]"4F�wt+t%]!]%4t,],R&8Xd]'^,
t'M*],P[R'4'd])^,
t)M	](^,
t(]+^,^,^8Xd%]#!R(]+^,R)]$!]"4R*]'R+](R,])2
4]P\!R-4K�	]#!R.]'R+](R,])24R#R#uupiuupi)4a%Price Hollywood/Momentum sample-only products (Steve-approved 2026-07-12).
Per plan.csv row: rename option Title->Size, keep $4.25 Sample, ADD one sellable
variant "Sold Per {Box|Yard|Panel|Square Yard}" priced at feed `hw` (Hollywood
retail = list x 1.448), inventoryPolicy CONTINUE, tracked, qty min/step=1; strip
Needs-Price tag. Idempotent (ledger + live pre-check). $0 (Admin API free).

Usage:  python3 price_524.py --canary N  # price first N, verbose, then STOP
        python3 price_524.py --batch      # price the rest (skips ledger-done)
N�lib)�gqlzplan_price_final.csv�ledgerzpriced_524.csv�YD�PANEL�BOX�SYz�query($id:ID!){ product(id:$id){ id legacyResourceId title status handle tags
  options{ id name position values }
  variants(first:30){ edges{ node{ id title sku price selectedOptions{name value} } } } } }z�mutation($pid:ID!,$oid:ID!,$name:String!){
  productOptionUpdate(productId:$pid, option:{id:$oid, name:$name}){ userErrors{ field message } } }z�mutation($pid:ID!,$variants:[ProductVariantsBulkInput!]!){
  productVariantsBulkCreate(productId:$pid, variants:$variants){
    userErrors{ field message }
    productVariants{ id title sku price inventoryPolicy selectedOptions{name value} } } }zdmutation($mf:[MetafieldsSetInput!]!){ metafieldsSet(metafields:$mf){ userErrors{ field message } } }z]mutation($id:ID!,$tags:[String!]!){ tagsRemove(id:$id, tags:$tags){ userErrors{ message } } }c��\PP\4;'d'\PP	\4^8�'*p\\RRR7;_uu_4p\P!V4pV'dVP.RO4VPV4RRR4R# +'giR#;i)��a�)�newlineN)�ts�
product_id�dw_sku�uom�hw�sellable_sku�
variant_id�status)	�os�path�exists�LEDGER�getsize�open�csv�writer�writerow)�row�new�f�ws&   �price_524.py�logr$+sy���w�w�~�~�f�%�E�E�"�'�'�/�/�&�*A�A�*E�
F�C�	
�f�c�2�	&�	&�!��J�J�q�M���
�J�J�j�k�	�
�
�3��	
'�	&�	&�	&�s
�1AB>�>C	c�t�\4p\PP\4'd�\
P!\\44F]pVPRR4PR4'gK,VPR4'gKEVPVR,4K_	V#)rr�OKr)�setrrrrr�
DictReaderr�get�
startswith�add)�s�rs  r#�seenr.4st����A�	�w�w�~�~�f�������V��-�A��u�u�X�r�"�-�-�d�3�3����l�8K�8K����a��o�&�.�
�H�c���\PP4PRR7p\VR,4q0P	RR4q@R,p\\
VR,4^4p\P	T4pT'g\Y#YETRRRT2.4RT2#Twr�\\R	TR
,/4R,p
T
'g\Y#YETRRR.4R#T
R	,pR
pT
R,R,FWp
T
R,q�R,;'gRpTR,R8wgK.TP4PR4'dKUTpM	T'd�\\
TR,4T,
4R8pT'd6\\R	TRR./4\Y#YEYlR,TR	,R.4R#\Y#YEYlR,TR	,RTR,RT2.4R#TR,RT	2pT
R ,^,pTR!,R"8wdk\\ R#TR$TR	,R!R"/4pTR%,R&,pT'd6\Y#YETTRR'\"P$!T4R(,,.4R)#\\&R#TRRTR*
R+R,R"R!T/.R-R.R/RTR0R1//./4pTR2,pTR&,'d=\Y#YETTRR3\"P$!TR&,4R4,,.4R5#TR6,^,R	,p\\(R7R8TR9R:R;R<R=R>R?R@/R8TR9R:R;RAR=R>R?R@/./4\\R	TRR./4\Y#YETTTRB.4T'd:\+\"P$!R#TRT
R,RCTRDTRTR*
RTRET/^RRF74RB# \d%\Y#YETP	R4RRR.4R#i;i \dRpELfi;i)G�seconds)�timespecr�mom_patternr�unitrzSKIP:bad-hwz
SKIP:bad-uom:�id�gid�productzSKIP:not-foundN�variants�edges�node�sku�title�Samplez-sample�priceg�?F�tagszNeeds-PricezOK:tag-strippedzFLAG:price-mismatch:�vszFLAG:price-mismatch�sku_base�-�options�name�Size�pid�oid�productOptionUpdate�
userErrorszFAIL:opt-rename::N�xNzFAIL:opt-renamez.2f�optionValues�
optionName�inventoryPolicy�CONTINUE�
inventoryItem�trackedT�productVariantsBulkCreatezFAIL:var-create::N�NzFAIL:var-create�productVariants�mf�ownerId�	namespace�global�key�v_prods_quantity_order_min�type�single_line_text_field�value�1�v_prods_quantity_order_unitsr&rrr)�indent�ensure_ascii)�datetime�now�	isoformat�strr)�round�float�	Exceptionr$�UNITr�Q_PROD�lower�endswith�abs�M_TAGSRM�M_OPT_RENAME�json�dumps�M_VAR_CREATE�M_MF_SET�print)r-�verboserrF�dwrr�lbl�label�suffixr:r6�existing�e�n2�sk�samer�opt�d�ue�res�vids&&                     r#�processr�=sA��	�	�	�	�	�	 �	*�	*�I�	*�	>�B�

�a��o�
�C�U�U�=�"�%=��v�Y�s�Z�
�5��4��>�1�
%���(�(�3�-�C���R�b�r�2�r�]�3�%�+@�A�B�]�[^�Z_�K`�D`��M�E��v��a��h�'�(��3�D���R�b�r�2�r�+;�<�=�FV�
�t�*�C��H�
�*�
�g�
&�
&��
�v�Y���i�o�o�2��
�g�;�(�"�2�8�8�:�+>�+>�y�+I�+I��H�5�'��	��u�X�g�.�/�"�4�5��;�D����4��f�}�o�>�?���"�2������HY�Z�[�du��R�b�r�E�?�H�T�N�FZ�[c�dk�[l�Zm�mo�pr�os�Dt�u�v�@U��
�m�_�A�f�X�.�L��y�/�!�
�C�
�6�{�f����u�c�5�#�d�)�V�V�L�M��
�$�
%�l�
3��
���"�2�|�R�9K�d�j�j�Y[�n�]a�Nb�9b�c�d�m~�	�L�5�#�z��B�s�8��,����>�?��:��%��y�$�?�	5�4��		�A��'�
(�C�
�<����R�b�r�<��5G�$�*�*�UX�Ye�Uf�Jg�hl�Jm�5m�n�o�yJ�

��
 ��
#�D�
)�C���4�	�C��h��7S�U[�]u�w~�AD�	E�	�C��h��7U�W]�_w�zA�CF�	G����
��4��f�}�o�6�7���"�2�|�S�$�7�8��
�d�j�j�%��g�t�G�}�h��(�,��B�s�8�f�V[�&��-�56�U�L�	M���}�Z��R�b�q�u�u�T�{�B��M�B�C�M�Z��*�	��D�	�s$�N4�+%O&�4+O#�"O#�&
O7�6O7�__main__z--canaryrz=== CANARY: pricing z ===z
--- r<:N�2Nz (r4z @ $rz) ---zRESULT:T)rtz=== BATCH: z to price (z already done) ===r&�FAILz  ...�/z ok=z skip=z fail=g333333�?zBATCH DONE: ok=)z
Sold Per Yard�Yard)zSold Per Panel�Panel)zSold Per Box�Box)zSold Per Square Yard�SqYard)F)/�__doc__�sysrrro�timerar�insert�shopifyr�CSV�joinrrhrirnrqrrrmr$r.r��__name__�listr(r�rows�done�argv�int�index�nrd�todors�lenr-�exit�okr|�fl�	enumerate�i�str*�sleep)r-s0r#�<module>r�s�����	�
����������5�����	�����h� 0�	1��	�
#��
(�	�"��
,�	��
_��h��]��v��n���
�C�L�z������t�C�y�)�*�D��6�D��S�X�X�����������
�3�a�7�8�9���D�4�a�3�q���#7�t�#C���4�D�R�a�H��
�$�S��Y�K�t�4�5��A��F�1�W�:�c�?�+�2�a��i�[��Q�t�W�I�U�K�L��)�W�Q��5�6��	������@�t�!�s�1�\�?�3�4�?�A�A�t�@�D�	�K��D�	�{�+�c�$�i�[�8J�
K�L���B���b��$����1�
�Q�Z��
��:�r�Q�w�r�
�]�]�6�
"�
"�B�!�G�B��A�g�b�
��E�R�<�1���E�!�A�#��a��D�	�{�$�r�d�&���F�2�$�G�H��
�
�4�� �
�O�B�4�v�b�T���t�
4�5�-��
E��As�5J�J�J�'J