Um usuário perguntou 👇
Clique em “Adicionar ao carrinho”. Um novo banner apareceu confirmando que o produto foi adicionado ao menu. Clique em “Ver Carrinho” para ver o carrinho.
Agora, se você clicar em “Voltar”, receberá um aviso “Confirmar refluxo do formulário” (ou outro aviso dependente do navegador).
Assim o botão “Adicionar ao Carrinho” é PUBLICAR e ao clicar em Voltar, caso opte por reinserir os dados, ele adicionará outro item ao carrinho.
Podemos fazer o woocommerce usar algo como javascript ou ajax para adicionar um elemento ao gráfico para não ter esse problema? É difícil para mim encontrar outras pessoas que reclamem…
relatório de status completo do sistema:
### WordPress Environment ###
WordPress address (URL):
Site address (URL):
WC Version: 3.9.2
REST API Version: ✔ 1.0.7
Log Directory Writable: ✔
WP Version: 5.3.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –
### Server Environment ###
Server Info: LiteSpeed
PHP Version: 7.1.33 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
PHP Post Max Size: 64 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.62.0
OpenSSL/1.0.2k
SUHOSIN Installed: –
MySQL Version: 5.5.5-10.0.38-MariaDB-cll-lve
Max Upload Size: 32 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
WC Database Version: 3.9.2
WC Database Prefix: wpv2_
Total Database Size: 9.56MB
Database Data Size: 7.91MB
Database Index Size: 1.65MB
wpv2_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wpv2_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wpv2_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wpv2_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wpv2_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_comments: Data: 0.16MB + Index: 0.28MB + Engine InnoDB
wpv2_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_loginizer_logs: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wpv2_options: Data: 2.05MB + Index: 0.06MB + Engine InnoDB
wpv2_postmeta: Data: 3.48MB + Index: 0.13MB + Engine InnoDB
wpv2_posts: Data: 1.50MB + Index: 0.16MB + Engine InnoDB
wpv2_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wpv2_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wpv2_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wpv2_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wpv2_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wpv2_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wpv2_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wpv2_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_yoast_seo_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wpv2_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
### Post Type Counts ###
attachment: 45
custom_css: 1
elementor_library: 2
nav_menu_item: 3
page: 8
post: 1
product: 7
revision: 68
scheduled-action: 329
tablepress_table: 1
wpcf7_contact_form: 1
### Security ###
Secure connection (HTTPS): ✔
Hide errors from visitors: ✔
### Active Plugins (16) ###
ManageWP - Worker: by GoDaddy – 4.9.3
Contact Form 7: by Takayuki Miyoshi – 5.1.6
Duplicate Page: by mndpsingh287 – 4.1
Elementor: by Elementor.com – 2.9.2
ELEX Hide WooCommerce Shipping Methods (BASIC): by ELEXtensions – 1.0.3 – Not tested with the active version of WooCommerce
Flexible Shipping For FedEx: by WP Desk – 1.4
Insert Headers and Footers: by WPBeginner – 1.4.4
Loginizer: by Raj Kothari – 1.4.3
TablePress: by Tobias Bäthge – 1.10
UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
DavidAnderson – 1.16.21
WooCommerce Admin: by WooCommerce – 0.25.1
WooCommerce Stripe Gateway: by WooCommerce – 4.3.2
WooCommerce Services: by Automattic – 1.22.3
WooCommerce: by Automattic – 3.9.2
Yoast SEO: by Team Yoast – 13.1
WPS Hide Login: by WPServeur
NicolasKulka
tabrisrp – 1.5.5
### Inactive Plugins (3) ###
Akismet Anti-Spam: by Automattic – 4.1.3
Jetpack by WordPress.com: by Automattic – 8.2.2
Password Protected: by Ben Huson – 2.2.5
### Must Use Plugins (1) ###
ManageWP - Worker Loader: by GoDaddy –
### Settings ###
API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
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)
Connected to WooCommerce.com: –
### WC Pages ###
Shop base: #170 - /shop/
Cart: #171 - /cart/
Checkout: #172 - /checkout/
My account: #173 - /my-account/
Terms and conditions: ❌ Page not set
### Theme ###
Name: Adventure Lite
Version: 1.9
Author URL:
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
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: –
### Action Scheduler ###
Complete: 328
Oldest: 2020-01-21 03:48:49 +0000
Newest: 2020-02-21 00:17:55 +0000
Pending: 1
Oldest: 2020-02-21 01:17:55 +0000
Newest: 2020-02-21 01:17:55 +0000
Canceled: 0
Oldest: –
Newest: –
In-progress: 0
Oldest: –
Newest: –
Failed: 0
Oldest: –
Newest: –
(@kellymetal)
11 meses, 1 semana atrás
Olá,
Entendo que você deseja usar o AJAX para adicionar produtos ao carrinho para evitar a mensagem ao clicar de volta na página do carrinho.
Há uma disposição para usar AJAX para botões Adicionar ao carrinho nas páginas de arquivo abaixo WooCommerce > Configurações > Produtos > Geral. Após habilitar esta configuração, o AJAX será usado para adicionar produtos à tabela de armazenamento/arquivamento:
Para páginas de produtos individuais, isso exigiria alguma personalização. Existem várias instruções online para fazer as alterações necessárias:
Se precisar de ajuda com codificação ou desenvolvimento personalizado, recomendamos que você entre em contato com um desenvolvedor em um dos serviços em https://woocommerce.com/customizations/.
Espero que ajude! Que tenhas um bom dia!
lançador de tópicos
(@GreatScott)
11 meses atrás
@kellymetal Muito obrigado! Já marcamos “Ativar AJAX”, mas marquei “Redirecionar para a página do carrinho” e agora funciona bem. Depois de adicionar o gráfico, você é levado à página do gráfico e clicar em Voltar leva você de volta à página do produto. Funciona como planejado!
Scott
Isto foi útil?
0 / 0