Witam, wiem że to dość stary wątek ale bez sensu zaczynać kolejny.
Mam podobny problem jak koledzy wyżej tylko w wersji 1.4.1.0
Mianowicie nie działa mi tylko sortowanie, tzn jak wybieram z listy sortuj po cenie nic się nie dzieje.
przesyłam kod z pliku product-sort.tpl
{if isset($orderby) AND isset($orderway)}
<!-- Sort products -->
{if isset($smarty.get.id_category) && $smarty.get.id_category}
{assign var='request' value=$link->getPaginationLink('category', $category, false, true)}
{elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer}
{assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)}
{elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier}
{assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)}
{else}
{assign var='request' value=$link->getPaginationLink(false, false, false, true)}
{/if}
<script type="text/javascript">
//<![CDATA[
$(document).ready(function()
{
$('#selectPrductSort').change(function()
{
var requestSortProducts = '{$request}';
var splitData = $(this).val().split(':');
{if Module::isInstalled('blocklayered')}
reloadContent();
{else}
document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1];
{/if}
});
});
//]]>
</script>
<form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}">
<p class="select">
<select id="selectPrductSort">
<option value="{$orderbydefault|escape:'htmlall':'UTF-8'}:{$orderwaydefault|escape:'htmlall':'UTF-8'}" {if $orderby eq $orderbydefault}selected="selected"{/if}>{l s='--'}</option>
{if !$PS_CATALOG_MODE}
<option value="price:asc" {if $orderby eq 'price' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Price: lowest first'}</option>
<option value="price:desc" {if $orderby eq 'price' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='Price: highest first'}</option>
{/if}
<option value="name:asc" {if $orderby eq 'name' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Product Name: A to Z'}</option>
<option value="name:desc" {if $orderby eq 'name' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='Product Name: Z to A'}</option>
{if !$PS_CATALOG_MODE}
<option value="quantity:desc" {if $orderby eq 'quantity' AND $orderway eq 'desc'}selected="selected"{/if}>{l s='In-stock first'}</option>
{/if}
</select>
<label for="selectPrductSort">{l s='Sort by'}</label>
</p>
</form>
<!-- /Sort products -->
{/if}
.htaccess
<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on
# URL rewriting rules
RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ //img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ //img/p/$1-$2.jpg [L]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ //img/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L]
RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]
RewriteRule ^page-not-found$ /404.php [QSA,L]
RewriteRule ^address$ /address.php [QSA,L]
RewriteRule ^addresses$ /addresses.php [QSA,L]
RewriteRule ^authentication$ /authentication.php [QSA,L]
RewriteRule ^best-sales$ /best-sales.php [QSA,L]
RewriteRule ^cart$ /cart.php [QSA,L]
RewriteRule ^contact-us$ /contact-form.php [QSA,L]
RewriteRule ^discount$ /discount.php [QSA,L]
RewriteRule ^guest-tracking$ /guest-tracking.php [QSA,L]
RewriteRule ^order-history$ /history.php [QSA,L]
RewriteRule ^identity$ /identity.php [QSA,L]
RewriteRule ^manufacturers$ /manufacturer.php [QSA,L]
RewriteRule ^my-account$ /my-account.php [QSA,L]
RewriteRule ^new-products$ /new-products.php [QSA,L]
RewriteRule ^order$ /order.php [QSA,L]
RewriteRule ^order-follow$ /order-follow.php [QSA,L]
RewriteRule ^quick-order$ /order-opc.php [QSA,L]
RewriteRule ^order-slip$ /order-slip.php [QSA,L]
RewriteRule ^password-recovery$ /password.php [QSA,L]
RewriteRule ^prices-drop$ /prices-drop.php [QSA,L]
RewriteRule ^search$ /search.php [QSA,L]
RewriteRule ^sitemap$ /sitemap.php [QSA,L]
RewriteRule ^stores$ /stores.php [QSA,L]
RewriteRule ^supplier$ /supplier.php [QSA,L]
</IfModule>
# Catch 404 errors
ErrorDocument 404 /404.php
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
FileETag INode MTime Size
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
Proszę o pomoc