Search found 201 matches

Search found 201 matches

Re: What PHP file executes only once per visitor?

paulfeakins wrote:
Tue Apr 02, 2024 7:40 pm
supak111 wrote:
Fri Mar 29, 2024 4:00 am
what sites are referring visitors to my website.
Sounds like you could use software like Matomo for this.

Never heard of them before. Will look into it for sure

.

Jump to post
  • Thu Apr 04, 2024 10:18 am
  • Replies 17
  • Views 834
Re: What PHP file executes only once per visitor?

I meant better idea than what i was doing, not the code you sent me. Thanks btw @Joe1234

PS I really haven't had the time to look you code over. Hope you don't mind me asking question

Jump to post
  • Mon Apr 01, 2024 3:30 am
  • Replies 17
  • Views 834
Re: What PHP file executes only once per visitor?

straightlight wrote:
Sat Mar 30, 2024 11:42 pm
catalog/controller/common/footer.php file already use refer. You could simply expand it to your needs by creating an extension.
I will look into this, might be a better idea

Jump to post
  • Sun Mar 31, 2024 9:43 pm
  • Replies 17
  • Views 834
Re: What PHP file executes only once per visitor?

I'm currently doing something where I only want something to register once per visitor, so what I did was check the current ip against the users online in catalog/controller/common/footer.php. You may have to do something extra with it though depending on your needs and time span per visit which wo...

Jump to post
  • Sun Mar 31, 2024 1:44 am
  • Replies 17
  • Views 834
Re: What PHP file executes only once per visitor?

Actually yea that could be having sometimes. But I've also personally tested some of my website backlinks from forum sites and I get a double notification still here and there.

That being said, what control file should I put this PHP in if not /system/startup.php

Jump to post
  • Fri Mar 29, 2024 10:06 am
  • Replies 17
  • Views 834
Re: What PHP file executes only once per visitor?

Ok this is what I am doing: Right now I am using this code in my index.php to send myself android notification about what sites are referring visitors to my website. Issue I have is that I usually get 2 even 3 notification per visitor sometimes. Is there any way to edit this code so that it only sen...

Jump to post
  • Fri Mar 29, 2024 4:00 am
  • Replies 17
  • Views 834
Re: What PHP file executes only once per visitor?

Events seems a bit complicated, don't really understand how they work.

I can make a OCmod file however, which controller file should I be putting my PHP code in to have it execute only once?

Jump to post
  • Thu Mar 28, 2024 12:53 pm
  • Replies 17
  • Views 834
What PHP file executes only once per visitor?

I need to add some PHP code to my site but it should only execute once per visitor.

What PHP file in OC3 only runs once per visit?
PS is maybe a /system/startup.php a good place to add it?

.
.

Jump to post
  • Thu Mar 28, 2024 4:54 am
  • Replies 17
  • Views 834
Re: Discount "-" negative sign missing in checkout total

ADD Creative wrote:
Sat Mar 23, 2024 5:42 pm
Try changing.

Code: Select all

'value' => (($discount / 100) * $total['total']),
To.

Code: Select all

'value' => -(($discount / 100) * $total['total']),
That actually worked ツ, thank a bunch. I was actually afraid to mess with it since I don't know much about PHP and didn't want to mess up my checkout.

Jump to post
  • Sun Mar 24, 2024 12:26 am
  • Replies 5
  • Views 285
Re: Encoded URL's don't work... And how to fix it?

The new BUY NOW button under the product was doing this. Instead of sending the customer straight to OC checkout with item already in the cart, it was just sending them to 404 error page. Uploaded via google shopping XML file. Right now since I updated my items/xml file I can't find them on google s...

Jump to post
  • Sat Mar 23, 2024 7:04 am
  • Replies 5
  • Views 278
Re: Discount "-" negative sign missing in checkout total

Extension is old, debt the developer cares much about it so many years later Fontend total field only has this in it, I don't see anything here about text. I need to add the "-" between $ and 104.33 <?php /** * */ class ModelExtensionTotalPaymentDiscount extends Controller { public functio...

Jump to post
  • Sat Mar 23, 2024 6:30 am
  • Replies 5
  • Views 285
[SOLVED] Discount "-" negative sign missing in checkout total

Hi I am testing using an extension called "Payment Discount Lite" to add a 25% OFF discount to "Cash on Delivery" payments. Issue I have is that in checkout the "Cash on Delivery" does show a 25% discount correctly but its missing a - negative sign in front of it. I was...

Jump to post
  • Sat Mar 23, 2024 4:21 am
  • Replies 5
  • Views 285
Re: Encoded URL's don't work... And how to fix it?

I don't understand the difference, sorry totally php newbie here.

The site is actually google shopping and its sending the URL like this, and that doesn't work on opencart

Code: Select all

https://demo.opencart.com/index.php%3Froute%3Dproduct%2Fproduct%26product_id%3D40

Jump to post
  • Fri Mar 22, 2024 8:42 pm
  • Replies 5
  • Views 278
Encoded URL's don't work... And how to fix it?

Hi I just realized that encoded URL's don't work, so say changing = into %3D destroys the URL. Many websites encode URLS so the backlinks from those sites are kinda useless as they don't go where they should. Went and tested it on OC.com demo site and it doesn't work there either. Is there anyway to...

Jump to post
  • Fri Mar 22, 2024 3:57 pm
  • Replies 5
  • Views 278
[SOLVED] How to add image width="" height="" to FEATURED module in OC3?

Trying to improve my website speed scores and this was one of the suggestions. When checking the sources code you can see that featured module in OC3 does not add width="" and height="" to images

Does anyone know what files need to be edited to make this possible?

Jump to post
  • Sat Mar 16, 2024 2:41 pm
  • Replies 1
  • Views 178
Re: Make a checkout URL with specific product in cart e.g. ***route=checkout/checkout/?product_id={id}

Your extension still doesn't allow you to just add this ?add&product_id=90 to any URL on your website and add that item to cart...

Jump to post
  • Fri Jan 12, 2024 1:20 pm
  • Replies 7
  • Views 1267
Re: Make a checkout URL with specific product in cart e.g. ***route=checkout/checkout/?product_id={id}

Actually, it does work. Adding item to cart works, and adding quantity works. Only adding options doesn't seem to work. Do you see any issues in the options code? I was using the wrong URL structure. URL should look like this: ADD only item to cart OK: example.com/index.php?route=extension/module/bu...

Jump to post
  • Thu Jan 11, 2024 10:33 pm
  • Replies 7
  • Views 1267
Re: Make a checkout URL with specific product in cart e.g. ***route=checkout/checkout/?product_id={id}

I have a save cart extension which puts your current cart into a URL and saves it to DB but I would have to do each product manually. More importantly it has a weird URL. I really need the URL to look something like this: example.com/?add_product_id=90 OR example.com/index.php?route=checkout/checkou...

Jump to post
  • Thu Jan 11, 2024 9:22 am
  • Replies 7
  • Views 1267
Make a checkout URL with specific product in cart e.g. ***route=checkout/checkout/?product_id={id}

Just want to be able to add any product_id to checkout in a simple link so something like this example.com/index.php?route=checkout/checkout/?product_id=10 Can this be added easy to OC 3? while ago someone help me add coupons straight to cart and it wasn't much code at all so now I can add coupons t...

Jump to post
  • Thu Jan 11, 2024 6:54 am
  • Replies 7
  • Views 1267

Search found 201 matches