Question: Add To Cart Not Working

Add To Cart Not Working

when I click on Add to cart I get the following error: This page isn’t workingideamia.com.mx is currently unable to handle this request. HTTP ERROR 500 URL: cart/add/3

JP

Jorge Plascencia

Asked

when I click on Add to cart I get the following error:

This page isn’t workingideamia.com.mx is currently unable to handle this request. HTTP ERROR 500

URL: cart/add/3

  • MS

    Mian Saleem

    Answered

    Hello,

    Please check your server error logs and let me know the error details so that I can suggest.

    You can try to save the system settings and shop settings again to make sure no default data is missing.

    You can enable app logs by changing the log_threshold to 1 in the app/config/config.php and then visit the page again to produce errors. Lastly check the latest log file in the app/logs/ folder.

    Thank you

  • JP

    Jorge Plascencia

    Answered

    Here is the log data:

    ERROR - 2020-10-05 23:39:57 --> Could not find the language line “today” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “display_all_products” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “shop” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “toggle_alignment” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “today_profit” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “promos” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “list_printers” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “add_printer” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “expense_categories” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “site_logs” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “backups” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “front_end” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “shop_settings” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “slider_settings” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “list_pages” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “add_page” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “sms_settings” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “send_sms” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “sms_log” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “default_price_group” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “disable_editing” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “not_recommended” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “pdf_lib” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “apis_feature” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “use_code_for_slug” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “remove_expired” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “i_ll_remove” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “remove_automatically” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “display_all_products” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “hide_with_0_qty” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “show_with_0_qty” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “barcode_separator” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “dash” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “tilde” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “underscore” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “barcode_renderer” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “svg” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “update_cost_with_purchase” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “set_focus” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “add_item_input” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “last_order_item” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “set_focus” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “indian_gst” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “biz_state” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “ppayment_prefix” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “returnp_prefix” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “qa_prefix” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “sac” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “display_currency_symbol” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “before” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “after” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “currency_symbol” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “weighing_scale_barcode” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “ws_barcode_type” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “weight_qty” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “ws_barcode_chars” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “flag_chars” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “item_code_start” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “item_code_chars” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “price_start” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “price_chars” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “price_divide_by” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “weight_start” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “weight_chars” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “weight_divide_by” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “ordered” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “due” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “transferring” ERROR - 2020-10-05 23:39:57 --> Could not find the language line “required_invalid” ERROR - 2020-10-05 23:40:13 --> Query error: Unknown column ‘base_unit_cost’ in ‘field list’ - Invalid query: SELECT id, purchase_id, quantity, quantity_balance, net_unit_cost, unit_cost, item_tax, base_unit_cost FROM sma_purchase_items WHERE product_id = ‘3’ AND warehouse_id = ‘1’ AND quantity_balance != 0 AND option_id = ‘28’ AND ( status = ‘received’ OR status = ‘partial’ ) GROUP BY id ORDER BY date ASC, purchase_id ASC ERROR - 2020-10-05 23:40:13 --> Severity: error --> Exception: Call to a member function num_rows() on bool /home/ideamiacom/public_html/pos/app/models/Site.php 650 ERROR - 2020-10-05 23:40:15 --> Could not find the language line “subcategory” ERROR - 2020-10-05 23:40:19 --> Query error: Unknown column ‘base_unit_cost’ in ‘field list’ - Invalid query: SELECT id, purchase_id, quantity, quantity_balance, net_unit_cost, unit_cost, item_tax, base_unit_cost FROM sma_purchase_items WHERE product_id = ‘3’ AND warehouse_id = ‘1’ AND quantity_balance != 0 AND option_id = ‘59’ AND ( status = ‘received’ OR status = ‘partial’ ) GROUP BY id ORDER BY date ASC, purchase_id ASC ERROR - 2020-10-05 23:40:19 --> Severity: error --> Exception: Call to a member function num_rows() on bool /home/ideamiacom/public_html/pos/app/models/Site.php 650

  • JP

    Jorge Plascencia

    Answered

    base_unit_cost is not on the table sma_purchase_items that is the error, is there an update to the DB that needs to happen after the shop is added?

  • MS

    Mian Saleem

    Answered

    Hello, Have you updated or it’s a fresh install? If updated, did you import the sql files as mentioned on step 8?

  • MS

    Mian Saleem

    Answered

    Hello,

    You can only install shop module on latest version of SMA. So before install, you need to update the SMA and then install shop module.

    Thank you

  • JP

    Jorge Plascencia

    Answered

    I have the 3.4.40 version installed on the system. is there a new one? where can I get the new version I’m still under support.

  • MS

    Mian Saleem

    Answered

    Hello,

    V3.4.40 is the latest version. The base_unit_cost column was added in the v3.4.38 I am not sure why your installed latest version don’t have it. If you perform update, the step 8 is very important to update the database. You can run the following query after selecting your database to add the column

    ALTER TABLE `sma_purchase_items` ADD `base_unit_cost` decimal(25,4) NULL;
    

    Thank you

  • JP

    Jorge Plascencia

    Answered

    Issue fix, I followed the update instructions, Thank you!

  • Login to Reply