Jump to content

[Free Modules] New Products Block New Layout


Recommended Posts

This is a redesign of the native new products block. (see image below)

 

Its based on the Prestashop Default theme, so will probably need a few tweaks for customised themes.

 

Any problems post here and I will see what I can do.

 

Translation issues fixed

 

New module for v1.5 http://www.prestashop.com/forums/index.php?/topic/235588-new-products-block2-for-15/page__view__findpost__p__1160496

post-10772-0-72517500-1335434717_thumb.jpg

New Products Block Modules redesigned.zip

  • Like 11

Share this post


Link to post
Share on other sites
  • 2 weeks later...

i installed it but dosent show up in the Backend ... PS 1.4.5.1

Then you didn't install it properly, is it visible in the modules folder on your server?

  • Like 1

Share this post


Link to post
Share on other sites

Hello Mr. jhnstcks, Can i display the price instead of the short description? I tried to modify the TPL file, but no luck. Thank you :)

 

Did you turn force compile on and turn cache off on preferences>performance tab?

Share this post


Link to post
Share on other sites

Replace line 41 with

<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</dd>

 

Oh and you might need to add some styling also

Share this post


Link to post
Share on other sites
  • 3 weeks later...
  • 2 weeks later...

Works so well it really should be the default setting in prestashop. - Thanks so much. How hard is it to do the same with the top sellers listings also? cheers.

Share this post


Link to post
Share on other sites
  • 2 weeks later...

I had a issue with the background url as with the way it was I got the ? mark background.

Strange thing is I have used this same code to pull images from the img folder with no issues.

 

Here is what the file has now:

