Jump to content

Buy 2 Get 1 FREE!!! How to create promos in CubeCart


cubicsquare

Recommended Posts

I do not recall seeing a specific solution. There are "Related Items" extensions in the Marketplace (a couple belonged to SemperFi, but are no longer available). Whether these available plugins solve your situation, I do not know.

Another suggestion was to offer Bulk Pricing -- One=15.00, Two=30.00, Three=30.00, etc.

Another suggestion was a Customer Rewards program -- deliver a coupon or gift certificate for up to X.00 usable on the next order.

 

 

Link to comment
Share on other sites

Hi there, l've just checked the marketplace, and discovered a few likely solutions:

 

£19.49 - https://www.cubecart.com/extensions/plugins/bulk-update-sale-prices-by-category
£25.99 - https://www.cubecart.com/extensions/plugins/category-discounts-fixed-price-or-percentage
£25.99 - https://www.cubecart.com/extensions/plugins/discount-price-tiers-plugin

 

 

Hooray for Noodleman!

 

*there's also at least one plugin for customer loyalty vouchers as you suggested

Link to comment
Share on other sites

If you are hosted, and are given a control center to manage the contents of that hosting, the center may have a panel that deals with the version of PHP to use and any extensions to PHP you may need to have enabled.

If so, look for the ability to enable ionCube.

If not, please consider having it enabled for your hosted account -- your hosting provider may need to get involved.

 

Link to comment
Share on other sites

OK l've progressed a little bit. I've managed to install ioncube onto my hosted website.

The phpinfo.php page is showing that ioncube is installed:

"This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd."

 

