wpatrykw Posted June 2, 2014 Share Posted June 2, 2014 (edited) Witam, mam problem z PS 1.6.0.6. z własnym templatem. Mianowicie gdy na stronie głównej klikam dodaj do koszyka to nic się nie dzieje. Chcąc zwęszyć problem włączyłem Firebuga i mam komunikat w konsoli: Odpowiedź: {"hasError":true,"errors":["Product not found","This product is no longer available."]} Parametry POST'a: add 1 ajax true controller cart id_product undefined qty 1 token 3944d63ac991cc5d73f2c36c9b4c2263 Jak widać mam id_product: undefined czyli nie pobiera i przekazuje poprawie ID produktu. Wiecie może jak to naprawić? Sklep wisi pod adresem: www.kup-czesci.pl Z góry wielkie dzięki za udzielenie pomocy Edited June 2, 2014 by wpatrykw (see edit history) Link to comment Share on other sites More sharing options...
0 vekia Posted June 2, 2014 Share Posted June 2, 2014 możesz pokazać zawartość homefeatured.tpl ? ( z katalogu z modułem homefeatured ) Link to comment Share on other sites More sharing options...
0 wpatrykw Posted June 3, 2014 Author Share Posted June 3, 2014 homefeatured.tpl <!-- MODULE Home Featured Products --> <div id="recommended-products_block_center" class="block products_block clearfix"> <p class="title_block">{l s='Polecane produkty' mod='homefeatured'}</p> {if isset($products) AND $products} <div class="block_content"> {assign var='liHeight' value=250} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight} <ul id="recommended-products-list"> {foreach from=$products item=product name=homeFeaturedProducts} {math equation="(total%perLine)" total=$smarty.foreach.homeFeaturedProducts.total perLine=$nbItemsPerLine assign=totModulo} {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if} <li> <a href="{$product.link|escape:'html'}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='homefeatured'}</span>{/if}</a> <p class="s_title_block"><a href="{$product.link|escape:'html'}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></p> <div class="product_desc"><a href="{$product.link|escape:'html'}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:65:'...'}</a></div> <div> {*<a class="lnk_more" href="{$product.link|escape:'html'}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a>*} {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">Do koszyka</a> {else} <span class="exclusive">{l s='Do koszyka' mod='homefeatured'}</span> {/if} {else} <div style="height:23px;"></div> {/if} </div> </li> {/foreach} </ul> </div> {else} <div class="block_content"> <p>{l s='No featured products' mod='homefeatured'}</p> </div> {/if} </div> <!-- /MODULE Home Featured Products --> Wydaje mi się że po wejściu do jakiegoś produktu też powinno pojawiać się takie ładne okienko po kliknięciu Dodaj do koszyka. np. tutuaj http://www.kup-czesci.pl/glowna/28-pioro-wycieraczki-tyl.html Link to comment Share on other sites More sharing options...
Question
wpatrykw
Witam,
mam problem z PS 1.6.0.6. z własnym templatem.
Mianowicie gdy na stronie głównej klikam dodaj do koszyka to nic się nie dzieje.
Chcąc zwęszyć problem włączyłem Firebuga i mam komunikat w konsoli:
Odpowiedź:
Parametry POST'a:
Jak widać mam id_product: undefined czyli nie pobiera i przekazuje poprawie ID produktu.
Wiecie może jak to naprawić?
Sklep wisi pod adresem:
www.kup-czesci.pl
Z góry wielkie dzięki za udzielenie pomocy
Edited by wpatrykw (see edit history)
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now