.new_products_block ul {padding-top:10px; background: url("../img/block_bg.jpg") repeat-x scroll left bottom #F1F2F4}

 

Changed to:

.new_products_block ul {padding-top:10px; background: url("../../../img/block_bg.jpg") repeat-x scroll left bottom #F1F2F4}

 

added the ../../ and all works fine, just thought I would post in case anyone else has this same issue.

applied to both instances of background url.

Share this post


Link to post
Share on other sites

Update to above all of the sudden that stoped working and the ? marks were back so I fixed it once and for all:

 

 

.new_products_block ul {padding-top:10px; background: white}

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...

I guys i already insert one file with my language country, and i put all fields in my language, but in the front page not change nothing, when i make the refresh, stay always in English, something is blocking this part.

 

Can you tell me how to change this plz..

 

Nice Block tks..

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 4 weeks later...

Hello!

I have a problem with the translation of this module. I translated it in my admin area as "default - blocknewproducts2". This doesn't solved my problem so I copyed the blocnewproducts2.tpl file to my own theme folder '/mytheme/modules/blocnewproducts2'

After that i translated it again in the translation area as "mytheme - blocknewproducts2". The php file for the translation was created correctly, but the language of the module on my page is still english. I tried to reset the module, without luck.

(Tried with 3 web browsers, its not browser refresh problem)

Share this post


Link to post
Share on other sites

Hello tdr170,

 

Update to above all of the sudden that stoped working and the ? marks were back so I fixed it once and for all:

 

 

.new_products_block ul {padding-top:10px; background: white}

 

This module was working perfect for me then I moved to new server and now have this:

http://74.117.145.119/~tooters/

 

I have adjusted the code to your posting and forced recompile, etc.. Do you have any other advice?

 

Thanks so much!

Share this post


Link to post
Share on other sites

In the tpl file blocknewproducts2.tpl find all instance of mod='blocknewproducts' and change too mod='blocknewproducts2'

 

That will enable translations correctly.

 

unfortunately this change did not fix the problem. I changed all like you said in mod='blocknewproducts2', nothing happened. May there be another thing to fix for it to work?

Share this post


Link to post
Share on other sites

Whell that works for me but i've done and something more.

 

I changed the .css file to blocknewproducts2.css and change all instances i found in the files to point to the new filename.

 

So the problem is the filename redirections inside the files.

Check that everything look in the correct file names and it will work.

 

Or try my version!

blocknewproducts2.zip

Share this post


Link to post
Share on other sites

unfortunately this change did not fix the problem. I changed all like you said in mod='blocknewproducts2', nothing happened. May there be another thing to fix for it to work?

 

No there is no other fix, as this is the fix. Did you go back and do the translations again using the translations tool? Did you force compile and turn off cache?

Share this post


Link to post
Share on other sites

Hi jhnstcks,

 

i installed this module at my site (running prestashop 1.4.8.3), and it worked nice, but i´m trying to translate it to Portuguese but it´s not working..

 

I translated the "Translation of installed modules", i also changed/translated the /modules/blocknewproducts2/blocknewproducts2.tpl (changed "New products" to "Novos produtos") but still show in english...

 

When i click to see all new products, it redirect correct, to mysite.com/novos-produtos instead of mysite.com/new-products (which is fine!)..

 

Any idea how to translate it?

 

All the best

James

 

**** UPDATE****

I just disabled cache and forced compile and now it´s working nice! My fault, sorry.

Edited by jamis007 (see edit history)

Share this post


Link to post
Share on other sites
  • 3 weeks later...

I made change of css, here are:

 

.new_products_block ul {padding-top:10px; background: #F1F2F4} 
.new_products_block ul li {float: left; margin:1px 10px}

.new_products_block h5 a {font-weight:bold; float:right;margin-top:6px;font-size: 9pxmargin-bottom: 4px;width:107px}
.new_products_block dl dt a {font-weight:bold}

.new_products_block dl {clear:both;padding:2px 0 0 0; background:#F1F2F4}
.new_products_block dl dt {margin:9px 0 0 0}
.new_products_block dl dd a {font-size: 10px;}
.new_products_block dl dd a img {}
.new_products_block dd {height:1em;margin-left:84px}
.new_products_block p a.button_large {margin:0 0 0 5px;}
.new_products_block img {height:80px;width:80px}

 

After that, no watermark ? again :lol:

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi, I just installed this module but then I got the following error when trying to register an account:

 

TECHNICAL ERROR: unable to save account

Details:

Error thrown: [objectXMLHttpRequest]

Text status: parsererror

 

I then disabled the module and the problem was solved. Any ideas?

 

PS 1.4.9

 

Cheers

 

EDIT: Just reinstalled the module and everything works fine. Thanks for sharing.

Edited by pel024 (see edit history)

Share this post


Link to post
Share on other sites

Thanks pel024.

 

I have install it in PS 1.5.2 and works fine, I have changed too that instead show the short description, show the price.

 

Only two thinks, please see the image attached, prices are nos aligned to title, they began more to the left, can I align them just under the description?, I guess that has to be done in the CSS file but I am not sure.

 

I will like too to set a line jump between the pcrice and the manufacturer in order not to be all so close.

 

The other thing is that I am agree with mohsart that pictures are a little bit blurry in PS 1.5.2, how can this be solved?

 

Many thanks.

post-378827-0-35704200-1353763122_thumb.jpg

Share this post


Link to post
Share on other sites

Hello,

 

Thanks fo rthe block is awesome.

 

I have changed description to price but I need the price to jump one line down, make the font bigger and bold. How can it be done?, I have played with the CSS and I cannot see any changes.

 

Please see the image attached

 

Thanks

Share this post


Link to post
Share on other sites

I did the change recommendation of the post #8 which change the description to show the price and it shows the same price in all the items.

 

Any ideas to fix this for showing the correct prices of each product?

 

Thanks

Share this post


Link to post
Share on other sites

This mod is just what i am looking for but all i get is no images and it is jumbled up

I have almost new install of 1.5.2

I have tried a number of posable fixes and tried johnnnyme version still same thing.

To view goto www.projectpb.com/shop or use image i added

 

Thanks

Jeff

 

post-80008-0-31775700-1354516459_thumb.jpg

Edited by projectpb (see edit history)

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 5 weeks later...

Hello,

 

Module is working fine for me with the exception that if I click "Show all New Products" button, it show me the same number of products shown in the home page and configured into de module.

 

Any ideas?

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 1 month later...

Hi, thanks for your module. I have installed your module and changed line 41 as above to display product price instead of short description. However all the products show the same price, can you please help?

 

Ivy

Share this post


Link to post
Share on other sites
  • 3 weeks later...

I have a warning "Warning: Function addCSS() is deprecated [...]"

Should this be changed, and if so to what?

Edit PS 1.5.2

 

/Mats

 

For anyone receiving this error message you need to change line 116 of blocknewproducts2.php as follows:

 

Change this:

Tools::addCSS(($this->_path).'blocknewproducts.css', 'all');

 

To this:

$this->context->controller->addCSS(($this->_path).'blocknewproducts.css', 'all');

  • Like 1

Share this post


Link to post
Share on other sites
  • 3 weeks later...
  • 5 months later...

For you who are having a same price appearing problem, please change to code from:

<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </dd>

to

<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{if !$priceDisplay}{convertPrice price=$newproduct.price}{else}{convertPrice price=$newproduct.price_tax_exc}{/if} </dd>

Share this post


Link to post
Share on other sites
  • 4 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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