• shadynicnack

    (@shadynicnack)


    I currently have woocommerce. What I am trying to do is add another quantity which will be years on the shopping loop page. I Currently have the Product Name, Cost, Product Quantity and Add to Cart already on there. Then when someone add to cart the calculation will be the product cost times quantity and then take the sum times years. I just wanted to add a second quantity which will be number of years. How will I do that?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Thread Starter shadynicnack

    (@shadynicnack)

    I want two quantites on the same row if I can with a text box of about 4. One quantity textbox is the actual quantity of the item, and the second quantity is the number of years. And below will be the add to cart.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I don’t know what you mean by ‘number of years’ and where you want it shown exactly. Show screenshots.

    Thread Starter shadynicnack

    (@shadynicnack)

    Kinda look like this…

    <img src=”https://camo.githubusercontent.com/231a9e58bdb59c46dfb3de21e6740e2f9ba38808/687474703a2f2f662e636c2e6c792f6974656d732f31683235335a31653262315a3232304f325831792f4272616b655f7061645f5f5f57435f4445562e706e67&#8243; />

    But one textbox will be “Quantity” and the other is “Number of Years”.

    Like before I need to take the “product cost” times the “quantity”. Then what ever is the sum is I need to have it times the “number of years”. Then I will get my total cost.

    Thread Starter shadynicnack

    (@shadynicnack)

    Here is an image link…

    Wanted it on the shopping loop page where it will show Quantity, Years and Add To Cart

    Plugin Support RK a11n

    (@riaanknoetze)

    Hi shadynicnack,

    Best would be to calculate those by using a 3rd party form like Gravity Forms and WooCommerce. More information on how to do that at https://www.woothemes.com/products/gravity-forms-add-ons/ and https://docs.woothemes.com/document/woocommerce-gravity-forms-product-addons/

    Thread Starter shadynicnack

    (@shadynicnack)

    I don’t have that much money and hate to ask, but… Is there any other free options? Or coding? Or is there a way of taking the subtotal of the cart times number of years?

    Plugin Support RK a11n

    (@riaanknoetze)

    That’d actually be the cheapest option methinks; To do that with coding would require more code than can be dealt with here and you would need to get in touch with a web developer…

    Thread Starter shadynicnack

    (@shadynicnack)

    It looks like I probably have to go in the code. Any good place to start? lol

    Thread Starter shadynicnack

    (@shadynicnack)

    Ok got to ask…. what is the different between Product Add-Ons and Gravity Forms Product Add-Ons? Can Product Add-Ons perform two quantities?

    Thread Starter shadynicnack

    (@shadynicnack)

    Another question… I have adjust my product setting. Since all my products needs number of years to calculate instead of quantity for its total cost. I have changed the quantity text to years. So it looks sort of like this…

    Add To Cart Button
    _1_ Years

    Now here is the first question…

    We only have two products that need a quantity. How would I apply a quantity box just to those two products along with years and add to cart on the shopping page?

    Add To Cart Button
    _1_ Years _1_ Quantity

    Example:
    <img src=”https://camo.githubusercontent.com/231a9e58bdb59c46dfb3de21e6740e2f9ba38808/687474703a2f2f662e636c2e6c792f6974656d732f31683235335a31653262315a3232304f325831792f4272616b655f7061645f5f5f57435f4445562e706e67&#8243; />

    If I were to do it code, is it possible to copy the quantity code and replace the variables?

    Second question is…
    Is it possible to add a quantity in a attribute and maybe get close to that same effect? Just a thought but I can put in product call Network (with one workstation) with one cost. Then add in addtributes with adding additonial workstations at a different cost, but I need to make something where it shows how many workstations and years they want the service. Could attribute be another way to go?

    Plugin Support RK a11n

    (@riaanknoetze)

    what is the different between Product Add-Ons and Gravity Forms Product Add-Ons?

    Main difference is that with Product Add-ons you can’t do any calculations afaik. Whereas with Gravity you’re able to say “this field times that field plus this random other field”.

    If I were to do it code, is it possible to copy the quantity code and replace the variables?

    You would need to add conditionals in the code of when to use years and when to use regular quantity. The easiest would be to set those conditionals on a per category basis, although that’s up to you.

    Could attribute be another way to go?

    Don’t think that’ll work. It’d be the same as asking someone to set quantity / years on the the tags (bad example, but it works) of a blog post – meaning that’s not what they were designed for ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Woocommerce Adding Another Quantity’ is closed to new replies.