Add UTM suggestions apps for buy now button
This commit is contained in:
parent
e0b8fe106a
commit
9f3dec6e84
@ -51,6 +51,18 @@ class Item extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
if (request()->get('utm_source')) {
|
||||
$parameters = request()->all();
|
||||
|
||||
$character = '?';
|
||||
|
||||
if (strpos($module->action_url, '?') !== false) {
|
||||
$character = '&';
|
||||
}
|
||||
|
||||
$module->action_url .= $character . http_build_query($parameters);
|
||||
}
|
||||
|
||||
return view('modules.item.show', compact('module', 'about', 'installed', 'enable'));
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
@if ($suggestion_modules)
|
||||
@foreach($suggestion_modules as $s_module)
|
||||
<span class="new-button">
|
||||
<a href="{{ url($s_module->action_url) }}" class="btn btn-default btn-sm" target="{{ $s_module->action_target }}"><span class="fa fa-rocket"></span> {{ $s_module->name }}</a>
|
||||
<a href="{{ url($s_module->action_url) . '?' . http_build_query((array) $s_module->action_parameters) }}" class="btn btn-default btn-sm" target="{{ $s_module->action_target }}"><span class="fa fa-rocket"></span> {{ $s_module->name }}</a>
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user