How to add shopping cart on my header

Hi,

I’m trying to add a shopping cart on my header but is not working. I don’t know if I need to do a coding on the backend or if there is a way of doing it without coding. I don’t know much about coding and I’ve been reading forums were it says that I have to create a child theme before editing any .php. I really don’t know how to do that. Can somebody help me?

Thanks

Gaby

Hi There,

Thanks for writing in! Head over to Appearance -> Customize -> WooCommerce section and enable Navbar menu so that your card will appear as follows.

Hope that helps.

Hi,

Thanks for your reply. I did but a note shows on my page saying: “Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /home3/gabybdesigns/public_html/wp-includes/functions.php on line 3839” What should I do?

Thanks in advance

Gaby

Hey There,

This message is a PHP Notice. You can get rid of this by disabling the debug mode. You can do this by opening wp-config.php and adding define( 'WP_DEBUG' , false ); just above /* That's all, stop editing! Happy blogging. */

For example:

define('WP_DEBUG', true);

/* That's all, stop editing! Happy blogging. */

When you revisit the page, you should no longer be seeing the message.

Please let us know how it goes.

Hi there, thanks for your reply. Sorry my ignorance, in what part of the theme can I find that file? I was looking on appearance, editor but I didn’t find the file called wp-config.php.

Thanks

Gaby

Hi there,

It should be under your site’s file and through FTP. Or you can use your hosting’s file manager and edit that file. It’s core configuration and it can’t be edited from the admin side. You can check this too http://www.wpbeginner.com/beginners-guide/how-to-edit-wp-config-php-file-in-wordpress/ for more information.

Thanks!

Hi.

I tried to look for the wp_debug true but the only part I found with something related says the following:

if ( WP_DEBUG && apply_filters( ‘deprecated_function_trigger_error’, true ) ) {
if ( function_exists( ‘__’ ) ) {
if ( ! is_null( $replacement ) ) {
/* translators: 1: PHP function name, 2: version number, 3: alternative function name /
trigger_error( sprintf( __(’%1$s is deprecated since version %2$s! Use %3$s instead.’), $function, $version, $replacement ) );
} else {
/
translators: 1: PHP function name, 2: version number */
trigger_error( sprintf( __(’%1$s is deprecated since version %2$s with no alternative available.’), $function, $version ) );
}
} else {
if ( ! is_null( $replacement ) ) {
trigger_error( sprintf( ‘%1$s is deprecated since version %2$s! Use %3$s instead.’, $function, $version, $replacement ) );
} else {
trigger_error( sprintf( ‘%1$s is deprecated since version %2$s with no alternative available.’, $function, $version ) );
}
}
}
}

Will be that the one I have to change? I couldn’t find exactly as you said in your example.

Thanks for your help

Gaby

Hi There,

It seems that you’re checking a wrong file. Check the file wp-config.php which is located under the root of your WordPress installation and the you should be able to locate the following line.

define('WP_DEBUG', true);

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.