Skip to main content
16 events
when toggle format what by license comment
Jan 21, 2020 at 8:43 review Suggested edits
Jan 21, 2020 at 11:37
May 13, 2019 at 20:19 vote accept Edward S Bernstein
May 11, 2019 at 5:17 comment added LoicTheAztec @fuxia humm… Then this tag should be removed from at least 90% of the questions that are tagged with it. This question and answer is about code and syntax that uses PHP everywhere, just like in most of the questions that are tagged PHP.
May 11, 2019 at 0:03 comment added fuxia @LoicTheAztecBecause this question isn't about PHP, it just happens to use it. As do 99% of all other questions here. The tag itself is useless anyway.
May 10, 2019 at 22:50 comment added LoicTheAztec @fuxia Please, why always removing the php tag when I add it as a related tag (as it is involved in this question/answer for real)? Some explanation please will be nice (thank you).
May 10, 2019 at 22:13 review Suggested edits
May 11, 2019 at 0:03
S May 10, 2019 at 21:36 history edited fuxia
Clarified the title, remove/added related tags
S May 10, 2019 at 21:36 history suggested LoicTheAztec CC BY-SA 4.0
Clarified the title, remove/added related tags
May 10, 2019 at 21:26 review Suggested edits
S May 10, 2019 at 21:36
May 10, 2019 at 21:19 answer added LoicTheAztec timeline score: 2
May 10, 2019 at 19:45 comment added Edward S Bernstein Yes! That's it. And I get the color added as a line item to the cart, but I haven't been able to find the right key to add that cost to the array I'm sending to the cart.
May 10, 2019 at 19:40 comment added LoicTheAztec So you are storing the color additional cost in a custom field… no more complicated that that. So you want to have this price to be added to the cart item subtotal and reflected in the totals…
May 10, 2019 at 19:31 comment added Edward S Bernstein I am trying to recreate the site without the plugins, so there are no plugins involved with this question. Other than the code shown, it is all vanilla woocommerce. The single product custom field in question is "avp-ral-paint-price", which is the integer dollar amount that adding paint of any color would cost. In the function "colors_before_add_to_cart_button()" I access it in the line: echo 'Standard Powder Coat: $'. get_post_meta(get_the_ID(), 'avp-ral-paint-price', true) .'.00<br>'; So somewhere I need to add this value as the cost of this line item into the cart.
May 10, 2019 at 18:05 comment added Edward S Bernstein Each product has a single price for any colors, which I'm storing in a custom field, avp-ral-paint-price. Most product option plugins (including "Extra Product Options" by Theme Complete, which I've been using) assume that product options will have a set price (or percentage) across all products. My products are aluminum roof vents & fans, and the color option is powder-coating. The price of the same set of colors is different because it depends on the size of the vent. Technically there are "premium" colors that cost twice the normal color, but I just need the one number for each product.
May 10, 2019 at 16:15 review First posts
May 10, 2019 at 16:47
May 10, 2019 at 16:11 history asked Edward S Bernstein CC BY-SA 4.0