Jump to content

aljon ngo

  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
  • Interests
    Programming, Stock Trading
  • Activity

aljon ngo's Achievements


Newbie (1/14)




Community Answers

  1. I have successfully done this in prestashop I studied the thread and created my own version, here is my solution first open controllers/front/CategoryController.php find function assignSubcategories() and replace it with this code. protected function assignSubcategories() { if ($sub_categories = $this->category->getSubCategories($this->context->language->id)) { $subcategory_objects=array(); $this->context->smarty->assign("andr_lang",intval($cookie->id_lang)); foreach ($sub_categories as $subcategory) { $sub=new Category(intval($subcategory['id_category']),intval($cookie->id_lang)); $subcategory_objects[$subcategory['id_category']]=$sub; } //var_dump($subcategory_objects); $this->context->smarty->assign("subcategories_objects",$subcategory_objects); $this->context->smarty->assign(array( 'subcategories' => $sub_categories, 'subcategories_nb_total' => count($sub_categories), 'subcategories_nb_half' => ceil(count($sub_categories) / 2) )); } } 2nd step is to open "your theme"/category.tpl and find this code <div class="content_sortPagiBar clearfix"> <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> <div class="top-pagination-content clearfix"> {include file="./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl"} </div> </div> {include file="./product-list.tpl" products=$products} Replace it with <div class="content_sortPagiBar clearfix"> <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> <div class="top-pagination-content clearfix"> {include file="./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl"} </div> </div> {if isset($subcategories)} {foreach from=$subcategories item=subcategory} {assign var="subcategory_id" value=$subcategory.id_category} {assign var="subcategory_object" value=$subcategories_objects.$subcategory_id} {include file="./product-list-sub.tpl" products=$subcategory_object->getProducts('1','1','100')} {/foreach} {else} {include file="./product-list.tpl" products=$products} {/if} 3rd Step, This is not mentioned in the thread but this is the most important part. copy your product-list.tpl and rename it as product-list-sub.tpl <!-- Products list --> <h4>{$subcategory.name|escape:'htmlall':'UTF-8'}</h4> you can add this code to product-list-sub.tpl to show the name of the category and that's it, Thank you guys.
  2. I know it is the proper way but the problem here is it generate a lot of white space in the background, but if this is the best solution, i think i will go for preferences > images Thanks vekia,
  3. Hello, Can somebody help me in changing the size of my thickbox with watermark. I used the watermark that is default to prestashop 1.6, I manage to edit the product.tpl thickbox to the orignal size by editing this code href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" to href="{$link->getImageLink($product->link_rewrite, $imageIds, '')|escape:'html':'UTF-8'}" I already got my desired size but the problem is the watermark is not working...
  4. Hello samyha,I just receive again an email today regarding 'PayPal Instant Payment Notification Warning ' .. will i just ignore it and wait? or is there something else i have to do in my prestashop? thanks
  5. I also encountered this one recently. does anybody know how did this happen? im using prestashop 1.6 it says that this link is failing www.example.com/modules/paypal/validation.php
  6. thanks i just generated the codes in my controller and it works perfectly fine =)
  7. im using "productTab" and "productTabContent" hook i just enable the cache to 'YES' and select Force compilation under smarty category Yes it is a custom Module
  8. I tried #1 solution but same error occurs. In your #2 solution .. can you explain it further thanks. My module is a product page tab that gives information about the shipping method per product .. this shipping info is only a plain text but it changes depending on the additional_shipping_cost and the product price.. the problem in my module i think is that when i activated the cache.. i cannot use the $product variable that is generated by the product page
  9. i checked out the report from my server provider and found out that there are so many page visit request that is comming from my Backoffice. Do you have any idea what might the backoffice is doing when i am accessing it? or maybe this is a problem of the new version of presta 1.6
  10. Hello guys, I created an Module and it is about the delivery tab . My module works fine but when i enable my cache an error occurs. Note that i already clear my cache at Back office and manually in the folder but still same error occurs Notice: Undefined index: product in root/cache/smarty/compile/0b/95/b2/0b95b2da34be544dfa9466aa879d8aa6c52c985e.file.shippingtab.tpl.php on line 34Notice: Im not sure but i think it is because the var $product that is generated by the ProductController.php {if $product->additional_shipping_cost == 0} code {else} {if $product->price|string_format:"%.2f" >= 10000} code {else} code {convertPrice price=$product->additional_shipping_cost} {/if} {/if} any suggestion how can i solve this problem? or code?
  11. Im sorry but my website is under maintenance mode. So do you think that the cause of the Very high bandwidth consumption is because of the cache? if i enable my cache will it lessen the bandwidth consumption?
  12. Hello, I am having a trouble on finding what is the error on my ps 1.6 .. My hosting provider said that i am consuming to much bandwidth . it consumes 4gb / month considering that my website only have an 5 - 20 visits per day. *please note that i need to disable the cache because my script in product.tpl is not working if the cache is enable. i already deleted manualy the cache but same error occurs when cache is on my settings are - Recompile templates if the files have been updated - Cache disable CCC -Smart cache for CSS NO - i need to off this because it also ruins my css -Smart cache for JavaScript Yes Minify HTML Yes -Compress inline JavaScript in HTML Yes -Apache optimization Yes
  13. Thanks i am finding a tutorial about tools:: but i think i can now review the functions in tool.php actually i found other way to pass the product reference, i output it in my smarty template and pass it again from my smarty template to my desired destination..
  14. Im wondering where can i find all the Tools::getValue list and how is this working, is there other function that is useful other than this? for example i want to get the product reference and generate it in my controller.php
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More