Jump to content

Resolved - Product options and add-ons


Robin Somes

Recommended Posts

CC 6.05 and All-In-One Shipping, again...

We have a product, let's call it 'Community Analysis Package', or CAP, for short. It's in our shop as a digital download, so when the customer selects it he's charged the price, plus VAT if he's eligible, but no postage, as it's download-only. 

As an optional extra, we have a tutorial CD-ROM to accompany CAP and the general field of multivariate statistics, which is available at a reduced price if the two items are purchased together. So I've created an Option Group, with the options 'Intro. to Multivariate Stats CD-ROM' and 'No thanks...'. Assigned this option group to the CAP product, and given a price of 12 GBP and a weight of 0.16 kg to the CD-ROM option. The 'No thanks...' option remains with no price and no weight.

When the customer selects the CD-ROM, it's added to the basket, just as it should be. However, there is no postage element added, presumably since the main product is download-only. So how can I get the shop to add on postage? I could create the CD-ROM as a separate physical product. But how would I then link that to CAP as an add-on?

And... once it's in the customer's shopping basket, if he changes his mind, is there any way to remove the option, apart from emptying the basket and going back to start again?


TIA,

Robin

Edited by Dirty Butter
Additional question
Link to comment
Share on other sites

Unfortunately, installing the plugin (i.e. unzipping the download and uploading the folder 'product_addons' in its entirety to /modules/plugins) appears to break both the site and the admin pages. The first time I did it, Product Addons was at least visible in my list of plugins, but ticking the box to enable it, then clicking 'Save' resulted in just a completely blank page. Deleting the product_addons folder restored the admin pages as they should be; since then, every time I upload the folder, they are broken again.

:(

Link to comment
Share on other sites

OK; created and uploaded ini-custom.inc.php to the root folder of the shop; logged in to Admin pages and uploaded the plugin folder. Refreshed the Admin page, and all went blank, as before.

Here is the contents of the error log:

[15-Jun-2015 14:35:04] PHP Notice:  Error: Hook 'product_addons/hooks/admin.navigation.php' was not found in /export/home/clearwater/piscesshop/webs/www.piscesconservation.com/htdocs/cube/classes/hookloader.class.php on line 288
[15-Jun-2015 14:35:08] PHP Notice:  Error: Hook 'product_addons/hooks/admin.navigation.php' was not found in /export/home/clearwater/piscesshop/webs/www.piscesconservation.com/htdocs/cube/classes/hookloader.class.php on line 288
[15-Jun-2015 14:35:16] PHP Notice:  Error: Hook 'product_addons/hooks/admin.navigation.php' was not found in /export/home/clearwater/piscesshop/webs/www.piscesconservation.com/htdocs/cube/classes/hookloader.class.php on line 288
[15-Jun-2015 14:35:52] PHP Fatal error:  The file /export/home/clearwater/piscesshop/webs/www.piscesconservation.com/htdocs/cube/modules/plugins/product_addons/hooks/admin.navigation.php cannot be decoded
by this version of the ionCube Loader.
 If you are the administrator of this site
then please install the latest version of the ionCube Loader.
 in Unknown on line 0

So the problem is not that IonCube Loader isn't installed, but that it's an old version?

Thanks, that makes things a lot clearer; I will ask my ISP if they can update it. As an aside, some hint in the documentation of the plugin that IonCube is required might save a bit of head-scratching...

Link to comment
Share on other sites

I think a more blatant mention of the need for ionCube in the description of the module's capabilities and features is required as seen on the publisher's website and anywhere else it is sold.

But files not found would have me looking at whether all the hook files got uploaded with the folder.

Link to comment
Share on other sites

One thing about PHP 5.3 is that there is a feature called "safe mode". It is the responsibility of the server admin to make sure directories accessed by the application are "within the bounds" of safe mode restrictions. I know it sounds weird, but it could be that directories are specifically enumerated, perhaps with "apply to all subdirectories", for being included in safe mode restricted space.

If the module's folder is not "within the bounds" of your application, that would explain why there are error messages about not finding that file, and yet, it was found, only to have a complaint about ionCube.

Now, PHP 5.4 has removed the safe mode feature because better solutions to 'shared server' problems exist.

So, what version of PHP is running your hosting account?

Link to comment
Share on other sites

As we're on a legacy server platform until at least the end of this year, we're on the older version of PHP.  We *could* migrate to a new platform sooner, but with 15 domains and associated stuff, all to be migrated manually, we simply don't have time. I've checked with them, and they have no plans to update the installation of IonCube on the legacy platform. So, for the moment we may have to consider other options for the shop.

Link to comment
Share on other sites

There is a way to get your specific necessary version of ionCube loaded into PHP for the scripts running in a particular folder. However, it requires that the hosting provider allows for a folder-level instance of PHP.INI file, and/or allows for declaring PHP variables and values in the .htaccess file. Not all hosting environments do this.

Plus, I do not know how to unload an already loaded ionCube extension, if necessary, since there may end up being two instances of the extension, but different versions, wanting to be loaded.

Then, you said you have the older version of PHP, but I ask again, what specific version is that?

Link to comment
Share on other sites

Hi Robin,

I've just been pointed towards this thread, I hadn't spotted it. I am the author of the module you are trying to get working, so can definitely help you get it up and running.

I can, and do make legacy versions of my modules available on request. It sounds like you need a legacy encoded version to work with your server. Please open a ticket via my support portal at http://www.noodleman.co.uk/support and I will be happy to provide you with the download link.

All the best,

 

Noodle

 

Link to comment
Share on other sites

It appears to be PHP Version 5.2.6-1. I will ask about the possibility of folder-level instances of php.ini - although I suspect I already know what the answer will be.

The ability to use your own account level php.ini files is something some hosting companies allow but can lead to security issues and plenty of other problems so many like us dont.

I see that the author (I gave him a nudge in this direction) is going to provide a version encoded with an earlier version which is always something that can be done.  BUT running on 5.2.6 is something you should be more concerned with - that is seriously old and has so many security issues and holes in it !

Link to comment
Share on other sites

Hi Robin,

I've just been pointed towards this thread, I hadn't spotted it. I am the author of the module you are trying to get working, so can definitely help you get it up and running.

I can, and do make legacy versions of my modules available on request. It sounds like you need a legacy encoded version to work with your server. Please open a ticket via my support portal at http://www.noodleman.co.uk/support and I will be happy to provide you with the download link.

All the best,

 

Noodle

 

Many thanks, will do shortly.

r

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...