-
-
With the new update to Woocommerce, my cart is now malfunctioning. When you go to a single product page and click “add to cart” it defaults to add 2 rather than 1 product.
I also have an error that my template files are outdated – the system report for my site is copied below.
Thanks!
`
### WordPress Environment ###
Home URL: https://www.lavenderconnection.com
Site URL: https://www.lavenderconnection.com
WC Version: 3.0.3
Log Directory Writable: ✔
WP Version: 4.7.3
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
### Server Environment ###
Server Info: Apache
PHP Version: ❌ 5.4.43 – We recommend a minimum PHP version of 5.6. See: How to update your PHP version
PHP Post Max Size: 64 MB
PHP Time Limit: 0
PHP Max Input Vars: 1000
cURL Version: 7.24.0
OpenSSL/1.0.0
SUHOSIN Installed: –
MySQL Version: 5.6.32
Max Upload Size: 64 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
WC Database Version: 3.0.3
WC Database Prefix: wp_xyke_
woocommerce_sessions: ✔
woocommerce_api_keys: ✔
woocommerce_attribute_taxonomies: ✔
woocommerce_downloadable_product_permissions: ✔
woocommerce_order_items: ✔
woocommerce_order_itemmeta: ✔
woocommerce_tax_rates: ✔
woocommerce_tax_rate_locations: ✔
woocommerce_shipping_zones: ✔
woocommerce_shipping_zone_locations: ✔
woocommerce_shipping_zone_methods: ✔
woocommerce_payment_tokens: ✔
woocommerce_payment_tokenmeta: ✔
MaxMind GeoIP Database: ✔
### Security ###
Secure connection (HTTPS): ❌Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔
### Active Plugins (22) ###
Shield Security: by iControlWP – 5.8.1
amr shortcode any widget: by anmari – 3.3
Better Search: by Ajay D’Souza – 2.1.0
Boxzilla: by ibericode – 3.1.11
Contact Form 7: by Takayuki Miyoshi – 4.7
Envato WordPress Toolkit: by Envato – 1.7.3
WooCommerce – Gift Cards: by WP Ronin – 2.5.7
Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 6.1.7
Head and Footer Scripts Inserter: by Arthur Gareginyan – 3.3
WPBakery Visual Composer: by Michael M – WPBakery.com – 5.0.1
MailChimp for WordPress: by ibericode – 4.1.1
MOJO Marketplace: by Mike Hansen – 1.1.3
Slider Revolution: by ThemePunch – 5.2.6
Simple Follow Me Social Buttons Widget: by Lucy Tomás – 3.3.3
Order Weight for WooCommerce: by We Up North – 0.3.5
USPS Simple Shipping for Woocommerce: by SkyWorks85 – 1.2.6
WooCommerce Extended Coupon Features: by Soft79 – 2.4.2.1
WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 1.6.4
WooCommerce: by Automattic – 3.0.3
Yoast SEO: by Team Yoast – 4.6
WP Retina 2x: by Jordy Meow – 4.8.0
Yelp Widget Pro: by Devin Walker – 1.4.2
### Settings ###
API Enabled: ✔
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
gift-card (gift-card)
grouped (grouped)
simple (simple)
variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
### WC Pages ###
Shop base: #2437 – /shop/
Cart: #3461 – /cart/
Checkout: #3462 – /checkout/
My account: #3463 – /my-account/
### Theme ###
Name: Tower-Child
Version: – 0 is available
Author URL:
Child Theme: ✔
Parent Theme Name: Tower
Parent Theme Version: 2.0
Parent Theme Author URL: https://www.codeless.co
WooCommerce Support: ✔
### Templates ###
Archive Template: Your theme has a woocommerce.php file
you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
Overrides: tower/woocommerce/content-product.php version 2.6.1 is out of date. The core version is 3.0.0
Tower-Child/woocommerce/emails/customer-completed-order.php
Tower-Child/woocommerce/emails/customer-processing-order.php
tower/woocommerce/loop/add-to-cart.php version 2.5.0 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/add-to-cart/external.php
tower/woocommerce/single-product/add-to-cart/grouped.php version 2.1.7 is out of date. The core version is 3.0.3
tower/woocommerce/single-product/add-to-cart/simple.php version 2.1.0 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/add-to-cart/variable.php
tower/woocommerce/single-product/meta.php version 1.6.4 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/price.php version 2.4.9 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/product-attributes.php version 2.1.3 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/product-image.php version 2.6.3 is out of date. The core version is 3.0.2
tower/woocommerce/single-product/product-thumbnails.php version 2.6.3 is out of date. The core version is 3.0.2
tower/woocommerce/single-product/rating.php
tower/woocommerce/single-product/related.php version 1.6.4 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/review.php
tower/woocommerce/single-product/sale-flash.php
tower/woocommerce/single-product/share.php
tower/woocommerce/single-product/short-description.php
tower/woocommerce/single-product/tabs/additional-information.php version 2.0.0 is out of date. The core version is 3.0.0
tower/woocommerce/single-product/tabs/description.php
tower/woocommerce/single-product/tabs/tabs.php
tower/woocommerce/single-product/title.php
tower/woocommerce/single-product/up-sells.php version 1.6.4 is out of date. The core version is 3.0.0
tower/woocommerce/single-product-reviews.php
-
I think I may have an idea why this is happening. When I first set up the site, you helped me change the way the “add to cart” button works from subcategories – when you’re in a subcategory of products and you click on the product it should now take you to the product page (rather than adding it to the cart.)
I can’t figure out how to direct link to past Forum conversations, but it is the topic I started in March 2016 that is titled “Woocommerce Template Files out of date”. I worked with someone on wordpress.org forum who gave me code for the functions.php file, and you helped me ensure it was in the right place in my functions.php – I have included the code, below.
I noticed today that now what is happening, is that when I click on a product from a subcategory, it takes me to the individual product page (as I want it to) but also adds the product. I hadn’t noticed that yesterday. So when I click “add to cart” it only adds 1 product, it’s just that another one has already been added (so it seemed like it was adding 2.)
So the real issue is not that the “add to cart” is adding 2 products, but that when you click on a product in a subcategory, it is adding the product to the cart at that point. Can you help me fix that?
Thanks!
Here’s the code we added to functions.php in my child theme:
//change button in category view to go to product description rather than add to cart
add_filter( ‘woocommerce_product_add_to_cart_url’, ‘custom_woocommerce_product_add_to_cart_url’, 10, 2 );
function custom_woocommerce_product_add_to_cart_url( $url, $product ) {
if ( $product->is_type( ‘simple’ ) ) {
$url = get_permalink( $product->id );
}
return $url;
} -
Hello,
This is the list of all the topics you have opened in this forum: https://support.codeless.co/?bbp_user=968&bbp_tops=1
This is the topic related to these changes: https://support.codeless.co/?topic=woocommerce-template-files-out-of-dateSince the woocommerce has been updated ever since (it’s been 1 year, not March 2017), it is possible that some of the functions may have been changed.
This is a personal customization you have done here. In order to fix it i will need to test out the code again. This needs time that is not covered from support policy. I suggest you hire a developer to check these out for you.The past topic can be used as a guide to investigate where the problem (change) has been done in the latest updates.
Best regards!
-
Tip: These css classes “product_type_simple add_to_cart_button ajax_add_to_cart” need to be removed from the “View Product” button.
Screenshot: https://pho.to/AfmZPBest regards!
-
Okay – I apologize for asking for something outside my paid support. I will contact the person who assisted me on the wordpress.org forum and hopefully he will be able to assist me.
-
Hello,
No worries.
It would be kind of you if you could share the solution here for other visitors that may be interested to make the same customization to their cart page.
However it’s on your will!Let us know if we can help with anything else.
Best regards!
-
You must be logged in to reply to this topic.