Jump to content

Price not updating


rnewcomer

Recommended Posts

So, we have had this issue pop up.  If I get a notice that a product's price has changed, I have gone to that product, changed the price, then did a Save/Reload.  Everything looks good on the admin, but if I log in as an end-user, the old price is displayed.

R

Link to comment
Share on other sites

Logging in as a customer, does that customer belong to any Customer Group?

If so, then check if that product has a distinct price schedule for that Group. If so, be sure the Group's price schedule has also been updated.

What prices do a non-logged-in visitor see?

Also, are you aware of your hosting provider implementing any sort of aggressive caching mechanism?

Link to comment
Share on other sites

Hey Brian, thanks for the questions...

  • Each customer that logs in is a member of "center" that they login as... Example someone from the Dayton, OH Center is in group DAYT-2001.  Each of the 60 centers have their own alpha-numeric group code.
  • We aren't doing any price schedule adjustments.  Each of the 60 centers will pay the same amount.
  • Non-Logged-in visitors do not see pricing.  You need to be a verified, registered "customer" and logged in to see pricing.
  • I host internally on my own machine, we haven't made any type of caching changes.

Right now what I need to do for price changes, is delete the product and re-enter.

RLN

Edited by rnewcomer
Poor grammar
Link to comment
Share on other sites

Observe the directory contents of CubeCart's /cache/ folder. Especially the SQL files. When you Save the new prices, CubeCart should delete all SQL cache files. They will soon enough be rebuilt. CubeCart should clear the cache directory whenever an admin makes any kind of change. So, the SQL cache files should have new recent timestamps.

In admin, Store Settings, Advanced, disable caching (for the moment). Determine if that makes any difference.

Link to comment
Share on other sites

I've found, if you have a product in a customer cart at one price.

Log in as an admin and change the price.

The price change is not reflected in the customers cart. He added it before you modified the price.

 

May not be the same issue but worth me mentioning.

Link to comment
Share on other sites

On 3/2/2018 at 3:12 AM, keat said:

I've found, if you have a product in a customer cart at one price.

Log in as an admin and change the price.

The price change is not reflected in the customers cart. He added it before you modified the price.

 

May not be the same issue but worth me mentioning.

Keat,

Thanks for your reply.  However, this isn't the case here.  It's odd.

R

Link to comment
Share on other sites

On 3/1/2018 at 7:47 PM, bsmither said:

Observe the directory contents of CubeCart's /cache/ folder. Especially the SQL files. When you Save the new prices, CubeCart should delete all SQL cache files. They will soon enough be rebuilt. CubeCart should clear the cache directory whenever an admin makes any kind of change. So, the SQL cache files should have new recent timestamps.

In admin, Store Settings, Advanced, disable caching (for the moment). Determine if that makes any difference.

Brian,

