Override cartnotify plugin

  • Posts: 162
  • Thank you received: 0
5 years 8 months ago #295486

Hi,

is it possible to override the Cartnotify plugin via templates overrides?

Especially this file: plugins/hikashop/cartnotify/media/notify-vex.js .

thanks!

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 8 months ago #295488

Hello,

No you can't override that plugin.
But you can "duplicate" it in order to have your own version including your own Javascript.

The goal of notification system is to have different kind of plugins for different features.
Like : www.hikashop.com/marketplace/product/120-cartnotify_slide.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 162
  • Thank you received: 0
5 years 8 months ago #295757

Hi,

I did that.

I have some issues though. Why on all the options of a product except the first one the price is displayed on title when the option is selected.

Please see:

When first option is added to cart:



When second or any other option is added to cart:


My problem is on the add to cart popup where the same is happening with the title. I've modified successfully the code to display the pop-up as I wanted but I have no price displayed for first option.

Please see:

When first option is added to cart:


When second or any other option is added to cart:


thanks!

Attachments:
Last edit: 5 years 8 months ago by info@vesica.org.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
5 years 8 months ago #295764

Hi,

The price is normally not displayed next to the product name or the characteristic value.
On the product page, the price is displayed below the product name.
And on the popup, the price is not displayed at all normally.
So that means that it must have been added as a customization and thus I don't know why you would have it in some places and not others.

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

  • Posts: 162
  • Thank you received: 0
5 years 8 months ago #295818

Hi Nicolas,

I've disabled all my template overrides and it looks that the price is there by default on the product page:



and also on the popup:



thanks!

Attachments:

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
5 years 8 months ago #295824

Hi,

Then either you have the price directly in the variant name or characteristic value name, or you have modified the core files of HikaShop to add the price. Here is a thread which talks about that for the characteristic selector:
www.hikashop.com/forum/4-how-to/27065-sh...rice-of-variant.html

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

  • Posts: 162
  • Thank you received: 0
5 years 8 months ago #295967

Hi Nicolas,

I'm the only one working on the website and I assure you nobody changed core files. We track changes in code. The only changes we made are via template overrides.

I've checked variants names and everything looks correctly in back-end.

I'm not sure if I made myself clear enough. The problem is that the price and the size(variant name) are added with JavaScript when we select a characteristic. Please see bellow examples:

Once you load the page the product is listed with the default price like this:



Once a characteristic is selected this is what happens:



Please note that I've disabled all template overrides.

thanks!

Attachments:

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
5 years 8 months ago #295968

Hi,

I still don't see how that's possible as HikaShop doesn't add the price to the variant name.
Please provide a link to that page so that we can check it out.

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

  • Posts: 162
  • Thank you received: 0
5 years 7 months ago #296067

Hi Nicolas,

I've sent you an email with all details.

thanks!

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
5 years 7 months ago #296068

Hi,

Thanks. I checked the issue, and the problem with the popup is because you had added a name to the small variant without the price while you didn't add any name for the other variants.
So when the name is not available, it will use the characteristics values, but when it's there, you just get the variant name appended to the product name.
I've modified the small variant to not have a name, like the other variants and it works fine.
So as expected, it's just an issue with how the variants were configured.

Regarding the default name on the product page, that's normal and made on purpose. If you don't want that, you can just edit the file "show_default" via the menu Display>Views and change the line:
echo $this->element->main->product_name;
to:
echo $this->element->product_name;

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

Time to create page: 0.109 seconds
Powered by Kunena Forum