
User management / ecommerce
Reported by Peter | June 30th, 2022 @ 12:18 PM | in User issues
Today I have added eCommerce to the web site to replace the old Shop page. A couple of strange things have happened (one a while ago, one today):
First pass at enabling eCommerce I ticked Use Simple Permissions. When I went to check a username, it says I can no longer create admin accounts on the "manage customers" page. (Capture.jpg)
I went back and unticked that option. The problem remains.
I cannot say for sure this happened when setting up the eCommerce, but it's there now. How do I fix that please?
The other problem concerns the top left logo in the nav bar. I added this initially by putting the image url into the General tab. If I make any config changes the field just says <img src= and it's gone from config.php. I put the url back in there (Capture1):
define("ORGANIZATION_NAME",'');
and it's OK till the next time I make a config change. I know that's probably not the right way to put an image up there, is there a 'proper' way or is it possible to stop the config getting messed up?
Thank you.
Comments and changes to this ticket
-
-
Peter June 30th, 2022 @ 12:28 PM
One other thing - setting up the store, store configuration only allows US - there are no other countries in the pull-down.
-
Peter June 30th, 2022 @ 12:57 PM
Sorry, I found the country setup so please ignore that question... Having a hard day!
-
dleffler June 30th, 2022 @ 01:05 PM
- State changed from new to open
- Milestone set to User issues
I'll check the simple permissions issue. Though in the code if a user is an admin or super-admin, they have all permissions (as always is the case), or they have no permissions (hence simple).
Your other issue exploits an anomaly which is scrubbed when edited/saved. UNLESS a config variable ends in '_HTML' it's not allowed brackets (<>), which is actually a security feature to prevent embedding malware, etc... Your best bet is to style the .navbar-brand class which is what that area is.
-
dleffler June 30th, 2022 @ 01:14 PM
My user account creation test worked locally. Is the issue in not being able to display the create user form, or when you you try to save it? I'm still trying to eliminate all the MySQL v8.0+ (esp v8.0.19+) issues (though I think the development/pre-release code addresses them all).
-
Peter June 30th, 2022 @ 03:02 PM
Thanks. I just tried editing an admin user and it let me do it. Maybe it's just the words that need to say can't manage admin users when that is true?
Just tried putting a background image in class navbar-brand but it doesn't display. I'll keep working on that one.
-
Peter June 30th, 2022 @ 03:07 PM
The create new user screen comes up OK. Although it says "You will not be able to create, modify or remove administrator accounts (these options will be disabled). " they are not disabled.
I did manage to corrupt config.php while creating ecommerce settings and I couldn't get into the site at all. I uploaded the 'before' config.php and I'm back in, but with no ecommerce - I guess I expected that. I'll try again. Seems to be my week for breaking things.
-
dleffler June 30th, 2022 @ 03:47 PM
eCommerce is 'turned on' by either forcing it on in the Site Configuration, eCommerce tab, or activating one of the eCommerce modules on the Manage Modules (Extensions) page.
You must be a Super Admin ('is_admin' field) in order to create other admins, and only the System Admin (the one created during the original installation, 'is_system_user' field) can create super admins. Though a regular Admin ('is_acting_admin' field) can view those settings.
Regarding the 'note' on the Manage Users screen. It's meant more as a warning...only Super-Admins can edit Admins, and only the System Admin can edit Super-Admins or the System Admin (themselves). If a Super-Admin attempts to edit another Super-Admin, the command will fail.
Regarding placing a logo or image in the menu bar, I use this on most of my BS3/4 sites, adjusting the background-size as needed.
#topnavbar .navbar-brand { background-image: url("../images/logo.png"); background-size: 182px 45px; background-repeat: no-repeat; color: transparent; width: 200px; padding: 4px; } #topnavbar.navbar-inverse .navbar-brand { background-image: url("../images/logo.png"); background-size: 182px 45px; background-repeat: no-repeat; }
-
Peter June 30th, 2022 @ 04:14 PM
I was mucking around with the CSS in the area you suggested. The problem I seem to have is that the space for the logo alone is not reserved. If I put text in the general configuration settings, like "BTS" I can see a partial background image. It refuses to be any bigger than the text size. I need to stop now for the day, my next move would be to try and reserve space for the image, but not sure yet how best to do that.
I tyhink on the user management page it might help if the words were, for example, " Unless you are an administrator, you will not be able to create, modify or remove administrator accounts (these options will be disabled). "
-
Peter July 2nd, 2022 @ 09:20 AM
Hi Dave. I am still struggling with the logo and one more thing on the top nav menu. Please can you help?
-
As described above, if the site organisation name in general settings is blank, no space is reserved in which to insert the logo. I tried variations of your suggested CSS but to no avail. I have not succeeded in inserting the image any other way than my manual update of config.php. If I save any configuration changes I have to go back and reinsert the logo manually. I understand your caveat about <> in the config which presumably is why the logo disappears when I save. Even if I put text in the name field, the area is too small for the logo. My guess might be that somewhere in the CSS I can make the text invisible and resize its space large enough for the image? It's 'just' a case of finding where, but code inspector is not really helping me pin it down.
-
I want to change the colour of the menu item for the active page. .navbar-light .navbar-nav .nav-link:active { color: #800a00; } makes the menu text change momentarily as you click it, but then changes state back to the normal colour. How do I make :active stick?
Thanks.
BTW every time I log in I am told 2.6.1 is available as of 'today' and to click the link. How do I stop this until it is really available please?
Peter.
-
-
dleffler July 2nd, 2022 @ 10:29 AM
-
Here's a more detailed example from a site I designed
Create a custom navigation/views/navigation/howall_Flydown.tpl and change the 'navbar-brand' line<a class="navbar-brand" href="{$smarty.const.URL_FULL}" title="{$smarty.const.ORGANIZATION_NAME}"><img alt="Spot Coolers" class="img-responsive" src="{$smarty.const.THEME_RELATIVE}images/spotcoolers_logo.png" /></a>
#topnavbar .navbar-brand { padding-top: 26px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; } header.smaller #topnavbar .navbar-brand { padding-top: 10px; } header.smaller #topnavbar .navbar-brand img { width: 116px; height: 45px; }
-
Wrong css selector, :active is a 'state', need the 'class' is .active.
.navbar-light .navbar-nav .active > .nav-link { color: #800a00; }
I'll try to hack the 'master' site version, or you could change the setting in Site Configuration, General Tab, "Skip Automatic Online Version Update Check?"
-
-
Peter July 2nd, 2022 @ 10:46 AM
Thank you, I'll have a go later on, a bit busy this morning outside! Peter.
-
Peter July 4th, 2022 @ 12:43 PM
Success! I keep forgetting about tpl files - maybe because there are so many and I don't have any real overview what they all do. So the site brand no longer appears in config.php and the logo behaves as designed. Active tab text also good.
Thank you again.
Peter. -
Peter July 5th, 2022 @ 12:21 PM
I am now installing eCommerce. A couple of strange happenings:
-
I set up Locations as United Kingdom only. I unticked USA but all the states remain ticked (would be good if they automatically went away if you untick USA). I unticked them all one at a time, went into UK settings. Saved that and all the states are ticked again.
-
In general settings I set the Store Name etc and save. When I go back Store Name is back to My Store. Because of above, although it says UK in general settings it still says zip code (and all the states are there, because they were reset as mentioned above).
I have used the Sandbox API codes for both live and sandbox for now. PayPal is not cooperating in setting up live API - their site is a bloody mess trying to find things that should be there but aren't where you look... I assume I can continue with live = sandbox API, or is that causing my other problems?
Thanks.
-
-
dleffler July 5th, 2022 @ 01:07 PM
I'm out of town. But PayPal has 2 separate environments for testing and actual. Two different accounts and exponent uses 2 different urls depending on whether test is turned on or if8.
Sandbox let's you setup both a company and customer to make fake transactions.
-
Peter July 5th, 2022 @ 01:17 PM
Hi Dave. Are you away for long? I can do other things like adding categories and products in the meantime. I can't progress setting up the basic shop settings until it stops putting all the US states back in by itself and changing the store name back to default. I know I need 2 API's, I just wondered if for now I can leave the same info for both while I do the rest, but before testing.
Thanks.
-
Peter July 5th, 2022 @ 03:07 PM
It has decided now not to put in the US states after I accidentally deleted UK (it didn't ask if I was sure...) and put it in again. Store name and postcode still won't stick after saving. I'll try a manual db update maybe.
-
-
Peter July 6th, 2022 @ 05:44 PM
I've made quite a bit of progress but am finding problems as I go along. The APIs are fully set up. I have run a test transaction in the sandbox.
As you're out for the next couple of days, I'll carry on with setting up and testing. I may find some things were me, but any issues left over by Friday PM I will list here for you.
Peter.
-
Peter July 8th, 2022 @ 10:21 AM
I have now got to the point where I need some help with a few problems. Some of these are terminology issues which I can work around, although it would help if I knew where to change them, I looked in 'lang' and found one or two but not all.
Critical for progress are: Not saving some settings, shipping options, shipping price on product page, error codes before & after PayPal, creating shop on web pages. I am assuming I'll need to do some css customisation along the way. Here is the list of problems I have encountered:
E-Commerce -> Store Setup -> Store General Settings -- won't save
-- Wording - Zip Code --> Postcode -> Manage Locations -- no UK countiesNote: Don't need tax rates as not VAT registered, but for info:
-> Manage Taxes -> -- created new tax rate - existing not displayed -> Add a tax rate -- Select VAT, Zone = all US states + UK -> Manage Tax Classes -- Only allows change class name -> Manage Tax Classes -- All US states + UKAdd Product -> General -> Model# / SKU -- Need ISBN
-> Manufacturer -- Need Publisher -> Pricing -- Need per item postage rate -> Shipping - see above & next --Shipping Options -> -> Shipping Options -- Added Royal Mail - default based on order total / shipping speed
-- Needed UK / EUR / World, used 'shipping speed' - problem when oderingProducts -> Manage Manufacturers -- Publishers
Manage Orders -> Lists orders but no actions menu to actually manage
Placing an order
Checkout -> Errors - see image 1
Return from PayPal -> Errors - image 2Shipping -> No obvious way to record as shipped
Put shop on website
No obvious way. Documentation suggests there should be shop modules alongside text / snippets etc but they don't exist
Other
Terminology - how to change?
-
dleffler July 9th, 2022 @ 01:36 AM
I suspect the 'saving config' issue may be related to using MySQL v8 or v8.0.19+ both of which should be corrected in the development code.
Well, to add UK Countries or Regions to https://site.url/address/manage and add a 'Region'. Give it a region name, code (abbreviation) and select UK for the country, and 'active' I'm not familiar with UK addresses to know if it needs to be a list of 'Regions' or perhaps several countries with regions?
Some info on setting up tax classes, zones and rates can be found here http://docs.exponentcms.org/docs/2.6.0/e-commerce-tax-setup
As far as changing terminology you have a couple routes that might require some editing
1. create a custom view template from the existing system template
2. edit the /framework/core/lang/English - US.php file by searching for the specific phrase. Leave the phrase on the left of the => alone, it is the 'key', but you can change the phrase on the right keeping in mind double quotes are delimiters.
3. create a new language file from the default English one, under Super Admin Tools, Extensions, Manage Translations. 'English - UK' or something like that, then edit that file as in #2To Manage Orders, click on the order invoice # or customer name
The method to change the order status (shipped) is to edit the order, then change it's status (on left had side)
To add eCommerce modules to a page, you'll need to first activate those modules under Super Admin Tools, Extensions, Manage Modules. Storefront give you catalog views and Cart gives you shopping cart views.
Shipping might best be another ticket. The EasyPost shipping calculator uses EasyPost with a small surcharge, but it has a Royal Mail connector. Otherwise, you might have to be more specific on what is happening or NOT happening.
The warnings in the 2 screenshots above are only warnings...I'll try to work around the code so they won't spit out....probably because you haven't created any location upcharges yet.
-
Peter July 9th, 2022 @ 09:53 AM
Hi Dave. Many thanks for your comprehensive reply. I've been through it, here's an update:
-
Database is 10.3.35-MariaDB protocol version 10
-
UK counties - I think I'll skip this for now. Here's a list here for info - https://www.genuki.org.uk/big/Regions/Codes . Interesting scenario here - codes are e.g. I am in Hampshire = GB-HAM. International code foe example on cars was GB until our wonderful faux-pas called Brexit when they decided to use UK instead. I wonder how long before the counties change to UK-HAM !!
-
Tax - VAT is different. As the charity is not registered for VAT there is no additional tax. So I'll leave that for now too.
-
Terminology - I will trawl through the lang file, some are there some not. If not can I just add to the left side the phrase I want to change in the same format as the others, without causing issues?
-
Order status is just shown as a number 1. There is a setup page for status codes, but the impression is that only one is active at a time, and I don't see a setting to change say a numeric 1 to "order received" on the manage orders page.
-
Activate modules - I should have known that, but it's been so long....
-
Shipping - will do new ticket
-
Warnings - never heard of upcharge before now, Google tells me what it is but there aren't any. This will be a small, simple site selling books with a fixed postage rate for UK, Eur and WW. Another one I've not heard of before is "spawning orders"... Google helps, but I don't think we'll be doing that either!
-
-
dleffler July 9th, 2022 @ 01:50 PM
Perhaps this may help with understanding 'order status' http://docs.exponentcms.org/docs/2.6.0/e-commerce-order-processing
- Order can only have a 'current' status, but keeps track of all past order statuses - Default status assigned initially - Order considered 'open' until given a 'treat as closed' status by the order managerHere's an example for changing a language phrase, from
"Model/SKU"=>"Model/SKU",
"Model/SKU"=>"ISBN",
-
Peter July 9th, 2022 @ 02:55 PM
Thanks Dave. I do understand the flow of an order, but the problem I have is that status is shown just as a numeric "1" - rather than something meaningful in English. Shop admin will be by someone doing low volume usage and probably low technical skills, so I'd like to make it as simple as possible. I read the help before, if I understand it, it says the order status is updated automatically as steps are completed. The settings page isn't very intuitive, it just says one of them is the default but no means of changing what is displayed.
Language update is as I thought, than you for confirming.
-
dleffler July 9th, 2022 @ 03:59 PM
Manage Order Status screen should look like this attachment. Only automatic status change is initial assigned default status. Also, don't confuse 'product' status codes with 'order' status codes.
-
-
Peter July 11th, 2022 @ 09:04 AM
Please could you let me know when you might be able to sort out the problem where I can't save general settings. I do need to get these set up now in order to move forward. Just to confirm database is Database is 10.3.35-MariaDB protocol version 10. Everything else is saving OK, just all of the general settings won't save.
Thanks.
-
dleffler July 11th, 2022 @ 01:56 PM
Please look for and attach /tmp/exponent.log here. It might contain some error entries, but they don't normally occur. Also, if you could turn OFF error reporting, then try to change the store settings, it could provide some mysql error details in exponent.log.
-
Peter July 14th, 2022 @ 03:12 PM
Sorry for the delay in replying. In between having a bit of a life (all this work is voluntary / free of charge!) and adding products and experimenting with shipping options...
Anyway I turned error reporting off just now and the general setting are being saved. Also the warnings seem to have gone.
The log is 109MB so can't attach here. Which email address should I use, or do you not need it for now as things seem to be working?
-
dleffler July 14th, 2022 @ 03:50 PM
Ok, turning off error reporting suppresses warnings. It also loosens up the MySQL code to allow things to work under MySQL v5.7+ 'strict' mode. I believe all issues were fixed in development (pre-release) code. I'm pretty sure there are entries in your /tmp/exponent.log file with details about the failed MySQL calls. You might try zipping the log, or sending to dleffler@hughes.net
-
-
dleffler July 14th, 2022 @ 04:52 PM
I see a possible issue why your config was not saving into the db (with error reporting turned on). It seems associated with using British Pounds instead of US Dollars. First off, the display of the inputs will always display a $ due to the current JavaScript code. HOWEVER, there are errors when attempting to save your ecom config settings due to the British Pound symbol being inserted. Confusing since our code strips off the 1st character when you submit the config settings, so I'm not sure how the symbol is getting into the MySQL insert statement.
Though NOT associated with this error, it looks like I'll need to update the javascript 'money' code to account for different currency symbols.
-
Peter July 15th, 2022 @ 08:11 AM
I'm glad you've got a lead on this. My shop is coming along nicely now. Yesterday was change-all-the-colours-and-change-some-wording day!
In General Settings / Site I tried to imbed the logo, a jpg, into the field for what appears at the top of an invoice. After saving there are extra quotes in the source and the image is not displayed. I can live without a logo if necessary.
I did some screenshots but I can't upload - "Upload Quota Reached" - I'll email.
Peter.
-
dleffler July 15th, 2022 @ 12:30 PM
You've identified a code problem when any of the store general settings HTML Editor fields have embedded quotes. I've fixed the code in develop. I may work towards a version release this weekend (probably will be called 2.7.0 w/ bootstrap 5 integrated). and then just work on patches.
-
-
Peter July 16th, 2022 @ 03:41 PM
I think I've come across another couple of bugs.
-
The annoying one - moving the store modules from the test page to the shop page, I added the Store Front to display all categories and default view. So far so good. Then I switched it to images view and it screwed up. Images capture/1/2 - sending zipped as quota reached. I had to delete the page by first selecting another page to get the Exponent headliner back and start again.
-
When I click on the shop in the menu, the storefront is surrounded by text modules. It shows the categories vertically and with images out of the shop. If I click on a category then click back to store, it changes to the 'no-image' I created and displays horizontally as specified. capture3/4.
May not be a bug, just me, but if I put something in the basket, the basket displays. If I say continue shopping it disappears. If I don't put anything else in the basket there's no obvious way to get to it.
I'd also like to change 'continue shopping' on screens where it appears, and 'store' on breadcrumbs to go all the way back to the Shop page.
-
-
Peter July 17th, 2022 @ 08:11 AM
It's happened again. Updating the store front to show all products and categories, when I saved it I get the partial screen then it dies. With error reporting on, at the bottom of the partial screen:
Fatal error: Uncaught Error: Call to undefined method stdClass::getCategoryImage() in /home/britisht/public_html/2-6-0/tmp/views_c/bootstrap5_ad47f2bd1a9754e53a9de9964eac2b94^fe8023efe043a476ed4547b0c57a168b3d7b98dc_0.file.showFullTree_images.tpl.php:170 Stack trace: #0 /home/britisht/public_html/2-6-0/external/smarty-4.0.4/libs/sysplugins/smarty_template_resource_base.php(123): content_62d3c2ec3005f2_03409045(Object(Smarty_Internal_Template)) #1 /home/britisht/public_html/2-6-0/external/smarty-4.0.4/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template)) #2 /home/britisht/public_html/2-6-0/external/smarty-4.0.4/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) #3 /home/britisht/public_html/2-6-0/external/smarty-4.0.4/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 1) #4 /home/britisht/public_html/2-6-0/external/smarty-4.0.4/l in /home/britisht/public_html/2-6-0/tmp/views_c/bootstrap5_ad47f2bd1a9754e53a9de9964eac2b94^fe8023efe043a476ed4547b0c57a168b3d7b98dc_0.file.showFullTree_images.tpl.php on line 170
The categories and products are intact, I can get back to them clicking the text link Manage Products. But when I click on the Shop menu item at the top to go to my shop page with the other text modules I get the problem.
Screenshot coming by email.
-
Peter July 17th, 2022 @ 08:23 AM
If I log out, the shop page displays OK, apart from the Browse Our Store section, which is blank. Another screenshot. As soon as I log in the error is immediately there.
-
Peter July 17th, 2022 @ 08:27 AM
Sorry, more symptoms as I explore. If I now click on one of the text links to a category (these are text with link in unordered list, outside of the eCommerce modules) the category opens but no products are listed.
-
dleffler July 17th, 2022 @ 11:52 AM
Yes, definitely a code problem, I've got a fix...will provide more details and a solution for you later today. Please bear in mind, there are MANY different ecommerce views and a number of them haven't been tested, probably added many years ago.
-
Peter July 17th, 2022 @ 12:02 PM
I understand. The first time around before it bit me the categories and the products were all displaying as expected. Then it went kinda pear shaped.
-
dleffler July 17th, 2022 @ 07:56 PM
I'm going to suggest you switch to a newer code base, PROVIDED, you haven't edited any of the system files and only things in your custom theme. And I'll assume you've created a renamed COPY of the system bootstrap5 sample theme (see details below). Since you're using the Bootstrap 5 theme:
- go to https://github.com/exponentcms/exponent-cms/tree/Bootstrap_5
- you should already be on the 'Bootstrap_5' code branch, otherwise switch from the 'master' branch to 'Bootstrap_5' (on left side above list of files)
- click on the green 'Code' button (on right side above list of files)
- click on 'Download Zip' to get the most recent code (2.6.1develop) with BS5 package integrated
Unzip the downloaded file into your folder (after making a backup) overwriting all the 'system' files (FYI, it's missing the installation trigger, which is ok since this is an existing installation)
If you have NOT yet created a custom version of your theme (you're messing with the sample bs5 theme) Do the following BEFORE you unzip the new code base into your site
- copy the bootstrap5theme folder inside the /themes folder.
- give the copied folder a new name like 'britishtrolley_5'
- open/edit the class.php file inside the newly renamed theme folder
- change the theme name in lines 19 & 22 from 'bootstrap5theme' to the new folder/theme name...the folder, and those 2 lines in it's class.php file MUST be identical and different from any other theme in the system or the site will ALWAYS crash.
-
dleffler July 17th, 2022 @ 08:22 PM
FWIW, when the page crashes, you still have most of the commands/links on the page, they just aren't packaged with a menubar or the chrome module dropdowns.
The store 'breadcrumbs' across the top of the view specifically display the 'store' module 'showall' action with the default view. This could be changed by customizing the code within a particular view for the command being called.
I can almost guarantee most of the store views are not 'responsive' or bootstrap friendly, only the showall/default view (Products - All Products & Categories).
-
Peter July 18th, 2022 @ 08:27 AM
Hi Dave. I've now finished uploading the replacement package and run the upgrade. So far so good. Peter.
-
Peter July 18th, 2022 @ 01:09 PM
One interesting problem Dave. When I'm logged in and go to Shop then select a product category all the products in that category are displayed. If I'm not logged in they don't display. It's as if the product listing is hidden, but I can't find a setting to unhide for non-logged-in users.
I had another issue not connected to this. We are hosting with UK2. Some users try to access the site without www and http and get a blank screen. The UK2 redirects should switch to https automatically and load the site without www. Today I tackled UK2 about it. They renamed htaccess so I could no longer get into the 2-6-0 site, and told me the problem is in there. I'm no expert on htaccess so wonder why they think the problem is in there. I don't see anything obvious.
-
-
Peter July 18th, 2022 @ 01:42 PM
Sorry, don't follow. Can't see any ecommerce within user management, or vice versa.
-
dleffler July 18th, 2022 @ 01:48 PM
Sorry, tried to email response, but Lighthouse appears broken in that regard...
When logged in as an Admin, you see Active, Inactive but findable, AND Inactive and Disabled products; other users do NOT see the Inactive/Disabled products...However, I'm not sure why this is occurring since looking at your products they all appear Active.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS