Support » Plugin: Olevmedia Shortcodes » Add products from pricing table to the shopping cart

  • Hi there,

    I installed your “Olevmedia Shortcodes” on a couple of my sites and LOVE it. The only problem is that when I edit the pricing table function, how can I link “add to cart” button to the shopping cart? As for now, I use Woocommerce, so, when users click on “add to cart” (at pricing grid), it links to the single product page –> the user has to add it to the shopping cart again.

    I’m using your pricing table for virtual products, which I prefer users can;
    1. See details and prices at your pricing table
    2. Click “add to cart” that adds items to the shopping cart
    3. Then go to “Shopping cart” to pay “ALL” items purchased at one time.

Viewing 1 replies (of 1 total)
  • ok… now i had the same problem and after 5 h loking for a solution i finaly got it and is the most simple one.
    1. Go to Add product in woocommerce and add a product with the title and price just like in your pricing table (ex: Title: Business pack, Price: 200Euro) and save it as a product with password.

    2. Go to wp-content/plugins/woocommerce/includes/wc-cart-functions.php
    and search for “function wc_protected_product_add_to_cart”. Replace:
    if ( post_password_required( $product_id ) ) {
    $passed = false;
    if ( post_password_required( $product_id ) ) {
    $passed = true;
    comment out the eror “wc_add_notice( __( ‘This product is protected and cannot be purchased.’, ‘woocommerce’ ), ‘error’ );”

    3. Now go as admin to that product and right click on the “add to cart” button and copy the url. Must be something like this : (1677 is the product ID)
    and paste it to the pricing table button in link=”.

    Now logout and go to that pricing table and press the button. 😀

    This works for me 😀 The product with the same title as the pricing table is hidden from product page but can be added to cart and payed for 😀

Viewing 1 replies (of 1 total)
  • The topic ‘Add products from pricing table to the shopping cart’ is closed to new replies.