× Здесь вы можете свободно общаться на русском языке. Просим отнестись с пониманием к тому, что мы не разговариваем на этом языке и не можем осуществлять поддержку на нем.

Код кнопки " В корзину"

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #181822

-- HikaShop version -- : 2.1.0
-- Joomla version -- : 3.2
-- PHP version -- : 5

Всем привет!
столкнулся с проблемой, хочу добавить кнопку прямо в материал, есть привязка товара но нет добавить кнопку " в корзину" кто то сталкивался с подобной проблемой и как ее решить. Если есть код отдельно кнопки, буду признателен!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
9 years 4 months ago #181838

Hi,

I moved your question into the Russian section of the forum.
Please understand that we do not speak Russian at HikaShop and we can't offer support in Russian.
If you want support from the HikaShop team, please make a new post in English in the appropriate section.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: MaxP

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #181842

Sorry,I thought that I was writing on the Russian forum!

Please Log in or Create an account to join the conversation.

  • Posts: 2293
  • Thank you received: 315
9 years 4 months ago #181845

Третья опция "КОрзина" по идее должна рисовать кнопку "в корзину"
вроде так


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #181848

Нет, она ставит просто значок корзины, пробовал.

Please Log in or Create an account to join the conversation.

  • Posts: 2293
  • Thank you received: 315
9 years 4 months ago #181864

судя по документации должен ставить именно кнопку
www.hikashop.com/support/documentation/1...-product-insert.html

можно в принципе переопределить сам код кнопки, в хика есть такой механизм. Если есть определенные навыки в php - то могу подсказать куда рыть


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #181882

Спасибо, я уже нашел как это сделать.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #181885

Еще вопрос, а как добавить варианты к товары в hikashop?

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #181951

судя по документации должен ставить именно кнопку
www.hikashop.com/support/documentation/1...-product-insert.html

можно в принципе переопределить сам код кнопки, в хика есть такой механизм. Если есть определенные навыки в php - то могу подсказать куда рыть



Да, мне пригодиться на будущее, можешь скинуть?

Last edit: 9 years 4 months ago by MaxP.

Please Log in or Create an account to join the conversation.

  • Posts: 2293
  • Thank you received: 315
9 years 4 months ago #182260

Во-первых если ты решил вопрос, то напиши как именно решил.
А то вопрос задан,а как было решено - не написал. Может еще кто столкнется...

Насчет кнопки вот:

For the buttons:

You need to create the file templates/YOUR_TEMPLATE/html/hikashop_button.php. We invite you to look at the file administrator/components/com_hikashop/helpers/cart.php for the default code of the function you will define in it. In that file, you will be able to define the function:

hikashop_button_render($map,$name,$ajax,$options,$url) => The $map variable contains the name of the button, the $name variable contains the value of the button (what the user see). The $ajax variable can contains additional attributes for the HTML element of your button as well as the $options attribute. The $url variable can contain a URL where to redirect when the button is used as a link. You need to return the whole HTML of your buttons at the end of your function.


www.hikashop.com/support/support/documen...r-documentation.html


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

Please Log in or Create an account to join the conversation.

  • Posts: 2293
  • Thank you received: 315
9 years 4 months ago #182261

краткий перевод - вам надо создать файл templates/YOUR_TEMPLATE/html/hikashop_button.php
в папке /templates/ваш_шаблон/html/hikashop_button.php

в качестве образца можете использовать administrator/components/com_hikashop/helpers/cart.php

на самом деле как образец его можно использовать с трудом....

можете использовать для начала мой файл:

его можно просто скопировать и затем изучать.:

<?php
function hikashop_button_render ($map,$name,$ajax,$options,$url,$classname) {
$url = 'href="'.$url.'" ';
if ($map=="choose_options"){
$html='<a class="button-primary'.$classname.'" '.$options.' '.$url.$ajax.'><i class="fa  fa-shopping-cart "></i> '.$name.'</a>';
} elseif  ($map=="add") {
$html='<a class="button-primary'.$classname.'" '.$options.' '.$url.$ajax.'><i class="fa fa-shopping-cart "></i> '.$name.'</a>';
} else {
$html='<a class="button-primary widthauto'.$classname.'" '.$options.' '.$url.$ajax.'>'.$name.'</a>';
};

return $html;
}
?>

переменная $map здесь определяет где именно кнопка появляется... В категории, на странице товара или же в корзине...


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!
Last edit: 9 years 4 months ago by progreccor.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 4 months ago #182387

Все очень просто, в товаре есть кнопка (HTML ссылка "Добавить в корзину" ), создал товар, с помощью HTML ссылки привязал кнопку в материале с товаром Hikashop

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
7 years 4 months ago #257915

Здравствуйте я разместил кнопку вот так {product 1000|cart|pricedis3|pricetax1} хотелось бы также разместить характеристику товара (варианты) но таким способом не пойму как. При чем если у товара есть варианты выбора то кнопка корзины меняется на сделайте выбор. Если нет способа в материал вставить характеристики то может быть можно вставить просто коменты к товару что бы покупатель мог сам написать.

Please Log in or Create an account to join the conversation.

Moderators: progreccor
Time to create page: 0.091 seconds
Powered by Kunena Forum