This topic has 6 replies, 3 voices, and was last updated 7 years, 1 months ago ago by Amzy Leel
Hello! I need assistance on two small issues, please:
1) In the shopping cart, the word “Quantity” no longer fits in its column and is getting overwritten (perhaps this will be resolved when I update the theme?). But I can’t update the theme until I resolve my second issue, below.
2) Adding a snippet of code into the Child Theme’s functions.php file causes the site to crash. I confirmed with the plugin developer who provided me with the code that I should just add it to the end of the file, but it’s not working. When I had my programmer look at it, thinking I was misplacing it somehow, the same thing happened to him and he mentioned the php tag in the functions.php file doesn’t seem to have a closing tag, and might be closing in a different file? I was able to successfully add it to the Parent theme’s functions.php file, but can’t seem to get it into the Child Theme correctly, which I need to do so I can stay updated with the theme. The code is to fix some quantity arrows that were not appearing on an order form. Perhaps a recent update to the theme has maybe even fixed the issue this code is for? The code is this:
// Add quantity buttons back
add_filter( ‘wwof_filter_product_item_quantity’, ‘my_wwof_add_quantity_button’, 99, 2 );
function my_wwof_add_quantity_button( $quantity_field , $product ) {
$quantity_field = str_replace(‘<div class=”quantity”>’, ‘<div class=”quantity buttons_added”><input type=”button” value=”-” class=”minus”>’, $quantity_field);
$quantity_field = str_replace(‘</div>’, ‘<input type=”button” value=”+” class=”plus”></div>’, $quantity_field);
// Return the result
return $quantity_field;
}
Thank you for any help you can provide.
Hello,
1) Yes, you need to update theme to version 4.9. I have installed new version and re-named the old one.
2) Don’t see the problem if you add code with correct symbols like ” and ‘. Check the functions.php of child theme, everything works fine.
Regards
Hello thank you for your quick response. I do see the code in the child functions file now, thank you. I presume I can now delete the theme V4.4 and everything will run as expected now?
Thank you again.
Hello,
Yes, you can delete the old version of theme.
Regards
Thank you!
You are welcome.
Do not hesitate to ask if you have any other question (in new post / topic)
Regards,
You must be logged in to reply to this topic.Log in/Sign up