Jump to content

Product images in blockcart!


Recommended Posts

Hello!

 

So i try to add product images into blockcart in header.

I added in blockcart.tpl this:

<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small_default')}" position="left" title="{$product.name|escape:htmlall:'UTF-8'|truncate:35}"/>

 

Its kinda working, beacuse when i add stuff to cart it doesnt show cart, but when i refresh page it starts showing.

 

When adding to cart (not refreshing page):

1zqzn1w.jpg

 

After refreshing:

30wpjtl.jpg

 

 

 

How can i fix that its automaticly images and no need to refresh page?

 

How can i fix so it looks better, im currently using "position: left" else it would be even more messed up?

Link to comment
Share on other sites

You need to add it in the ajax-cart.js file as well, as the html of the product you added is created on the fly by javascript

 

cheers :)

 

Writing a short tip about this, i'll try to publish it today

Link to comment
Share on other sites

You need to add it in the ajax-cart.js file as well, as the html of the product you added is created on the fly by javascript

 

cheers :)

 

Writing a short tip about this, i'll try to publish it today

 

I was sure it was somehing like that, but since im really bad with javascript i hopes its not :/

Thank you, i will wait for you tip and hope it can help me! :)

 

btw, how can i fix the layout, since its kinda messed up :)?

Link to comment
Share on other sites

I didn't dive into that since I just wrote a quick tip. I would suggest a complete rewrite of it, as I don't like the dt/dd thing there

 

Ohh ok, what you mean with "dt/dd" i found this code in the forum and used it, what should i write in .js file? :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...