Post by GastonHernandez » Mon Apr 04, 2016 1:01 pm

Hello, first of all thank you for this amazing store that you have made.
I'm having trouble changing the value of "add to cart" to which you add to cart the product .. button The point is that I do not want to use a cart in my store, but I want to do is to click on "add to cart "a pop-up to take you to this web page opens

Such as this:

Code: Select all

https://www.mercadopago.com/mla/checkout/start?pref_id=204250268-cb88c30c-7e92-49c8-9df0-d51ea289e4f4
Each product will have its own link which will be specified when creating the product.

The idea is based on the buttons MercadoPago, they already you provisioned a code with a very nice script, but the payment button is very ugly and I love to Arastta (I change the text of "add to cart" to "buy product")

Here is the example of MercadoPago talk button so they see and can understand how I would like the popup opens when click on "buy product"

Code: Select all

<A mp-mode = "DFTL" href="https://www.mercadopago.com/mla/checkout/start?pref_id=204250268-cb88c30c-7e92-49c8-9df0-d51ea289e4f4" name = "MP-payButton" class = 'blue-ar-l-sq-none'> Pay </a>
<S-cript type = "text / -javascript">
(Function () {$ MPC_load function () {$ MPC_loaded window == true && (function () {var s = document.createElement ( "script").! S.type = "text / -javascript"; s.async = true; s.src = document.location.protocol + "// secure.mlstatic.com/mptools/render.js";var x = document.getElementsByTagName ( 'script') [0]; x.parentNode.insertBefore (s ., x) $ MPC_loaded window = true;}) ();} $ MPC_loaded window == true (window.attachEvent window.attachEvent ( 'onload', $ MPC_load).!? window.addEventListener ( 'load' , $ MPC_load, false)): null;}) ();
</ Script>
Since already many thanks and sorry for the vocabulary since I am Spanish.
I hope prompt response because I need your help very urgently
Regards!


Posts

Joined
Mon Apr 04, 2016 12:56 pm

Post by IP_CAM » Tue Apr 05, 2016 10:41 am

But this is Opencart here, and not Arrasta...
---
anyway, a poor and simple quick-draw Category Page Link button to the Product Page would look like this
VqMod below, you just have to pack the routine into a Javascript Window Popup.

This VqMod below does NOT function anywhere else, it's tested only in the DEFAULT OC-2.2 Category Section.
---
add_to_cart_goto_product_oc2.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
<id>Add to Cart = Go to Product</id>
<version>OC v.2.x</version>
<vqmver>2.5.0</vqmver>
<author>Ernie - IP_CAM</author>
<file name="catalog/view/theme/default/template/product/category.tpl">
<operation error="log">
<search position="replace"><![CDATA[<button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>]]></search>
<add><![CDATA[<a href="<?php echo $product['href']; ?>"><button type="button" data-toggle="tooltip" title="View this Product"><i class="fa fa-check-square-o"></i></button></a>]]></add>
</operation>
</file>
</modification>	
Good Luck ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 9 guests