//
This commit is contained in:
@@ -231,8 +231,8 @@ form#product, form#access_form{ background-color:#ebedf4; border:1px solid #cc
|
||||
#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;}
|
||||
#moduleContainer .moduleDesc p.desc { color:#666; font-size:12px; display:block; clear:both;}
|
||||
#moduleContainer .setup {background-color:#6db300; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;}
|
||||
#moduleContainer .setup.non-install { background-color:#ec7000;}
|
||||
#moduleContainer .setup.top-ranking { background-color: #ec2b25;}
|
||||
#moduleContainer .setup.non-install { border: solid 1px #ec7000; background-color: #FFCC99; color: #ec7000}
|
||||
#moduleContainer .setup.must-have { background-color: #ec7000;}
|
||||
#moduleContainer .setup.off{ background-color:#ccc;}
|
||||
#moduleContainer .row-actions-module span { padding-right:5px;}
|
||||
#moduleContainer .row-actions-module span a { font-size:12px;}
|
||||
|
||||
@@ -87,8 +87,9 @@
|
||||
|
||||
<select name="module_type" id="module_type_filter" {if $showTypeModules ne 'allModules' && $showTypeModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
|
||||
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Native Modules'}</option>
|
||||
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules'}</option>
|
||||
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Free Modules'}</option>
|
||||
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules (Free)'}</option>
|
||||
<option value="mustHaveModules" {if $showTypeModules eq 'mustHaveModules'}selected="selected"{/if}>{l s='Must Have'}</option>
|
||||
{if isset($logged_on_addons)}<option value="addonsModules" {if $showTypeModules eq 'addonsModules'}selected="selected"{/if}>{l s='Modules purchased on Addons'}</option>{/if}
|
||||
<optgroup label="{l s='Authors'}">
|
||||
{foreach from=$list_modules_authors key=module_author item=status}
|
||||
|
||||
@@ -49,13 +49,14 @@
|
||||
<td>
|
||||
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
||||
<h3>{$module->displayName}
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<span class="setup must-have">{l s='Must Have'}</span>
|
||||
{else}
|
||||
<span class="setup non-install">{l s='Not installed'}</span>
|
||||
{/if}
|
||||
{if isset($module->type) && $module->type == 'addonsTopRanking'}
|
||||
<span class="setup top-ranking">{l s='Top Ranking'}</span>
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
|
||||
{else}
|
||||
<span class="setup non-install">{l s='Not installed'}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</h3>
|
||||
<div class="metadata">
|
||||
@@ -85,9 +86,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<ul id="list-action-button">
|
||||
{if isset($module->type) && $module->type == 'addonsTopRanking'}
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<li>
|
||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span>{l s='Buy it'} - {displayPrice price=$module->price currency=$module->id_currency}</span></a>
|
||||
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.gif"> {displayPrice price=$module->price currency=$module->id_currency}</span></a>
|
||||
</li>
|
||||
{else}
|
||||
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
||||
|
||||
@@ -126,7 +126,7 @@ abstract class ModuleCore
|
||||
|
||||
const CACHE_FILE_CUSTOMER_MODULES_LIST = '/config/xml/customer_modules_list.xml';
|
||||
|
||||
const CACHE_FILE_TOP_RANKING_MODULES_LIST = '/config/xml/top_ranking_modules_list.xml';
|
||||
const CACHE_FILE_MUST_HAVE_MODULES_LIST = '/config/xml/must_have_modules_list.xml';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -1088,7 +1088,7 @@ abstract class ModuleCore
|
||||
$files_list = array(
|
||||
array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
|
||||
array('type' => 'addonsBought', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
|
||||
array('type' => 'addonsTopRanking', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_TOP_RANKING_MODULES_LIST, 'loggedOnAddons' => 0),
|
||||
array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0),
|
||||
);
|
||||
foreach ($files_list as $f)
|
||||
if (file_exists($f['file']) && ($f['loggedOnAddons'] == 0 || $loggedOnAddons))
|
||||
@@ -1135,7 +1135,7 @@ abstract class ModuleCore
|
||||
if (file_exists('../img/tmp/'.md5($modaddons->name).'.jpg'))
|
||||
$item->image = '../img/tmp/'.md5($modaddons->name).'.jpg';
|
||||
}
|
||||
if ($item->type == 'addonsTopRanking')
|
||||
if ($item->type == 'addonsMustHave')
|
||||
{
|
||||
$item->addons_buy_url = strip_tags((string)$modaddons->url);
|
||||
$prices = (array)$modaddons->price;
|
||||
|
||||
@@ -167,11 +167,11 @@ class AdminModulesControllerCore extends AdminController
|
||||
$protocolsList = array('https://' => 443, 'http://' => 80);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=native&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
}
|
||||
if ($request == 'top_ranking')
|
||||
if ($request == 'must-have')
|
||||
{
|
||||
// Define protocol accepted and post data values for this request
|
||||
$protocolsList = array('https://' => 443, 'http://' => 80);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=top_ranking&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=must-have&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
}
|
||||
if ($request == 'customer')
|
||||
{
|
||||
@@ -253,9 +253,9 @@ class AdminModulesControllerCore extends AdminController
|
||||
else
|
||||
$this->status = 'cache';
|
||||
|
||||
if (!$this->isFresh(Module::CACHE_FILE_TOP_RANKING_MODULES_LIST, 86400))
|
||||
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400))
|
||||
{
|
||||
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_TOP_RANKING_MODULES_LIST, $this->addonsRequest('top_ranking')))
|
||||
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, $this->addonsRequest('must-have')))
|
||||
$this->status = 'refresh';
|
||||
else
|
||||
$this->status = 'error';
|
||||
@@ -986,6 +986,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
return true;
|
||||
else if ($show_type_modules == 'addonsModules' && (!isset($module->type) || $module->type != 'addonsBought'))
|
||||
return true;
|
||||
else if ($show_type_modules == 'mustHaveModules' && (!isset($module->type) || $module->type != 'addonsMustHave'))
|
||||
return true;
|
||||
else if ($show_type_modules == 'otherModules' && (in_array($module->name, $this->list_partners_modules) || in_array($module->name, $this->list_natives_modules)))
|
||||
return true;
|
||||
else if (strpos($show_type_modules, 'authorModules[') !== false)
|
||||
|
||||
BIN
img/admin/cart_addons.gif
Executable file
BIN
img/admin/cart_addons.gif
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 265 B |
Reference in New Issue
Block a user