| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
altered carts OnSale mod for php 7+ | ||||
|
|
Thread Tools |
#1
|
|||||||
|
|||||||
altered carts OnSale mod for php 7+
I bought the unencrypted files from AlteredCart for the OnSale mod when Bill was closing up shop, did anyone else do that so they could update the files for php7+? I don't have enough coding knowledge to know what I'm doing and was looking to see if anyone has it working already.
Thanks.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#2
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
I use AC's Cash Rewards and had an issue with PHP 7.x because AC Cash Rewards uses mysql_real_escape_string() which is not supported in PHP 7.x.
Check your log files to see if you have a PHP error for mysql_real_escape_string() If yes maybe the following will help. Steve pointed me to X-Cart's func_addslashes($html_escape) so I added the following to func.core.php After: Code:
Add: Code:
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#3
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
thanks for the reply elmirage but i didn't even get that far yet, I was just wondering if anyone one had done it successfully yet.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
|
#4
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
I can't offer any direct advice with porting the AC OnSale module. But I know what you are up against. I'm nearly done with doing that to Bill's Checkout One (one page checkout) module. It's been a horrible experience but I think I've finally beaten it.
You can get a feel for some issues by testing the module's php files using these online PH7 compatibility tools: https://phpcodechecker.com/ https://www.piliapp.com/php-syntax-check/ As mentioned in the previous post, you'll need to recreate the missing mysql_real_escape_string() function. And I suspect there will be some instances of the deleted mysql_query() function (removed in PHP7). It can be replaced with db_query(). Be sure to work from a development store because it may take awhile to sort through all the problems that come up. No doubt there will be more to it than these things. But if you post about the issues that pop up then maybe the community can walk you through it. BTW, I'm using XC's Onsale Module (X-HotProducts) and it is working in my 4.4.5 store with PH7, no patches.
__________________
Thomas / USA XCart V4.4.5 Gold XCart Mobile V1.4.12 XCart X-PDF XCart X-HotProducts AlteredCart Checkout One (One Page Checkout) BCSE Back In Stock CFL Holiday Message CFL System Message Smack Digital (WebsiteCM) Remember Anon Carts xcartmods Testimonials xcartmods reCAPTCHA for X-Cart Classic Unix, PHP 7.0 (patched 5.4). MySQL 5.6 |
|||||||
|
#5
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
I second Thomas's recommendation of X-Cart's Onsale module. I've been using it for a few years now. Our sales change a lot so I'm putting things on sale and taking others off sale all the time. I got tired of the labor intensive process very quickly so I came up with the following.
Final version is the last post. https://forum.x-cart.com/showthread.php?t=75341 Paul
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#6
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
The problems I have with x-carts Onsale module are that you can't do nearly the types of sales such as buy 2 get one free, spend x get x discount on the order, etc. I guess it works ok if you just want to do straight discounts on individual products but AC onsale mod spoiled me I think.
Thomas, thanks for the links to the tools, I'll give them a shot. I added the code to the func.core.php file as a start so I'll see how it goes.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#7
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
jQuery was updated in 4.7.11 and I had to update a section of Bill's code in his Cash Rewards. You may need to check his code for any thing deprecated.
For example Bill used .live but it is now deprecated and I had to change as shown below. From: Code:
Code:
I didn't know initially that .live was the issue. I found by a process of elimination (the long and painful method) This page showed me how to fix the issue. http://api.jquery.com/live/ Hopefully you won't have any jQuery issues to worry about. Good luck! Paul
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#8
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
Using the recommended PHP Code Checker I have this issue...
session_register is depreciated I have this code Code:
I see that the recommended fix is Two things that came to my mind: Quote:
Thanks.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#9
|
|||||||||
|
|||||||||
Re: altered carts OnSale mod for php 7+
x_session_register is XC function not PHP function. It is declared in include/sessions.php I believe. There is nothing to fix.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||
|
|||||||
Re: altered carts OnSale mod for php 7+
ah, ok. Thanks.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
|
|||
X-Cart forums © 2001-2020
|