Post by Iamdbat » Sat May 23, 2015 10:00 am

This is what I want to do ...I would like to change (in list view) the 'add to cart button and icon' to 'see mre information' (with a better icon) without adding this to a cart - just going to the product page - any help? - Extension vampires can just dismiss this post - biggy garlic here

Active Member

Posts

Joined
Sat Jan 28, 2012 7:32 am

Post by IP_CAM » Sun May 24, 2015 9:52 am

try to make your life easy, use google first:
https://www.google.ch/search?q=add+to+c ... t+opencart
Ernie
bigmax.ch/os/

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

Post by Iamdbat » Wed Jun 24, 2015 11:11 pm

I was really looking for a bit of code from somebody who was of the same mind and experienced in this - after all that is why I asked the question in the right forum - but thanks for your reply anyway

Active Member

Posts

Joined
Sat Jan 28, 2012 7:32 am

Post by IP_CAM » Thu Jun 25, 2015 2:54 am

https://www.google.ch/search?q=add+to+c ... t+opencart

I really don't understand your Problem, I gave you the right link, and the first Mod,
I found, does the same as the Mod, I used, to create this (old) place:
http://www.ipc.li/shop/index.php?route= ... path=20_26
Instead of going to the Cart, it forwards the visitor to the Product Page.

Is that not, what you want? ???
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

Post by Iamdbat » Fri Jun 26, 2015 11:25 pm

I'm not looking for a third party module .... That's just another reason for the cart to break - I was hoping that somebody at some stage has modified the code and could share that with me without me having to install yet another third party module .... thanks for your kind effort though

Active Member

Posts

Joined
Sat Jan 28, 2012 7:32 am

Post by IP_CAM » Sat Jun 27, 2015 1:28 am

ok, I accept this, my very last effort, go give you a hint on this:
DOWNLOAD:
add to cart - go to product VqMod, created by Designer-pro.net
open the addtocart-gotoproduct1.zip and have a look.

You then find things like that, in the VqMod, as well as later in the OC Source-Files, related:

Code: Select all

<div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div>
THIS MEANS. that this line, in the FILE Section, linked to this COMMAND, like in the File:

Code: Select all

<file name="catalog/view/theme/*/template/module/bestseller.tpl">
at the very end of the bestseller.tpl File:

Code: Select all

      <?php } ?>
        <div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div>
      </div>
      <?php } ?>
    </div>
  </div>
</div>
and placed in here, in the VqMOD:

Code: Select all

<search position="replace"><![CDATA[
            <div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div>
            ]]></search>
in it's HTML Code looks like this:

Code: Select all

<div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div>
MUST BE REPLACED by the following line, looking like this:

Code: Select all

<div class="cart"><a href="<?php echo $product['href']; ?>" class="button"> View this Product </a></div>
in all the Files, related, where Products are shown in category-format. Whatever you want to name THE BUTTON!

MEANING, that in ALL the FILES, related, the Line, you have to insert, instead of the original, in the bestseller.tpl, by example, as used/shown here, would be this:

Code: Select all

<div class="cart"><a href="<?php echo $product['href']; ?>" class="button"> View this Product </a></div>
but since it matches all xxx-tpl files involved, don't worry, you can't do much wrong.
----

GENERAL ADVISE , when 'handling' VqMod's:
Search for EACH LINE, as placed AFTER THE replace"><![CDATA[ and BEFORE THE ]]></search>
as well as after the <add><![CDATA[ and BEFORE THE ]]></add>, WITH ZERO GAP's, handmade...,
additionally, to what exists, by default!, and make NO Errors, copy/pasting, by error, or deleting some [ , or a ], or whatever, not belonging to the LINE wich has to be changed.LEAVE NO spaces, anywhere, by accident, and then, you'll have, what you want it to be!
And there is MORE than just a REPLACE-Function in VqMods, but this is another Theme. Just to mention it.
---
It's as simple as that, VqMod's are the NUMBER ONE IDEAL SOURCE, to show, how & where modify SOURCE!
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

Post by Iamdbat » Wed Jul 19, 2017 10:51 pm

Thank you - this did the trick

Active Member

Posts

Joined
Sat Jan 28, 2012 7:32 am
Who is online

Users browsing this forum: No registered users and 20 guests