Post by burakkks » Tue Dec 12, 2023 7:14 pm

Hello,
https://www.swkgumussuyu.com/index.php? ... uct_id=295
normally there is no problem but after i update price for example 800 to 1000, when i click add to cart, it doesnt work and shows a pop-up "there is no product in your cart".

I searched but couldnt find a solution. Could you please help me?

Newbie

Posts

Joined
Mon Dec 04, 2023 10:21 pm

Post by paulfeakins » Tue Dec 12, 2023 8:20 pm

I can see in your code that the JavaScript function that should be just "add()" has been renamed to "add_to_cart_func()" so you must have installed an extension that has broken this.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by burakkks » Tue Dec 12, 2023 8:59 pm

paulfeakins wrote:
Tue Dec 12, 2023 8:20 pm
I can see in your code that the JavaScript function that should be just "add()" has been renamed to "add_to_cart_func()" so you must have installed an extension that has broken this.
for this product: https://www.swkgumussuyu.com/kolloidal- ... pm-1000-ml
there is no problem
Do you see same problem in here?

Newbie

Posts

Joined
Mon Dec 04, 2023 10:21 pm

Post by IP_CAM » Tue Dec 12, 2023 10:30 pm

https://www.swkgumussuyu.com/kolloidal- ... pm-1000-ml
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/swkgumus/public_html/catalog/model/extension/total/promotion_total.php on line 1260

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by burakkks » Wed Dec 13, 2023 12:27 am

IP_CAM wrote:
Tue Dec 12, 2023 10:30 pm
https://www.swkgumussuyu.com/kolloidal- ... pm-1000-ml
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/swkgumus/public_html/catalog/model/extension/total/promotion_total.php on line 1260
I migrated this website and i dont know if this exist before. And i have not so much knowledge about opencart. But problem is not that thing. Problem is when i update price to 4 digits( for example 1000 tl) nobody can add to cart. Problem stil exists.

Newbie

Posts

Joined
Mon Dec 04, 2023 10:21 pm

Post by IP_CAM » Wed Dec 13, 2023 5:07 am

Your Prices prices are quoted this way - - 2.727,30
they should possibly be quoted this way - - 2727.30
to function as planned. Just a wild guess ;)

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ADD Creative » Wed Dec 13, 2023 9:01 am

Looks like your ecommerce analytics extension does not handle your number format correctly.

In the JavaScript on the page you have the following which will cause an error as you can't have two decimal points in a number.

Code: Select all

price: 1.735.00,

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by SohBH » Wed Dec 13, 2023 3:34 pm

The thousand mark of price in the add_to_cart_func needs to be removed.

View all extensions | Request custom work | Pricing | Contact Me


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia

Post by burakkks » Wed Dec 13, 2023 8:13 pm

ADD Creative wrote:
Wed Dec 13, 2023 9:01 am
Looks like your ecommerce analytics extension does not handle your number format correctly.

In the JavaScript on the page you have the following which will cause an error as you can't have two decimal points in a number.

Code: Select all

price: 1.735.00,
I set it 1 decimal point but problem still exist.

paulfeakins wrote:
Tue Dec 12, 2023 8:20 pm
I can see in your code that the JavaScript function that should be just "add()" has been renamed to "add_to_cart_func()" so you must have installed an extension that has broken this.
i changed it. Only add function left in settings but problem still exist.
SohBH wrote:
Wed Dec 13, 2023 3:34 pm
The thousand mark of price in the add_to_cart_func needs to be removed.
how can i do this?

Newbie

Posts

Joined
Mon Dec 04, 2023 10:21 pm

Post by ADD Creative » Wed Dec 13, 2023 8:30 pm

You would need to work out which extension is adding the JavaScript for the ecommerce analytics and either contact the developer to fix it or look at the code yourself and fix it.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by IP_CAM » Thu Dec 14, 2023 8:34 pm

If you did not specifically configure a COMMA , like 299,00 in your prices better use the OC default POINT . like 299.00 !
But this problem still exists:

Code: Select all

Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/swkgumus/public_html/catalog/model/extension/total/promotion_total.php on line 1260
Image

Attachments

decimal_value.png

decimal_value.png (10.43 KiB) Viewed 2335 times

Last edited by IP_CAM on Mon Dec 18, 2023 4:06 am, edited 2 times in total.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by burakkks » Sun Dec 17, 2023 6:58 pm

Code: Select all

	$promotion_name = isset($general_settings['name'][$this->config->get('config_language')]) ? $general_settings['name'][$this->config->get('config_language')] : is_array($general_settings['name']) ? end($general_settings['name']) : '';
i found a solution for tis.

but which extension broke it idk. İ am new to opencart. Some users bought with that price but when i try to add to cart still have that problem

Newbie

Posts

Joined
Mon Dec 04, 2023 10:21 pm
Who is online

Users browsing this forum: No registered users and 10 guests