However, l am not subscribed to ioncube24, l need to create an account or something, but l gather this is just an add-on (it's commercial, trial then pay).

So l really should be good to go. My website is running PHP 7.4.21 and the ioncube php.ini file specifies php 7.4.

I then install one of Noodleman's promo-discount-creation plugins, and instead of a notice to install ioncube, l now just get a blank page. The blank page persists everywhere l try to backtrack to with the back arrow.

 

It is only solved by deleting the module from the server itself.

Is anybody actually able to make this module work? If so, please can l get an idea where l've gone wrong?

 

 

 

Link to comment
Share on other sites

Hi there thanks so much, l now have an error_log generated, here it is, edited with server path removed - could it be that my PHP version is too high?

 

[27-Jul-2021 18:47:45 Europe/London] PHP Notice:  Error: Hook 'Sale_Price_Bulk_Update/hooks/admin.navigation.php' was not found in /homepages/15/::::MYSERVERPATH::::/classes/hookloader.class.php on line 298
[27-Jul-2021 18:47:45 Europe/London] PHP Notice:  Error: Hook 'category_discounts/hooks/admin.navigation.php' was not found in /homepages/15/::::MYSERVERPATH::::/classes/hookloader.class.php on line 298
[27-Jul-2021 18:48:36 Europe/London] PHP Notice:  Error: Hook 'Sale_Price_Bulk_Update/hooks/admin.navigation.php' was not found in /homepages/15/::::MYSERVERPATH::::/classes/hookloader.class.php on line 298
[27-Jul-2021 18:48:36 Europe/London] PHP Notice:  Error: Hook 'category_discounts/hooks/admin.navigation.php' was not found in /homepages/15/::::MYSERVERPATH::::/classes/hookloader.class.php on line 298
[27-Jul-2021 18:48:43 Europe/London] PHP Notice:  Error: Hook 'Sale_Price_Bulk_Update/hooks/admin.navigation.php' was not found in /homepages/15/::::MYSERVERPATH::::/classes/hookloader.class.php on line 298
[27-Jul-2021 18:48:43 Europe/London] PHP Fatal error:  The file /homepages/15/::::MYSERVERPATH::::/modules/plugins/category_discounts/hooks/admin.navigation.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later.
 Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. in Unknown on line 0
[27-Jul-2021 18:48:49 Europe/London] PHP Notice:  Error: Hook 'Sale_Price_Bulk_Update/hooks/admin.navigation.php' was not found in /homepages/15/::::MYSERVERPATH::::/classes/hookloader.class.php on line 298
[27-Jul-2021 18:48:49 Europe/London] PHP Fatal error:  The file /homepages/15/::::MYSERVERPATH::::/modules/plugins/category_discounts/hooks/admin.navigation.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later.
 Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. in Unknown on line 0

Link to comment
Share on other sites

The actual problem is that the Category Discounts plugin is too old. That is, Noodleman has yet to "compile" that module using an ionCube encoder built to encode scripts for running in an environment for PHP 7.1 or higher.

Since you tagged Noodleman's screenname above, he should be getting notified that his modules need to be encoded for PHP 7.1+ (at least).

The other Notices are because the modules got "installed", but then forceably removed. To continue the forced removal, visit the database tables CubeCart_hooks, CubeCart_config, and Cubecart_modules. Delete the rows that reference the plugins that were forceably removed.

FYI: There is a manual edit that can be performed that will inhibit all plugins and snippets. In /includes/global.inc.php:

Add the line:
$glob['safe_mode'] = true;

It's not what I wanted, but will suffice in an emergency:

https://github.com/cubecart/v6/issues/892
https://github.com/cubecart/v6/issues/2082

 

Link to comment
Share on other sites

What l really really want is a simple tool that does - in my opinion - eBay's and every market stallholder's strongest promo:

BUY N, GET X FREE

That simple line obviates percentage calculations, etc. etc.

It's most useful for mass producers (rather than sellers of used miscellanea), because they have uniformity in pricing (e.g. all your glitter tubes are £1 regardless the colour),

 

and they want to sell in quantity (you can handle buyers that buy just 1 x £1 glitter, but your average buyer orders 10 packs per purchase).

 

Another reason it's useful for mass producers is (this is actually quite important): they can have a uniform pricing model across all product tiers, from the cheap small stuff to the expensive high weight gift boxed stuff. I mean: the mass producer can plan the pricing for every product type along the lines of BUY 2 GET 1 FREE, BUY 5 GET 2 FREE, BUY 10 GET 3 FREE - whether it be small £1 packs of glitter, or £1,000 Faberge eggs.

And thus, one simple line: BUY N, GET X FREE

... can be applied to the whole inventory in one swoop (EDIT: you may want to do this category by category rather than allow 2 x £1 glitter packs + 1 free Faberge egg, but the point is, it's the same basic one-line promo, across all categories, maybe in unison with simultaneous other promos e.g. buy more, get more free; sure the same could be said of % discount promos, but BUY N, GET X FREE allows us to determine which deals give the seller the highest profit margin because it ties in with total package weight, assuming the seller is a mass producer, i.e. products will all have the same weight within a given product line, so BUY N, GET X FREE will imply a specific package weight and thus also a specific type of packaging, and so the seller can calculate which deals will give highest profits under a multi-tiered P&P regime, and finally it's easy for the buyer to work with too, no calculators, no decimals ... a % discount promo can only dream of packing this kind of punch).

 

And to drive the pricing point of basket items all the way up, BUY N, GET X FREE, where X = the cheapest item(s) in the basket.

Thus precipitating a rush to make everything in the basket as pricey as possible, in order to reap the greatest actual total discount.

 

 

I wish l knew programming, l would do this myself. Unfortunately l'm dedicated to my product line at the moment ...

Link to comment
Share on other sites

"Why would I want to inhibit all plugins and snippets?"

Generally, when an application is acting up, one can start that app in "safe mode", where plugins, extensions, and other extraneous appendages are inhibited from starting. This mode is not intended to be permanent, but rather allow a tech to fix whatever is preventing the app from getting to a usable state of operation.

"Also do you know how l can navigate to the databases you mentioned?"

If your site is hosted, the hosting provider may provide you with a Control Center to manage the databases, users, content, domain names, etc, of that site. There will be a control panel that let's the hosted site admin manage the database. A tool that is typically provided is phpMyAdmin - a web-based application to effectuate changes to the database(s). (There are other solutions to manage a database if your site is not hosted, or if there is no Control Center provided.)

 

Link to comment
Share on other sites

Ok thanks. Instead, l just navigated to my server folder and deleted the module in question and that fixed it. Easier when you learn to have that module folder open, e.g. when installing Noodleman's stuff.

Fun trivia: l wasted over 90 minutes of my hosting company's time (and my own) on the phone trying to troubleshoot what just turned out to be Noodledude not bothering to keep his PHP up to date or at least state the PHP version needed.

 

 

Re: finding the database ... l know what a control panel is of course but l was asking where are those specific databases, l mean with my browser, how do i navigate to those places wherein are stored those specific database files?

Link to comment
Share on other sites

The "database files" are not meant to be accessed directly by using a file explorer or web browser. And getting access to them on a hosted site will probably not be allowed.

But if you really want to, and have root user permissions to explore, look in the folder /var/lib/mysql/ -- unless the hosting provider has put your site's database files somewhere else. That's entirely possible. Also, these files are not human-readable.

 

Link to comment
Share on other sites

The phpMyAdmin application is readily available in your hosted account's control center. It is also fairly easy to understand -- able to work your way around without having first to have read the manual.

If your hosting provider allows external (remote) access to your database, there are also desktop applications that will get you what you want: HeidiSQL, MySQL Workbench, LibreOffice Base, and numerous others.

 

Link to comment
Share on other sites

Thanks for explaining this.

 

@bsmitheri'd give you £10 for a "Buy N Get [CHEAPEST] X Free" code snippet, especially if l can overlay multiple such deals over one product page, or one category or the entire inventory, i.e. whatever it is l overlay it over, as long as l can overlay multiple simultaneous promos that'd be great.

 

I mean:

Promo #1: Buy 5, Get 1 Free

Promo #2: Buy 8 Get 2 Free

Promo #3: Buy 10 Get 5 Free

 

If l add 6 items to basket, basket will show the cheapest one as FREE

Add 7 items, basket will still show cheapest ONE as free

Add 10 items, basket will now switch to promo #2 and show the cheapest TWO as FREE

Add 14 items, basket will still show the cheapest TWO as free

Add 15 items, basket will now switch to promo #3 and show the cheapest FIVE as FREE

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...