Forum Replies Created

Viewing 1 replies (of 1 total)
  • I am having the same problem with my gravity forms. Can you tell me where to put the above code that you said would work:

    public function gravityFormToCart($entry) {
    if(SIMPLEECOMMCART_PRO) {
    $formId = SimpleEcommCartGravityReader::getGravityFormIdForEntry($entry[‘id’]);
    if($formId) {
    $productId = SimpleEcommCartProduct::getProductIdByGravityFormId($formId);
    if($productId > 0) {
    $product = new SimpleEcommCartProduct($productId);
    $qty = $product->gravityCheckForEntryQuantity($entry);
    $options = $product->gravityGetVariationPrices($entry);
    SimpleEcommCartSession::get(‘SimpleEcommCartCart’)->addItem($productId, $qty, $options, $entry[‘id’]);
    $cartPage = get_page_by_path(‘store/cart’);
    $cartPageLink = get_permalink($cartPage->ID);
    SimpleEcommCartSession::set(‘SimpleEcommCartLastPage’, $_SERVER[‘HTTP_REFERER’]);
    wp_redirect($cartPageLink);
    exit;
    }
    }
    }
    }

    Thank you,

    DHailey

Viewing 1 replies (of 1 total)