Thanks for your reply.  The only '''cache" folder that I have been able to find is html/cubecart/cache.  It is empty except for one folder named skin.  Skin contains about 156 .php files.  Is this the correct spot? 

I have disabled caching for the moment as you suggested, however price still doesn't change after editing.  The only way to get an updated price is to delete the product and rebuild it.

Stymied.

R

Link to comment
Share on other sites

In admin, Store Settings, Advanced tab, enable Debugging and enter your IP address (www.whatismyip.com) in the adjacent field.

Request any CubeCart page.

There will be a large grey section at the bottom of the page.

At the very bottom, just above Page Load Time:, find this line:

Cache (Abc): Always Disabled in ACP

where Abc could be File or something else, and Always Disabled in ACP will show only when in admin and Enabled when in the storefront.

If the cache is not coming from File, then perhaps a conversation with the cache mechanism application developers is needed to determine why/if whatever cache option CubeCart is using to cache the SQL queries is not getting cleared.

 

Link to comment
Share on other sites

17 hours ago, bsmither said:

In admin, Store Settings, Advanced tab, enable Debugging and enter your IP address (www.whatismyip.com) in the adjacent field.

Request any CubeCart page.

There will be a large grey section at the bottom of the page.

At the very bottom, just above Page Load Time:, find this line:

Cache (Abc): Always Disabled in ACP

where Abc could be File or something else, and Always Disabled in ACP will show only when in admin and Enabled when in the storefront.

If the cache is not coming from File, then perhaps a conversation with the cache mechanism application developers is needed to determine why/if whatever cache option CubeCart is using to cache the SQL queries is not getting cleared.

 

Ok... After much crying and gnashing of teeth, I was able to get the price to change and be reflective of what it is supposed to be.  There for a while, it would only show $0.00.

Now a new wrinkle... and this may be a permissions... On the top of the page (admin and client), it reads:

Warning: Could not change cache path (/var/www/html/cubecart/cache/) in /var/www/html/cubecart/classes/cache/file.class.php on line 258.

Here are lines 243 - 264 as they are germane to caching:

/**
     * Set cache path to some where else
     *
     * @param string $path
     */
    public function setPath($path = '') {
        if (empty($path)) {
            $path = CC_ROOT_DIR.'/cache'.'/';
        } else {
            $ds = substr($path, -1);
            if ($ds != '/' && $ds != '\\') {
                $path .= '/';
            }
        }

        clearstatcache(); // Clear cached results

        if (is_dir($path) && file_exists($path) && is_writable($path)) {
            $this->_cache_path = $path;
        } else {
            trigger_error('Could not change cache path ('.$path.')', E_USER_WARNING);
            return false;
        }

        return true;
    }

Thoughts?  Thanks,

R

Link to comment
Share on other sites

So I conclude that CubeCart has chosen to use "File" as the means to keep its internal cache.

And we know that the /cubecart/cache/ folder exists - you have examined its contents.

And we know that the template rendering engine (Smarty) is able to, or has in the past (check the dates), written compiled templates to the /cubecart/cache/skin/ folder.

So, compare the folder/file permissions between the /cubecart/cache/ and /cubecart/cache/skin/ folders.

Just to be sure, CubeCart is installed in a sub-directory /cubecart/?

Link to comment
Share on other sites

2 hours ago, bsmither said:

So I conclude that CubeCart has chosen to use "File" as the means to keep its internal cache.

And we know that the /cubecart/cache/ folder exists - you have examined its contents.

And we know that the template rendering engine (Smarty) is able to, or has in the past (check the dates), written compiled templates to the /cubecart/cache/skin/ folder.

So, compare the folder/file permissions between the /cubecart/cache/ and /cubecart/cache/skin/ folders.

Just to be sure, CubeCart is installed in a sub-directory /cubecart/?

Fixed!!! You led me down the correct path.  One of my people decided she was going to "help" me and "fixed" some permissions.  All is well in the world.

Thank you so much for your assistance.

R

Edited by rnewcomer
Spelling.
Link to comment
Share on other sites

  • 2 months later...

Well, I thought I had this taken care of in v6.1.12, but it has come back to me in v6.2.0.

I initially checked the "rights" of the folders and they are consistent with the v6.1.2.  Perplexed.  If I log into "admin", go to the product and make the change in the price, save and back out (clearing cache), the price is not reflective in the store front.  I tried deleting the product and re-entering, that results in the price being $0.00.  They only way I have found to change the pricing is to export the entire catalog, make the change to the singular product, then import the entire catalog overwriting all products.  That's not practical.

Any thoughts...

R

Link to comment
Share on other sites

Pay very careful attention to a new indicator at the upper-right corner of the admin screens. If "Clear Cache" is lit, then there have been changes made to the database records. So, in an effort to minimize re-caching everything over and over and over, we now ask the admin to click on the Clear Cache button when finished with the administration session and are ready to log out.

As of CC620, the cache gets cleared on demand, as opposed to earlier versions of CubeCart that cleared the cache for every saved change.

But you say you are clearing the cache. Hm...

Link to comment
Share on other sites

Correct.  I am clearing the cache.  I make the change, save, clear the cache.... price change is reflective in the admin dashboard > Products.  Switch to Store Front, no price change.

Now with that said, for  testing I changed Product I from $240.52 to $250.00.  If I look in the phpMyAdmin,  under CubeCart_pricing_group, I see 59 lines of the $240.52 entry.

Thanks for any help,

Randall

Link to comment
Share on other sites

Have phpMyAdmin show only those records where the product_id is that for "Product l".

The result should be many records where the price is 240.52, maybe a few records where the price is something different.

But each record should have a unique group_id.

Be aware that not being logged in should show the standard "Retail" price (unless hidden), and should show the respective price for a Membership Group where the logged in customer is a member of that group.

In admin, Edit Product, Pricing tab, note that there is a drop-down selector for each Membership Group (initial choice is "Retail").

Unless there is a plugin to do this, I am not aware of any way to quickly and easily bulk update prices in Membership Groups.

Link to comment
Share on other sites

Ok... I think I understand.

Since I have a captive customer base from about 60 different manufacturing centers, I have assigned each to a "group" for quick identification (I use my accounting software identifier e.g. 9999-IGHQ).  Further, since each group will receive the same price, is it possible to assign each to another group (0000-MINE) and set the price there and all will then get the updated pricing without too much intervention?

R

Link to comment
Share on other sites

You can have a customer be a member of more than one Group. All Groups will be shown on those customised reports/emails. So, hopefully that will not be a point of confusion to those who use this custom info.

Your plan will work provided you realize that the cheapest price wins out.

For another approach, you can set the 'price' and 'sale_price' in all records of CubeCart_pricing_group to a million dollars. (I believe) then CubeCart will find that the standard retail price of the item is less than any membership price and will offer that retail price. I think.

Edited by bsmither
Link to comment
Share on other sites

1 hour ago, bsmither said:

You can have a customer be a member of more than one Group. All Groups will be shown on those customised reports/emails. So, hopefully that will not be a point of confusion to those who use this custom info.

Your plan will work provided you realize that the cheapest price wins out.

For another approach, you can set the 'price' and 'sale_price' in all records of CubeCart_pricing_group to a million dollars. (I believe) then CubeCart will find that the standard retail price of the item is less than any membership price and will offer that retail price. I think.

Yeah... I found out about the entire "cheapest price wins out" situation.  I'm afraid that I'm just trying to use a "square peg" into a "round hole".  So, I have deleted all customer groups.  However, I still need to have some sort of quick, visual identifier as to where the customer is from... I went into Admin > Languages > *Edit* > User - Phrases specific to customers > and changed "title" to "MFG Center Number".  We don't really care about Mr., Ms., etc.... So, this is a good way to tie our accounting package in.

I made a change in the content.register.php with an edit to the "title" (which now shows MFG Center Number) and added {$LANG.form.required}" required to the end of the line.  I think this is going to work splendidly.

Brian, I do have three items that I'm hoping you might be able to help me with.  Is it ok if I DM those to you to get your input?  The items pertain to some code snippets you worked up in the past.

Thanks,

Randall

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...