Developer forum

Forum » Ecommerce - Standard features » Not all links in minicard updates

Not all links in minicard updates

Jesper Friis
Reply

Hi

The site with the problem is: http://www.bulow-duus.dk

 

Can anyone tell me why my minicart doesn't update all 4 links, when I put an item in the cart.

Only two of the links goes to the cart page (indkoebskurv) while the others ("Tjek ud" and the image) still goes to card-empty page (indkoebskurv-tom)

 

If I clear the cache or refresh the site after putting an item in the cart all the link works fine.

My if statement looks like this:

<div id="kurv"><!--@If(Ecom:Order.IsEmpty="true")-->
   <a href="Default.aspx?ID=26"><img src="/files/System/bulow/gfx/kurv.png" width="42" height="42"></a>
  <div id="minVogn"><a href="Default.aspx?ID=26">Indkøbskurv</a> <!--<p>Din kurv er tom</p>--><a class="varePris" href="Default.aspx?ID=26">Din kurv er tom</a></div>
  <div id="tjekUd"><a href="Default.aspx?ID=26">Tjek Ud</a></div><!--@EndIf(Ecom:Order.IsEmpty="true")--> 

 
  <!--@If(Ecom:Order.IsEmpty!="true")-->
 <a href="Default.aspx?ID=23"><img src="/files/System/bulow/gfx/kurv.png" width="42" height="42"></a>
<div id="minVogn"><a href="Default.aspx?ID=23">Indkøbskurv</a> <a class="varePris" href="Default.aspx?ID=23"><!--@Ecom:Order.OrderLines.TotalProductQuantity--> vare(r) <!--@Ecom:Order.Price.Price--> <!--@Ecom:Order.Price.CurrencyCode--></a> </div>
<div id="tjekUd"><a href="Default.aspx?ID=23">Tjek Ud</a></div><!--@EndIf(Ecom:Order.IsEmpty!="true")-->
</div>

Thanks

-Jesper

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Jesper

Your Endif seems to be wrong. It is just <!--@EndIf()-->

 
Jesper Friis
Reply

Hi Nicolai and thanks for your reply

 

The problem is still the same with the right <!--@EndIf()-->. 

Hope you have another idea of what the problem could be.

 

thanks

-Jesper

 
Nicolai Høeg Pedersen
Reply

Maybe because my endif was also wrong...?

http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/If-statements.aspx

 
Jesper Friis
Reply

Hi Nicolai

Looks like it should be <!--@EndIf-->.

But it doesn't help and I can't figure it out.

-Jesper

 
Umar Farooq
Reply

Hi Jesper,

you can try this 

<!--@If Defined(Ecom:Order.IsEmpty)-->

<div>your basket is empty</div>

<!--@EndIf(Ecom:Order.IsEmpty)-->

<!--@If Not Defined(Ecom:Order.IsEmpty)-->

<div>your basket have following products</div>

<!--@EndIf(Ecom:Order.IsEmpty)-->

 

Hope it will help 

Regards Umar

 
Jesper Friis
Reply

Hi Umar

Thanks for your reply but it doesn't change anything.

Do you have any other suggestions?

 

Thanks

-Jesper

 
Nicolai Høeg Pedersen
Reply

Hi Jesper

Your site implementation uses AJAX to add stuff to the cart - and at the end of the AJAX call, all links are not updated. It is not the template engine that handles this since the page is not reloaded. If you add a product to the cart and reloads the page, the links are correct. So there is an error in the AJAX callback handler somewhere.

Also, the site does not seem to work as it should in IE.

BR Nicolai

 
Jesper Friis
Reply

Hi Nicolai

Thanks for your answer. The problem is solved.

And you were right I had an error in the AJAX callback handler. It didn't target the right div surrounding all four links.

 

Thanks a lot

-Jesper

 

You must be logged in to post in the forum