Jump to content

restaller

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Activity
    Freelancer

restaller's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. I did not see the message. I have not used any drivers, then I'll put more information, if it's any good
  2. Hello everyone, I am trying to insert an Add to cart button into the block of new products of the displayleftcolumn position, which is displayed on the category pages. A "Product not found" message is displayed. But you can not get the value of the product id in the attribute data-id-product = "..." The code is located in prestashop\themes\default-bootstrap\modules\blockviewed\blockviewed.tpl: <a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart, true')}" rel="nofollow" title="{l s='Add to Cart'}" data-id-product="..." data-id-product-attribute="0"> <span>{l s='Add to cart' mod='blockviewed'}</span> </a> The data-id-product value is empty because I do not know what to use inside. Would anyone know what to use to get the product id?
  3. Hello everyone!, I have integrated Wordpress in prestashop, but I have a single problem. The variable {$ js_def} does not work within this conditional {if (is_callable ('bloginfo'))} This conditional I use it to load .js needed, only in the pages of the blog. But as I say, so the variable does not work well. So I've used this: {if (is_callable ('bloginfo'))} <script type = "text / javascript" src = "{$ js_dir} def.js"> </ script> {foreach from = $ js_files item = js_uri} <script type = "text / javascript" src = "{$ js_uri | escape: 'html': 'UTF-8'}"> </ script> {/ foreach} {/ if} I make a call to the code that I have inserted into a file, but of this form, the cart block fails if I select "Move javascript at the end" in Advanced parameters -> Performance
  4. Hi, Nemo. You would be kind enough to solve a little doubt I have. In the Customer class there is a method called getDefaultGroupId (), this method has the $ id_customer parameter. How could I call this method correctly to get its result? With the getBoughtProducts () method I had it easy because it has no parameter, but with getDefaultGroupId () I could not get its result because I did not know how to call this method. I hope you have understood me.
  5. Thanks for answering Nemo. What I wanted to do is create a content in the blockbanner module, and that this content would only be visible if a customer has purchased an item. Thanks to your post I saw the light. I used the getBoughtProducts function like this: $this->smarty->assign('has_bought', $this->context->customer->getBoughtProducts()); And then in the template like this: {if !$has_bought} Content... {/if}
  6. Hello everyone, I would like to get a conditional on any template to know if a customer has purchased any item, but I find no variable for this. If someone helps me I would be very grateful. The closest thing I've come across is this: {if !$cookie->isLogged()} But I would like to know whether a customer has bought or not. P.D. I'm sorry if my English is not good
  7. Tengo una duda con Prestashop 1.6 que me encantaría que me ayudarais a resolver. El caso es, que quiero poner un enlace de "Añadir para comparar" en la homepage. El mismo que aparece al sobrevolar el cursor sobre un producto (en las páginas de categoría). Cuando coloco el enlace en la homepage se muestra el siguiente error en la página: Uncaught ReferenceError: comparedProductsIds is not defined. Este error se encuentra en el archivo ../prestashop/themes/default-bootstrap/js/products-comparison.js, línea 112. La variable comparedProductsIds tiene asignada el valor $compared_products, esto puede comprobarse en el archivo product-list.tpl de nuestro tema, al final de este archivo. La variable ($compared_products) proviene del archivo ../prestashop/classes/controller/FrontController , mas o menos en la linea 320. Esta variable es la clave (creo) porque si la borro se produce el mismo error en la página de categoría. El enlace "Añadir para comparar" está preparado para funcionar en este tipo de página, excepto cuando borro la variable $compared_products del archivo FrontController.php, por eso debe ser clave esta variable, no sé si esta variable hay que utilizarla de alguna forma para el homepage. He intentado colocarla en otros controladores con la esperanza de que funcione en el index, pero no hay manera. También podría ser problema del archivo products-comparison.js. Ojalá alguien más entendido que yo pudiera ayudarme. Gracias. P.D: El enlace que he utilizado tiene el mismo código que el de la página de categoría. Eliminando el condicional {if $page_name != 'index'} del archivo product-list.tpl aparecen los mismos enlaces (lista de deseos y comparar) en la homepage, pero tenemos las mismas.
×
×
  • Create New...