Post by pcmarket » Tue Feb 03, 2015 4:10 pm

how I can create and add new link position for all products when click him Go to a specific page!
It has been found in the imageImage

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by Nikita_Sp » Wed Feb 04, 2015 1:58 am

Hallo!
If you need to add static link to all product's pages, than you should to edit file catalog/view/theme/YOURTHEMENAME/template/product/product.tpl

And add link everywhere you want.

If you need custom link for each product, then you need to add a new column to your table ".DB_prefix."product, for example:

Code: Select all

ALTER TABLE  `oc_product` ADD  `link` VARCHAR( 255 ) NOT NULL
Then you should add this field for edit in ADMIN folder in files:
  • admin/language/YOR-LANG/catalog/product.php (add text description of the field to input)
  • admin/view/template/catalog/product_form.tpl (add input field and text to template)
  • admin/model/catalog/product.php (add to sql your new column with param $data['NAME-OF-THE-INPUT'])
The same thing you should do for CATALOG folder in files:
  • catalog/model/catalog/product.php (add your column to select in funct getProduct() and add to array below)
  • catalog/controller/product/product.php (add your column to array that controller sets like product_id adds)
  • catalog/view/theme/YOUR-THEME/template/product/product.tpl (add your column to output)
It may seems to be difficult, but it isn't. ;)
Have a good day.

Web-developer. Opencart extenisoins. WordPress plugins. Modifications and articles.
For more information: http://nikita-sp.com.ua


Newbie

Posts

Joined
Wed Feb 04, 2015 1:39 am

Post by pcmarket » Wed Feb 04, 2015 11:36 pm

Hallo!
thanks for Help
I need custom link for each product,
I add a new column to my table ".DB_prefix."product, According to you said :D
But I can not edit
admin/language/YOR-LANG/catalog/product.php (How I can add text description of the field to input??) ???
How and where
Which line of code and how do I edit?
or
How I can edit
admin/view/template/catalog/product_form.tpl (how add input field and text to template ??) ???
or
... ???
PLZ help me :crazy: :drunk:

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by pcmarket » Sat Feb 07, 2015 1:49 pm

??? ??? ??? ??? ??? ???

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by pcmarket » Mon Feb 09, 2015 2:58 pm

??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by pcmarket » Sun Feb 15, 2015 8:11 pm

I add this code

Code: Select all

 'post' => $result['location'],
after

Code: Select all

 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']),
in root/catalog/controler/module/lastest.php

and

I use root/catalog/view/theme/your theme/template/module/lastest.tpl this cod

Code: Select all

<div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a><a href="<?php echo $product['post']; ?>" target="_blank" onclick="jwindow.open('<?php echo $pardakht_link; ?>'); return false;" class="button"><span>post payment</span></a>

how I can add this cod and sku cod for any products page when click him Go to sku specific page!

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by victorj » Sun Feb 15, 2015 11:07 pm


Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by pcmarket » Mon Feb 16, 2015 12:03 am

I want to change the products code put this Button O0

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by pcmarket » Sun Feb 22, 2015 9:47 pm

??? ??? ??? ??? ??? ??? ??? ??? ??? ???

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by fabius » Mon Mar 02, 2015 3:28 am


Newbie

Posts

Joined
Mon Sep 09, 2013 1:51 am
Who is online

Users browsing this forum: Amazon [Bot], Semrush [Bot] and 16 guests