Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3733599
How to use apply custom formula
Open

Comments

  • Focus Prints started the conversation

    Hi

    I purchased the WPC product options for woocommerce plugin. I need to create a custom formula where the customer enters the number of pages to print. The formula of the final price should be like 

    the price as per the selected attribute x the number of pages entered x the quantity selected. 

    Please can you guide me on how to create the custom variable and formula for the same. 

    Looking forward to hearing from you 


    Thanks in Advance

  •  1,281
    Dustin replied

    Hi Focus,

    You can use these characters in the custom formula: p, v, q:

    7219135033.png

    You can also use additional coefficients or other operations, for example:

    0.5 + p*v*q*0.2

    Best regards,
    Dustin

  • Focus Prints replied

    That worked like a charm. But one issue persists. Please check the attachment. Though the calculation happens correctly. The price of a single product also adds up. which is additional price. How to get that removed. It is theme specific? 

    Suppose the price to print a document as per the attributes selected is $0.1 and the number of pages to print is 25 and quantity or no. of copies required is 1. Then the price should be $0.1 * 25 *1.

    But an individual document printing cost is added up. How to remove that. 


    Thanks in advance


    Attached files:  WhatsApp Image 2024-09-27 at 5.45.40 PM.jpeg

  •  1,281
    Dustin replied

    We need to have the product price for calculation. If you want to remove it from the total, you can write it in the formula, for example:

    p*v*q - p*q

    or

    p*q*(v-1)

    Best regards,
    Dustin

  • Focus Prints replied

    Thank you. That worked.

    Is it possible that we take the value of v automatically based on the pdf file uploaded. Like, the formula will be price x quantity x no. of pages to be printed. Customer has to upload a pdf file. Is it possible that we take the number of pages in the pdf as the value?


    Looking forward to hearing from you

    Thanks in advance

  •  1,281
    Dustin replied

    We can't do that with our plugin since the PDF file was only uploaded when buyers added this product to the cart.

    Best regards,
    Dustin