[Skip to main content](#vessel-content)

#   See product in Add to Cart Modal - How?

##

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 4 months ago [\#54757](#54757) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  *[See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#54757 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")* was created by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")*

Hi Guys,

I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...

But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.

What I want is for the product which has been "Add to Cart" to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?

Thank you
Brett

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 4 months ago -  14 years 4 months ago [\#54819](#54819) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#54819 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hi,

Actually, in the popup, you don't know which product was added.

All you can do is load the cart and get the name of the product which was added the latest in the cart. Something like that: Code:

$class = hikashop_get('class.cart'); $cart = $class-&gt;loadFullCart(); $max = null; foreach($cart-&gt;products as $product){ if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){ $max = $product; } } if($max){ $class = hikashop_get('class.product'); $product = $class-&gt;get($max-&gt;product_id); echo $product-&gt;product_name; }

Last edit: 14 years 4 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 4 months ago [\#54867](#54867) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#54867 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hiya Nicolas,

Ah yeah I see how it's working and I've added the code - I can now see the product name... How can I pull more info from the cart though - it would be great if I could get a picture of the item, along with the name and the price - is that possible? I've tried grabbing some of the code from view &gt; checkout &gt; cart but its just breaking the thing - probably because my PHP syntax is poor/ faulty

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 4 months ago [\#54952](#54952) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#54952 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Well, you can do like that: Code:

foreach($cart-&gt;products as $product){ if($product-&gt;product_id!= $max-&gt;product_id) continue; echo $product-&gt;prices[0]-&gt;price_value; $image = reset($row-&gt;images); $height = $this-&gt;config-&gt;get('thumbnail_y'); echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"'); }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 4 months ago [\#55399](#55399) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#55399 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hi Nicolas,

I think I'm doing something wrong here... From what I can see I replace the original snippet from foreach... but then nothing is being echoed back:

&lt;?php
$class = hikashop_get('class.cart');
$cart = $class-&gt;loadFullCart();
$max = null;

foreach($cart-&gt;products as $product){
if($product-&gt;product_id!= $max-&gt;product_id) continue;
echo $product-&gt;prices[0]-&gt;price_value;
$image = reset($row-&gt;images);
$height = $this-&gt;config-&gt;get('thumbnail_y');
echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"');
}

?&gt;

She's not working....

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 4 months ago [\#55499](#55499) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#55499 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

You should not replace it but add it to the other.
See, the $max variable which is used in the second piece of code I gave is initialized in the first piece of code I gave.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 4 months ago [\#55509](#55509) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#55509 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hi Nicolas,

Unfortunately that also has some issues &gt;

Take 1 &gt;

&lt;?php
$class = hikashop_get('class.cart');
$cart = $class-&gt;loadFullCart();
$max = null;
foreach($cart-&gt;products as $product){
if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){
$max = $product;
}
}
if($max){
$class = hikashop_get('class.product');
$product = $class-&gt;get($max-&gt;product_id);
echo $product-&gt;product_name;
}
foreach($cart-&gt;products as $product){
if($product-&gt;product_id!= $max-&gt;product_id) continue;
echo $product-&gt;prices[0]-&gt;price_value;
$image = reset($row-&gt;images);
$height = $this-&gt;config-&gt;get('thumbnail_y');
echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"');
}

?&gt;

Errors:

Strappy Chick2100
Warning: reset() expects parameter 1 to be array, null given in /home/content/97/9350797/html/templates/ds_2/html/com_hikashop/checkout/notice.php on line 44

Fatal error: Call to a member function display() on a non-object in /home/content/97/9350797/html/templates/ds_2/html/com_hikashop/checkout/notice.php on line 46

Take 2 &gt;

&lt;?php
$class = hikashop_get('class.cart');
$cart = $class-&gt;loadFullCart();
$max = null;
foreach($cart-&gt;products as $product){
if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){
$max = $product;
}
}
if($max){
$class = hikashop_get('class.product');
$product = $class-&gt;get($max-&gt;product_id);
echo $product-&gt;product_name;
foreach($cart-&gt;products as $product){
if($product-&gt;product_id!= $max-&gt;product_id) continue;
echo $product-&gt;prices[0]-&gt;price_value;
$image = reset($row-&gt;images);
$height = $this-&gt;config-&gt;get('thumbnail_y');
echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"');
}
}
?&gt;

Errors:

Strappy Chick2400
Warning: reset() expects parameter 1 to be array, null given in /home/content/97/9350797/html/templates/ds_2/html/com_hikashop/checkout/notice.php on line 43

Fatal error: Call to a member function display() on a non-object in /home/content/97/9350797/html/templates/ds_2/html/com_hikashop/checkout/notice.php on line 45

I dont know whats going on here....

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 4 months ago [\#55581](#55581) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#55581 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Take1, the line:
$image = reset($row-&gt;images);

should be:
$image = reset($product-&gt;images);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 4 months ago [\#55642](#55642) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#55642 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

hmmm... Still no joy on this one

Here is my code:

&lt;?php
$class = hikashop_get('class.cart');
$cart = $class-&gt;loadFullCart();
$max = null;
foreach($cart-&gt;products as $product){
if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){
$max = $product;
}
}
if($max){
$class = hikashop_get('class.product');
$product = $class-&gt;get($max-&gt;product_id);
echo $product-&gt;product_name;
}
foreach($cart-&gt;products as $product){
if($product-&gt;product_id!= $max-&gt;product_id) continue;
echo $product-&gt;prices[0]-&gt;price_value;
$image = reset($product-&gt;images);
$height = $this-&gt;config-&gt;get('thumbnail_y');
echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"');
}

?&gt;

here is the error:

Fatal error: Call to a member function display() on a non-object in /home/content/97/9350797/html/templates/ds_2/html/com_hikashop/checkout/notice.php on line 46

Although on the positive side it is now showing price total I think

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 4 months ago [\#55746](#55746) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#55746 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Ah yes, the image helper in not loaded on that view... You need to load it yourself like that:

$this-&gt;image = hikashop_get('helper.image');

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 3 months ago -  14 years 3 months ago [\#56853](#56853) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#56853 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hi Nicolas,

This is great I have it working nicely now - thank you. here is the working code so far:
Code:

&lt;div id="modalcart"&gt; &lt;div class="modalmodel"&gt; &lt;?php $class = hikashop_get('class.cart'); $cart = $class-&gt;loadFullCart(); $max = null; foreach($cart-&gt;products as $product){ if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){ $max = $product; } } if($max){ $class = hikashop_get('class.product'); $product = $class-&gt;get($max-&gt;product_id); echo $product-&gt;product_name; } ?&gt; &lt;/div&gt; &lt;div class="modalprice"&gt;&lt;strong&gt;Price: &lt;/strong&gt; &lt;?php foreach($cart-&gt;products as $product){ if($product-&gt;product_id!= $max-&gt;product_id) continue; echo $product-&gt;prices[0]-&gt;price_value; ?&gt; &lt;/div&gt; &lt;?php $this-&gt;image = hikashop_get('helper.image'); $image = reset($product-&gt;images); $height = $this-&gt;config-&gt;get('thumbnail_y'); echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"'); } ?&gt; &lt;/div&gt; &lt;/div&gt;

I do still have one issue though... If I add a product with options ie. its a shoe site and you could select a black or grey or white shoe - when I add it - in the modal it has a bit of a freak out with the price... please see here &gt; [ heelcrush.com/collection.html](http://heelcrush.com/collection.html) (Click Modern Crimp "BUY ME") Select a size and "BUY ME" in the modal that pops up the price is now crazy &gt;&gt; Price: 300.00000

Please help me ![:)](/media/kunena/emoticons/8.png ":)")

---

Believe in Better

Last edit: 14 years 3 months ago by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 3 months ago -  14 years 3 months ago [\#56879](#56879) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#56879 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Change :
echo $product-&gt;prices[0]-&gt;price_value;

to:
$class = hikashop_get('class.currency');
echo $class-&gt;format($product-&gt;prices[0]-&gt;price_value,$product-&gt;prices[0]-&gt;price_currency_id);

Last edit: 14 years 3 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile"). Reason: fixing code

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 3 months ago [\#56892](#56892) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#56892 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Nah Nicolas, shes not working m8... See here:
Code:

&lt;div id="modalcart"&gt; &lt;div class="modalmodel"&gt; &lt;?php $class = hikashop_get('class.cart'); $cart = $class-&gt;loadFullCart(); $max = null; foreach($cart-&gt;products as $product){ if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){ $max = $product; } } if($max){ $class = hikashop_get('class.product'); $product = $class-&gt;get($max-&gt;product_id); echo $product-&gt;product_name; } ?&gt; &lt;/div&gt; &lt;div class="modalprice"&gt;&lt;strong&gt;Price: &lt;/strong&gt; &lt;?php foreach($cart-&gt;products as $product){ if($product-&gt;product_id!= $max-&gt;product_id) continue; $class = hikashop_get('class.currency'); echo class-&gt;format($product-&gt;prices[0]-&gt;price_value,$product-&gt;prices[0]-&gt;price_currency_id); ?&gt; &lt;/div&gt; &lt;?php $this-&gt;image = hikashop_get('helper.image'); $image = reset($product-&gt;images); $height = $this-&gt;config-&gt;get('thumbnail_y'); echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"'); } ?&gt; &lt;/div&gt; &lt;/div&gt;

I get this error:

Parse error: syntax error, unexpected T_CLASS in /home/content/97/9350797/html/templates/ds_2/html/com_hikashop/checkout/notice.php on line 48

Not sure what this all means is it because there are 2 variables called $class

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86301
- Thank you received: 14273
-
-

14 years 3 months ago [\#56923](#56923) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#56923 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Use that code instead:
$class = hikashop_get('class.currency');
echo $class-&gt;format($product-&gt;prices[0]-&gt;price_value,$product-&gt;prices[0]-&gt;price_currency_id);

The following user(s) said Thank You: [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")**
- [![nowherenowhere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4234.png)](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile") Topic Author
- [ Offline](/forum/user/4234-nowherenowhere)

Less More

- Posts: 152
- Thank you received: 1
-
- [](http://www.originate.co.za)
-

14 years 3 months ago [\#56974](#56974) by [nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")  Replied by *[nowherenowhere](/forum/user/4234-nowherenowhere "View nowherenowhere's Profile")* on topic *[Re: See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#56974 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Yeah that worked well thank you Nicolas ![:)](/media/kunena/emoticons/8.png ":)")

Here is the code for all the other peeps who need it &gt;&gt;
Code:

&lt;div id="modalcart"&gt; &lt;div class="modalmodel"&gt; &lt;?php $class = hikashop_get('class.cart'); $cart = $class-&gt;loadFullCart(); $max = null; foreach($cart-&gt;products as $product){ if($product-&gt;cart_product_modified&gt;@$max-&gt;cart_product_modified){ $max = $product; } } if($max){ $class = hikashop_get('class.product'); $product = $class-&gt;get($max-&gt;product_id); echo $product-&gt;product_name; } ?&gt; &lt;/div&gt; &lt;div class="modalprice"&gt;&lt;strong&gt;Price: &lt;/strong&gt; &lt;?php foreach($cart-&gt;products as $product){ if($product-&gt;product_id!= $max-&gt;product_id) continue; $class = hikashop_get('class.currency'); echo $class-&gt;format($product-&gt;prices[0]-&gt;price_value,$product-&gt;prices[0]-&gt;price_currency_id); ?&gt; &lt;/div&gt; &lt;?php $this-&gt;image = hikashop_get('helper.image'); $image = reset($product-&gt;images); $height = $this-&gt;config-&gt;get('thumbnail_y'); echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"'); } ?&gt; &lt;/div&gt; &lt;/div&gt;

---

Believe in Better

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[janbartos24](/forum/user/29031-janbartos24 "View janbartos24's Profile")**
- [![janbartos24's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29031-janbartos24 "View janbartos24's Profile")
- [ Offline](/forum/user/29031-janbartos24)

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 11 months ago [\#130616](#130616) by [janbartos24](/forum/user/29031-janbartos24 "View janbartos24's Profile")  Replied by *[janbartos24](/forum/user/29031-janbartos24 "View janbartos24's Profile")* on topic *[See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#130616 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hello.

Is it possible to pass to the notice even the related products to the added one?

I can pass a module position to the popup but if i try to add related items module to this doesnot work (custom html in the module shows, so the module position added i functional)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 11 months ago [\#130799](#130799) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[See product in Add to Cart Modal - How?](/forum/2-general-talk-about-hikashop/54757-see-product-in-add-to-cart-modal-how#130799 "Hi Guys,  I've been busy working on a few ecommerce sites lately ad Hika is the best! I just love this component. Supprt is outstanding and its such a mind-leap from the other stuff...  But I have a small issue I really need some help with - though if I can figure it out before I get a reply I'll let everyone know.  What I want is for the product which has been &quot;Add to Cart&quot; to display in the modal window just below the 2 buttons (Notices) So I know I'm looking in the notices.php under checkout... Quesiton is - what code to I put and where?  Thank you Brett")*

Hi,

Do you have an error displayed ?
You can enable the Joomla debug mode, and set the error reporting to maximum to see from where the problem come.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU0NzU3LXNlZS1wcm9kdWN0LWluLWFkZC10by1jYXJ0LW1vZGFsLWhvdz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.142 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
