Página 3 de 4

Re: Botão Comprar não funciona [Resolvido]

Enviado: 22 Abr 2013, 14:43
por phlavio
Pra ser mais exato o comando para ser alterado está na linha 1085.

Re: Botão Comprar não funciona [Resolvido]

Enviado: 27 Jul 2013, 16:42
por mmfotograficos
PARA QUEM ESTAVA COM PROBLEMA NO BOTÃO DA HOME, ONDE O MESMO NÃO ADICIONAVA NO CARRINHO, BASTA COLOCAR NO HTACCESS O CÓDIGO QUE FAZ COM QUE O ENDEREÇO SEDOMINNIO.COM.BR VA PARA WWW.SEUDOMINIO.COM.BR
SEM O WWW O OPENCART NAO ADICIONA NO CARRINHO, NÃO SEI PORQUE...
SEGUE CÓDIGO


# DIRECIONA PARA WWW
RewriteCond %{HTTP_HOST} ^seudominio.com.br$ [NC]
RewriteRule ^(.*)$ http://www.seudominio.com.br/$1 [L,R=301]
#FIM

Re: Botão Comprar não funciona [Resolvido]

Enviado: 25 Out 2013, 20:56
por fitnessmaia
Estou como o mesmo problem do botão comprar, já fiz todas as maneiras ensinadas aqui e não resolveu, minha loja está localizada no seguinte endereço: www.professormaia.com/cdfitness preciso de ajuda. Obrigado

Re: Botão Comprar não funciona

Enviado: 27 Jan 2014, 07:58
por infofran
Manoel Vidal escreveu:Acredito que sua loja esteja na versão 1.5.2 e este é o problema, para tentar corrigir edite o arquivo common.js que está no diretório /catalog/view/javascript/, e localize a seguinte linha:
Código: Selecionar todos
url: 'index.php?route=checkout/cart/update',
E substituindo por:
Código: Selecionar todos
url: 'index.php?route=checkout/cart/add',
Salve o arquivo e limpe o cache do seu navegador para que atualize os arquivos javascript da loja e faça um novo teste.

Espero ter ajudado. :D
Bom dia, Manoel. Utilizo o opencart 1.5.6.1, mas o botão comprar não funciona na página index.php. Nas outras páginas, como home, carrinho de compras, etc. o botão funciona normalmente. Por gentileza, tem alguma dica do que possa estar acontecendo?

http://www.mercadolivreloja.com.br/

Re: Botão Comprar não funciona [Resolvido]

Enviado: 27 Jan 2014, 09:21
por leandrorppo
Olá, se tirar o www do endereço de sua loja as compras acontecem normalmente (http://mercadolivreloja.com.br/home), tente consertar inserindo no arquivo .htaccess, abaixo da linha:
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

As linhas:
RewriteCond %{HTTP_HOST} ^www.mercadolivreloja.com.br$ [NC]
RewriteRule ^(.*)$ http://mercadolivreloja.com.br/$1 [L,R=301]

O comando fará com que a página sempre seja redirecionada para http://mercadolivreloja.com.br/home sem o www.

Qualquer coisa, posta de volta aqui, abraço e boa sorte.

Re: Botão Comprar não funciona

Enviado: 27 Jan 2014, 10:00
por infofran
Manoel Vidal escreveu:Acredito que sua loja esteja na versão 1.5.2 e este é o problema, para tentar corrigir edite o arquivo common.js que está no diretório /catalog/view/javascript/, e localize a seguinte linha:
Código: Selecionar todos
url: 'index.php?route=checkout/cart/update',
E substituindo por:
Código: Selecionar todos
url: 'index.php?route=checkout/cart/add',
Salve o arquivo e limpe o cache do seu navegador para que atualize os arquivos javascript da loja e faça um novo teste.

Espero ter ajudado. :D
Se eu colocar a linha RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] dá página não encontrada.

No meu htacess está assim:

# SEO URL Settings
RewriteEngine On
rewritecond %{http_host} ^mercadoloivreloja.com.br [NC]
rewriterule ^(.*)$ http://www.mercadolivreloja.com.br/$1 [r=301,NC]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/


Re: Botão Comprar não funciona [Resolvido]

Enviado: 27 Jan 2014, 10:39
por infofran
leandrorppo escreveu:Olá, se tirar o www do endereço de sua loja as compras acontecem normalmente (http://mercadolivreloja.com.br/home), tente consertar inserindo no arquivo .htaccess, abaixo da linha:
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

As linhas:
RewriteCond %{HTTP_HOST} ^www.mercadolivreloja.com.br$ [NC]
RewriteRule ^(.*)$ http://mercadolivreloja.com.br/$1 [L,R=301]

O comando fará com que a página sempre seja redirecionada para http://mercadolivreloja.com.br/home sem o www.

Qualquer coisa, posta de volta aqui, abraço e boa sorte.

Se eu colocar a linha RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] dá página não encontrada.

No meu htacess está assim:

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
rewritecond %{http_host} ^mercadoloivreloja.com.br$ [NC]
rewriterule ^(.*)$ http://www.mercadolivreloja.com.br/$1 [l,r=301,NC]
# If your opencart installation does not run on the main web folder make sure you folder it does

run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L,QSA]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings,

restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is

on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but

you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting

errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are

getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product

options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

# Turn off ETags
FileETag None

<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml

+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

</ifModule>

<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 604800 seconds"
ExpiresByType image/jpeg "access plus 604800 seconds"
ExpiresByType image/png "access plus 604800 seconds"
ExpiresByType text/css "access plus 2592000 seconds"
ExpiresByType text/javascript "access plus 2592000 seconds"
ExpiresByType application/javascript "access plus 2592000 seconds"
ExpiresByType application/x-javascript "access plus 2592000 seconds"
</ifModule>

<ifModule mod_headers.c>
<filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch "\\.(css)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\\.(js)$">
Header set Cache-Control "max-age=2592000, private"
</filesMatch>
<filesMatch "\\.(xml|txt)$">
Header set Cache-Control "max-age=2592000, public, must-revalidate"
</filesMatch>
<filesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</filesMatch>
</ifModule>

Re: Botão Comprar não funciona [Resolvido]

Enviado: 30 Abr 2014, 11:24
por senuts
Bom dia,

não achei necessário abrir outro tópico já que observei que o meu problema é parecido com este,

estou com o seguinte problema:

Na minha página principal os botão Comprar não funcionam quando o seguinte:

- Quando digito www.meusite.com.br / meusite.com.br e ou http://meusite.com.br e clico no botão comprar nada acontece (não é redirecionado), mas quando digito o domínio com o protocolo "HTTPS://", o botão comprar funciona e redireciona para o carrinho ou para pagina de detalhes do produto quando há opções a selecionar.

fiquei na dúvida se não há como adicionar diretamente nos botões...a rota de redirecionamento com o "HTTPS://"

ou por meio do htacess,

aguardo uma possível solução, abraço a todos.

Re: Botão Comprar não funciona [Resolvido]

Enviado: 02 Set 2014, 23:41
por xeuros
phlavio escreveu:Pra ser mais exato o comando para ser alterado está na linha 1085.
Tenho um problema com a minha loja com o mesmo os botão de comprar so trabalha quando se viualiza o produto podem me ajudar nisto ?
xeuros.net
Desculpe mas não entendi phlavio..Pode explicar melhor ?
Cumprimentos

Re: Botão Comprar não funciona [Resolvido]

Enviado: 06 Set 2014, 10:33
por diogoportuga
Amigos, o botão comprar só não está funcionando na página do produto. o erro está na product.tpl ?
Grato