$item->buy_link is empty, so no items can be added to the cart

08.01.2021 18:33
#1
kreutzjj
Joomshopping forum user no avatar
Name: kreutz
08.01.2021
Сообщения: 13
Quote
$item->buy_link is empty, so no items can be added to the cart

Hello there,

i have some sliders with products on our website. The "add to cart" button is displayed but does not work.
After some investigating i found the reason why.
the link for the button is empty,

For example:
<a class="button_buy" title="Add to Cart" href="/">In den Warenkorb</a>

The variable $item->buy_link is empty, so the link is empty... but why?
Does anyone else has this problems?

I tried to fix it with somethink like this:

if($item->buy_link==""){
$item->buy_link = "index.php/artikelmenue/cart/view/add?category_id=".$item->category_id."&product_id=".$item->product_id;
}

than i get a redirektion to the shopping cart but the item is not added...
Has anyone a solution or a workaournd for me?


Website Url: www.stonesunlimited.de
 
09.01.2021 11:39
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Сообщения: 25853
Quote
Aw: $item->buy_link is empty, so no items can be added to the cart

SEFLink('index.php?option=com_jshopping&controller=cart&task=add&category_id='.$category_id.'&product_id='.$product_id, 1)


Module name?


Последнее изменение: 09.01.2021 11:39
 
09.01.2021 17:08
#3
kreutzjj
Joomshopping forum user no avatar
Name: kreutz
08.01.2021
Сообщения: 13
Quote
Aw: $item->buy_link is empty, so no items can be added to the cart

perfekt!

Modul: js-slider the item-buy-link was always empty... but since categorie_id and product_id where set

i added something like that:

if($item->buy_link==""){
$item->buy_link = SEFLink('index.php?option=com_jshopping&controller=cart&task=add&category_id='.$item->category_id.'&product_id='.$item->product_id, 1);
}

and it works great.
THANKS

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.