Jump to content

Problems with Global % Sales Mode & Vector Skin


Recommended Posts

Hi

Just come across a problem when enabling the store wide Global Percentage Discount Sales Mode when using the Vector skin (actually to be more accurate when the Fusion plugin that is required for ShopDev's Vector and Blueprint skins is enabled).

If you enter 30 as a global percentage discount on all products, then the price is displayed correctly on the product page, category page and also in the sale items and popular products side boxes but the Latest Products all display 0.00 (which isnt the sale price for each specific product as tried manually setting that and that price either).

Interestingly, even if you switch to using another skin (tested with several standard skins) but leave the Fusion plugin enabled, the same behaviour happens - in order to get global sales pricing working even on a standard skin, you need to disabled the Fusion plugin !

This is using latest 5.2.14 CubeCart along with the "latest" (obviously been no updates in a while) versions of Vector and Fusion.

Has anyone else using Vector experienced this or does nobody else use the global sale discount mode.

Thanks

Ian

Link to post
Share on other sites

In this class (Product_Listing), the standardize() function gets the complete inventory record and has the existing product data merged into it. Then the setPrices() function is called. This class is not a Singleton so each time it is instantiated, a whole new private set of variablwes gets created with it, meaning there should not be any cross-contamination of working variables.

 

CubeCart does not bring prices into the Popular Products array of inventory, so standardize() will fill that gap. (But this does nothing to adjust prices for customer groups.)

 

The fact that only sale_prices are affected is interesting, and that only one box is affected. All boxes and homepage use the same sequence: standardize() then setPrices().

 

The fact that your Latest Products is affected, while the other complaint is affecting Popular Products is also interesting.

Link to post
Share on other sites

setPrices() works only with the inventory record's sale_price and does not calculate a sale_price in any other fashion.

 

What we can try to do is replace the code in setPrice() with a call to Catalogue->getProductPrice().

 

Or maybe replace most of the code in standardize() with a call to Catalogue->productAssign().

Link to post
Share on other sites

"The Latest Products all display 0.00 (which isn't the sale price for each specific product as tried manually setting that and that price either)."

 

I'm confused about the phrasing of the last few words.

 

I said:

"The standardize() function gets the complete inventory record and has the existing product data merged onto it."

 

Thus, it is assumed CubeCart has already calculated whatever price/sale_price the customer is entitled to -- if the box has prices made available to it. As I indicated, the Popular Products box has only name, product_id, quantity, and url available. Then when the complete record is received from the query, we now have price and sale_price.

 

I've copied the code of a couple of the Fusion hooks, class.gui.display_popular_products.php and class.cubecart.display_homepage.php, into snippets, and also copied the product_listing.class.php to /classes/, and I get no errors. I do get plenty more information in Smarty's Debug Console for each product in the appropriate skin template variable, so I know the hooks are working.

 

And all the data is correct.

Link to post
Share on other sites

Hi

Sorry for delay in responding to this thread and thanks for the various contributions so far although I am not any closer to working out why the sale price is incorrect in these circumstances

Do you have Turbo installed as well? If so, I did have to disable all the javascript related compression choices.

Turbo should never be used with Vector skin - it is completely incompatible and should only be used with Blueprint although even then it is far better to manually control the functionality that this plugin adds yourself. Personally I would uninstall Turbo from any and all sites.

I use Blueprint and had no problem the last time I used a Global % Sale, other than showing Out of Stock items with a Sale Price lol. My Blueprint is far from stock, though.

This specific problem happens only on Vector although it has been reported that there are similar but different issues with Blueprint but have not seen these myself.

"The Latest Products all display 0.00 (which isn't the sale price for each specific product as tried manually setting that and that price either)."

I'm confused about the phrasing of the last few words.

I was simply confirming that it is the calculation of the sale price to include the global discount perecentage that is incorrect with all products returning 0.00 as opposed to it displaying what is currently held in the sale_price column for each product

I said:

"The standardize() function gets the complete inventory record and has the existing product data merged onto it."

Thus, it is assumed CubeCart has already calculated whatever price/sale_price the customer is entitled to -- if the box has prices made available to it. As I indicated, the Popular Products box has only name, product_id, quantity, and url available

As I said in the OP, the Popular product pricing (along with almost every other pricing) is correct - it is only the sale price for the Latest Products that always displays 0.00 under these circumstances.

If you are happy to take a look at a dev site where I can reproduce this, then happy to give you access - if you drop me an email,happy to do that

Thanks

Ian

Link to post
Share on other sites

Haven-swift's issue seems to have been an edit to a Fusion hook that inadvertently zeroed-out the sale price. A different approach to that edit was implemented and further testing is required.

 

But, since Blueprint also uses Fusion and its hooks, I do not know why the effect was not seen on that skin.

Link to post
Share on other sites

Hi

It turns out that one of last changes that the shopdev developer made (about a year ago when he was still around) was supposed to be a fix to a file within the Fusion plugin for a problem with Latest Product sale prices but actually caused more problems than it solved. The file was part of the standard Fusion distribution for a while although that change appears to then have been withdrawn as it is no longer in the zip distribution file.

Brian has added some more robust and this now works perfectly in all tests we have conducted

Ian

Link to post
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...