mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
Fixed Home Add Cart Icon
This commit is contained in:
parent
0d5d2e0b7c
commit
af16a58773
@ -161,6 +161,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'advs/delete/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@softDeleteAdv',
|
'advs/delete/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@softDeleteAdv',
|
||||||
'check_user' => 'Visiosoft\AdvsModule\Http\Controller\advsController@checkUser',
|
'check_user' => 'Visiosoft\AdvsModule\Http\Controller\advsController@checkUser',
|
||||||
'keySearch' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@keySearch',
|
'keySearch' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@keySearch',
|
||||||
|
'adv/addCart/{id}' => [
|
||||||
|
'as' => 'adv_AddCart',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@advAddCart',
|
||||||
|
],
|
||||||
'ajax/StockControl' => [
|
'ajax/StockControl' => [
|
||||||
'as' => 'adv_stock_control_ajax',
|
'as' => 'adv_stock_control_ajax',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@stockControl',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@stockControl',
|
||||||
|
|||||||
@ -812,6 +812,22 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function advAddCart($id)
|
||||||
|
{
|
||||||
|
$quantity = 1;
|
||||||
|
$thisModel = new AdvModel();
|
||||||
|
$adv = $thisModel->isAdv($id);
|
||||||
|
$response = array();
|
||||||
|
if ($adv) {
|
||||||
|
$cart = $thisModel->addCart($adv, $quantity);
|
||||||
|
$response['status'] = "success";
|
||||||
|
} else {
|
||||||
|
$response['status'] = "error";
|
||||||
|
$response['msg'] = trans('visiosoft.module.advs::message.error_added_cart');
|
||||||
|
}
|
||||||
|
return redirect('/cart/');
|
||||||
|
}
|
||||||
|
|
||||||
public function addCart(Request $request)
|
public function addCart(Request $request)
|
||||||
{
|
{
|
||||||
$id = $request->id;
|
$id = $request->id;
|
||||||
|
|||||||
@ -146,7 +146,7 @@
|
|||||||
<!-- item-info-right -->
|
<!-- item-info-right -->
|
||||||
<div class="user-option pull-right">
|
<div class="user-option pull-right">
|
||||||
{% if adv.is_get_adv == "1" %}
|
{% if adv.is_get_adv == "1" %}
|
||||||
<a href="#" data-toggle="tooltip" data-placement="top"
|
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
||||||
class="fa fa-shopping-cart"></i> </a>
|
class="fa fa-shopping-cart"></i> </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -235,7 +235,7 @@
|
|||||||
<!-- item-info-right -->
|
<!-- item-info-right -->
|
||||||
<div class="user-option pull-right">
|
<div class="user-option pull-right">
|
||||||
{% if adv.is_get_adv == "1" %}
|
{% if adv.is_get_adv == "1" %}
|
||||||
<a href="#" data-toggle="tooltip" data-placement="top"
|
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ adv.city_name }}, {{ adv.country_name }}"><i
|
title="{{ adv.city_name }}, {{ adv.country_name }}"><i
|
||||||
class="fa fa-shopping-cart"></i> </a>
|
class="fa fa-shopping-cart"></i> </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -297,7 +297,7 @@
|
|||||||
<!-- item-info-right -->
|
<!-- item-info-right -->
|
||||||
<div class="user-option pull-right">
|
<div class="user-option pull-right">
|
||||||
{% if adv.is_get_adv == "1" %}
|
{% if adv.is_get_adv == "1" %}
|
||||||
<a href="#" data-toggle="tooltip" data-placement="top"
|
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
||||||
class="fa fa-shopping-cart"></i> </a>
|
class="fa fa-shopping-cart"></i> </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user