Post by acidrs » Tue Jan 17, 2017 2:05 pm

Hello,
I have taken a look in the marketplace but couldn't find an extension that does what i am asking. I am using Opencart version 2.3.0.2 and the default theme.

I know the success page unloads all cart data so it would have to be done either before it unloads or at another point in the process.

Basically what i am wanting to do is add a link or button and some text on the success page of the checkout process but only if say product_id=48 has been purchased. If the check doesn't find that specific product_id then it will display the regular success page.

I have seen extensions that allow you to alter the success page but not change the success page based on if a certain product has been purchased.

If anyone can recommend an extension that can accomplish this or help me with what changes i would need to make.

New member

Posts

Joined
Tue Oct 06, 2015 11:00 am

Post by thekrotek » Tue Jan 17, 2017 5:52 pm

And what if the cart contains multiple products - which success page you want to display then?

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by acidrs » Tue Jan 17, 2017 10:26 pm

thekrotek wrote:And what if the cart contains multiple products - which success page you want to display then?
The check would be looking for 1 single product_id so if that product_id is found in the cart whether there is one product or several then it would display alternate success page. If the check does not find that product_id then it would display the default success page.
So it would not matter if there are multiple products in the cart as it would only be looking for one specific product_id to determine whether to load the default success page or an alternate one.

New member

Posts

Joined
Tue Oct 06, 2015 11:00 am

Post by mohittyagi82 » Wed Jan 18, 2017 12:18 am

Hi,
On success page you have isset($this->session->data['order_id']) , so on that basis you can findout products purchased on that order id. If particular product id is purchased then you can redirect it to another success page and if not then not. Simple ! If need any further support please let me know ! :)

New member

Posts

Joined
Wed Apr 20, 2016 7:02 pm

Post by sachin6609 » Wed Jan 18, 2017 3:25 pm

mohittyagi82 wrote:Hi,
On success page you have isset($this->session->data['order_id']) , so on that basis you can findout products purchased on that order id. If particular product id is purchased then you can redirect it to another success page and if not then not. Simple ! If need any further support please let me know ! :)
Hii

Do You Mean If Any one Buy The Product Which have product_id=48 Then The Success Page Will Come With Some Other Content Text Rather then the regular success page Content Text Is???

What You Want On on That Success Page If Some One Buy product_id=48 Product ???

Thanks

Sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by acidrs » Wed Jan 18, 2017 10:41 pm

sachin6609 wrote:
mohittyagi82 wrote:Hi,
On success page you have isset($this->session->data['order_id']) , so on that basis you can findout products purchased on that order id. If particular product id is purchased then you can redirect it to another success page and if not then not. Simple ! If need any further support please let me know ! :)
Hii

Do You Mean If Any one Buy The Product Which have product_id=48 Then The Success Page Will Come With Some Other Content Text Rather then the regular success page Content Text Is???

What You Want On on That Success Page If Some One Buy product_id=48 Product ???

Thanks

Sachin
Hi Sachin,
Let me give you a little more information. The system i want to set up requires that an affiliate cannot register unless they have purchased a kit. I have been thinking of different ways to accomplish this. For this success page change, i was looking at being able to check the order information of the checkout session to determine if on a success payment and that lets say product_id=48 was part of that order, that the system would load another success page instead of the default page. The only reason to display a different success page would be to display say the sign up link for the affiliate registration. Another idea was that on successful payment can check that product was purchased then i could redirect you straight to the registration page of the affiliate sign up.
By using this method we would hide the section from the affiliate login page.

New member

Posts

Joined
Tue Oct 06, 2015 11:00 am
Who is online

Users browsing this forum: No registered users and 50 guests