Jump to content
thirty bees forum

d3s1gn3r

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by d3s1gn3r

  1. Hi guys, i was wondering how can i add the product quantity field and increase, decrease buttons per product in the dropdown cart ? I added the code below inside the /themes/community-theme-default/modules/blockcart/includes/dropdown.tpl file but worked partially. Here is the code: <td class="cart_quantity text-center" data-title="{l s='Quantity'}"> {if (isset($cannotModify) && $cannotModify == 1)} <span> {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} {$product.customizationQuantityTotal} {else} {$product.cart_quantity-$quantityDisplayed} {/if} </span> {else} {if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0} <span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}" >{$product.customizationQuantityTotal}</span> {/if} {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} <input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}_hidden"> <input size="2" type="text" autocomplete="off" class="cart_quantity_input form-control text-center" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}"> <div class="cart_quantity_button clearfix"> {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} <a rel="nofollow" class="cart_quantity_down btn btn-default button-minus" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&op=down&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Subtract'}"> <i class="icon icon-fw icon-minus"></i> </a> {else} <a class="cart_quantity_down btn btn-default button-minus disabled" href="#" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" title="{l s='You must purchase a minimum of %d of this product.' sprintf=$product.minimal_quantity}"> <i class="icon icon-fw icon-minus"></i> </a> {/if} <a rel="nofollow" class="cart_quantity_up btn btn-default button-plus" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Add'}"><i class="icon icon-fw icon-plus"></i></a> </div> {/if} {/if} </td> The problem is that it works only if you visit checkout page. I noticed that this happens because the (+, -) quantity buttons need to call some events that are included in the file: /themes/community-theme-default/js/cart-summary.js, but the file cart-summary.js is called only when you visit the checkout page. How can i make this work as i need it on my custom theme? Thanks in advance.
  2. Thanks a lot @datakick . I was aware about that module but even when i was adding there my copyright info, i couldn't see anything at the footer bottom . My issue was that i have had unhooked the module by accident from "Header" Hook position. Now it works perfect. Hope this will help also other users with the same issue.
  3. Hi, i am looking for a way to display a copyright notice at the footer of community theme but cant figure out how to do it. In the file "footer.tpl" of the community theme there is this code: {if !empty($ctheme.footer.copyright.display)} <div id="copyright-footer" role="contentinfo"> {$ctheme.footer.copyright.html} </div> {/if} But where in the world is this "copyright.display" in the back office so i can enter there my copyright info ??? I searched up and down the BO settings but didn't find anything similar to copyright info ! Any help would be much appreciated. Thanks
  4. @datakick thanks for your answer. Now it makes more sense to me why 30bees is way much better than Prestashop. Actually i will stick for sure with 30bees only. Almost only 3-4 days working with it and i have to say that i love it. Clean code, Fast Back End, Easy to use. Now i build my own theme 😉
  5. I m not quite sure if this is the right place to post this question but i would like to ask with which version of Prestashop is 30bees compatible for both themes and modules. 1.6 or 1.7 ??? Thanks in advance.
  6. Nice idea. Thank you @the.rampage.rado I'm very new on this and trying to learn how the BO works. Yesterday i started to build my own theme. Smarty is easy to use and 30bees Back office is way much faster than Prestashop's BO. I just felt in love with the whole project. Once again thank you for your valuable suggestions.
  7. I think i just found it. Accessories field is for adding related products 😉
  8. I cant find how i can add related products to a single product in BO. Am i missing something, or this function doesn't exist in Thirty Bees ???
  9. Hi to everyone. This is my first post here. Earlier today i downloaded and installed the Thirty bees platform and i have to confess that i m very satisfied so i started to build my own custom theme based on the "Default community theme". What i need is to make the "ADD TO CART" button of the fancy popup product behave exactly as in the product page. For example when i view a product in the product page the "ADD TO CART" button has an ajax event that add this product in the cart using ajax. But when i click the "ADD TO CART" button when i view a product inside the fancy popup window then it redirects to the product page. I found the ajax code that is responsible for the ajaxified add to cart event but i dont know how can i apply it to the fancy modal. The weird is that the "ADD TO CART " button inside the fancy modal window and the one in the product page are exactly the same but it call the ajax event only in the product page !! Here is the code in the file themes/community-theme-default/js/modules/blockcart/ajax-cart.js if ($('.cart_block').length) { $(document).off('click', '#add_to_cart button').on('click', '#add_to_cart button', function(e) { e.preventDefault(); ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); }); } I am struggling to find a solution for the last 5 hours so any help from the community would be very much appreciated. UPDATE 1: I see that if i remove the first and the last line of code it works the way i want to. So the code will be: $(document).off('click', '#add_to_cart button').on('click', '#add_to_cart button', function(e) { e.preventDefault(); ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); }); I can see that the code search if there is the text "cart_block" inside the class and apply the ajax event only in this case. My question is now if is safe to comment the line i mentioned above or it would be better to add a new condition with a new class. I think that the second is better but i dont know exactly where to add that class as there is oonly one "ADD TO CART BUTTON" for both fancy modal product and product page. If i am not wrong i think that fancy modal is just an iframe which contains the product page itself. Right?
×
×
  • Create New...