addtocart – Add to cart functionality is not working for any product

my add to cart not working, its showing nothing in cart for 2 stores and for 1 store adding a default product everytime, doesn’t matter which product we added,
its showing this exception….

We can’t add above item to cart.Please contact administratorThe product wasn’t found. Verify the product and try again.

i have checked my code is fine, its working on local setup and dev server, just issue is on production,

i have tried with cookie lifetime increase and permission settings on directories but none worked..
do it need some more cookie or session changes which can be done ?

can any body share any idea or solution with some details ??

magento2.3 – Zero cart price Issue in ADD TO CART rest API

We have been using below REST URL to get the cart data-
rest/V1/carts/mine/items (passing customer token in each call )
Whenever first item is added to the cart, we always get product price – 0, as soon another item is added to the cart, price for first item started coming properly using the same API –

magento 1.7 – Setting shipping programmatically when product is added to cart?

Magento 1.7

This is the code which gets called via the checkout_cart_product_add_after event when I add a product to the cart:

function addProductComplete(Varien_Event_Observer $observer) {

        $onepage = Mage::getSingleton('checkout/type_onepage');

        // Add address to cart
        $address = $onepage->getQuote()->getShippingAddress();

        if (null == $address->getCountryId())
            $country = Mage::helper('core')->getDefaultCountry(); // use default country
            if ( '' == $country )
                $country = 'DE';

        if ( null == $address->getPostcode() )

        // save settings


When I add the first product, nothing happens, only after adding the second product, it works. I guess thats because the first time there is no quote object? How to solve that so it works with the first product as well?

magento 1.9 – how can i show the textbox value entered on product page to checkout and cart page

In Magento 1 On product page when someone enters the description I wanted to show the same description on cart page and checkout page how can I do that

Values getting in parms
In post request on
In addAction I am getting the text box value and have passed to cart as parameters

$cart   = $this->_getCart();
        $params = $this->getRequest()->getParams();
        try {
            if (isset($params('qty'))) {
                $filter = new Zend_Filter_LocalizedToNormalized(
                    array('locale' => Mage::app()->getLocale()->getLocaleCode())
                $params('qty') = $filter->filter($params('qty'));

            $product = $this->_initProduct();
            $related = $this->getRequest()->getParam('related_product');

             * Check product availability
            if (!$product) {

            $cart->addProduct($product, $params);

How can I access the textbox value on the cart page
thanks in advance

views – Drupal7 Commerce – Multiple Custom Line Items with single add to cart button

I am working on a system that pulls in available dates and booking references from a third party API – we then need to add these pieces of extra information to a line_item that is added to cart.

I have the custom line item setup by way of


What I would really like to see now is several products (Adult, Child, Concession) – all being available within one form – and a single add to bag button. With the caveat of needing to submit the custom line_item attributes at the same time (these values will be copied over using Javascript after being selected in the UI).

I have made use of commerce_add_to_cart_extras – which provides a view of the products – with a single add to bag – but no notion of being able to add the line_item attributes to the form. Indeed – I’m not even sure that the form processing of this module caters for custom line_item – even if my form_alter code managed to get the syntax of the extra fields correct:

$form_state('rebuild') = TRUE;
        $form('line_item_fields')('#tree') = TRUE;
        foreach(element_children($form('add_to_cart_quantity')) as $key) {
          //  echo ("here: ".print_r($form('add_to_cart_quantity')($key)));                                    
                '#product_id' => $form('add_to_cart_quantity')($key)('#product_id'),
                '#tree' => TRUE

Has anybody got a solution to how this can be done? We only have one product type – and one custom line item type to consider – and they have a 1:1 mapping.

Hope someone can help here!

How to remove view cart in wordpress

I tried to code the

.car-link a(title=”Cart”) { display: none; }

in theme editor in WordPress. Because I couldn’t access the “customize” in wordpress, it says

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 27750400 bytes) in /raid/vhost/ on line 4339.

So I used theme editor, i tried inspector and writing { display:none} but it wasn’t working.

Here is the website. http:// parts . com . ph


Add free product to cart on orders over 999 / – in magento 2

I want to add 1 free product on orders over 999 / – and 2 same product on orders above 1499 / – in Magento 2.
Please help.

ajax – Woocommerce Cart Category limit

I’m using the following code to limit products from one category in the cart.

add_filter( 'woocommerce_add_to_cart_validation', 'only_one_product_category_allowed', 20, 3 );
function only_one_product_category_allowed( $passed, $product_id, $quantity) {

    $term_slugs   = wp_get_post_terms( $product_id, 'product_cat', array('fields' => 'slugs') );

    foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item ){

        if( ! has_term( $term_slugs, 'product_cat', $cart_item('product_id') ) ){

            wc_add_notice( __('Only goods from ONE category allowed in cart'), 'error' );
            echo "<script type='text/javascript'>alert('Only goods from ONE category allowed in cart');</script>";

            return false;
    return $passed;

Could someone please let me know how I can change the number of categories allowed in the cart at once instead of just one? And I’d like to know how the error message can be shown using ajax. The current error message only shows when the page is refreshed.

Any help is appreciated!


magento2 – css is not working in magento 2 cart page

I have issue in cart page of my website . Currently home page and product pages are loading correctly but the cart page have issue Css and js fies in the cart page is not working

enter image description here

Please help to solve this . I have seen this question Magento 2 StyleSheet not loading

But I am not sure i can apply that solution . Please check .

I have tried sudo php bin/magento setup:static-content:deploy ,but still the cart page is same