Product Successfully Added Message in Popup

  • Posts: 109
  • Thank you received: 5
10 years 4 months ago #201979

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.8.11

Hello, there.

Good afternoon!

Please could you tell me how to change the generic "Product successfully added to the cart" message to a message that states the name of the product when the popup message is displayed?

As an example, the popup message will state "2 items of Product XYZ are successfully added to the cart".

Thanks.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
10 years 3 months ago #201989

Hi,

You would have to edit the file "notice" of the view "checkout" via the menu Display>Views.
It would be actually quite complex to do that specific change as this view has no knowledge of what was changed in the cart.
Changing the message is easy, but making it dynamic like you want is not and would require a custom development.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 3 months ago #202052

Thanks, Nicolas.

I tried to use the following code in checkout/notice.php to get the product ID and quantity but to no avail.

$product_id = (int)JRequest::getCmd('product_id',0);
$qty = JRequest::getInt('quantity',0);

Please could you tell me:

a) how to make the checkout/notice.php be aware of the product details and quantity being added to the cart?
b) where is the code that calls checkout/notice.php?

Thanks.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #202061

Hi,

You will potentially have to set session variables in the file "components/com_hikashop/controllers/product.php"
And then get the values in the view "checkout / notice".

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 3 months ago #202230

Thanks, Xavier.

That did the trick.

Take care!

The following user(s) said Thank You: deligence

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 9
9 years 9 months ago #224333

Could you please share the code with us? We are trying to implement the same, but getting error :(

Ed_Hika wrote: Thanks, Xavier.

That did the trick.

Take care!


Thanks & Regards,

Sanjay Kumar | CEO

Official HikaShop Integration and Customization Partner

Deligence Technologies - your growing technology partner
E: sanjay [at] deligence.com
Skype/Google Hangout: sanjay.deligence
www.deligence.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum