Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hi,
I have updated backlight v1 to v2, but now cart don't work
A message says: "No products available for purchase"
I haven't modified since backlight V1 and I worked like a charm in v1
Any idea please?
Thanks
Nico
Last edited by Nico3939 (2019-06-05 23:45:39)
Offline
Did you update album files?
Have you checked the album settings to make sure the pricing scheme is entered?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Yes already do that.
Update album files
Checked in Lightroom the pricing sheme
and Reset the customer's cart in this browser
All product are ok
all pricing sheme are complete
Shipping method Ok
Nothing work
Last edited by Nico3939 (2019-05-28 02:47:44)
Offline
Are any of your cart templates using Mixed Pricing?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I think I found the problem,
It's like in v1 when you put an embed album in page.
Ben have found the problem on v1:
http://community.theturninggate.net/vie … hp?id=9770
But in v2 is still the problem?
Offline
I think that was fixed. Make sure all your modules are up to date
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I say that because when I go to Backlight-->Top-level Galleries and View album, Cart work
But when I go to my page with embed gallery, Cart don't work
Offline
That's what's Ben says about the problem in Backlight 1 and Backlight 2:
Hi Nico, I've found the problem. Pages with embedded albums aren't including the album-specific pricing scheme name, which means that they default to the 'default' pricing scheme.
I've put in a silent update for the Pangolin Album. Are you running the latest version of Backlight 1? (version 1.2.3).
If so, download the latest Backlight + Pages zip file (it should be called Backlight-Pages-123-Release7) and copy this single file from the extracted zip file into the respective directory on your server:backlight/modules/pangolin-page/fragments/config-cart.php
You'll then need to clear your template cache (found under the Designer menu in the Backlight admin).
Can you let us know if that solves it for you?
Note I'll need to make a similar fix for Backlight 1's Standard album, and both the Standard and Pangolin albums for Backlight 2.
Offline
I say that because when I go to Backlight-->Top-level Galleries and View album, Cart work
But when I go to my page with embed gallery, Cart don't work
It’s been working in my testing
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
So I find the solution:
As Ben sayd:
Pages with embedded albums aren't including the album-specific pricing scheme name, which means that they default to the 'default' pricing scheme.
So replace in this file:
backlight/modules/pangolin-page/fragments/config-cart.php
The original code by that:
<?php defined('APP_DIR') or die('No direct script access allowed in ' . __FILE__); ?>
<?php
$basePath = URLHelper::resolvedPath(URLHelper::currentPageLocation(), PATH_TO_BASE); ?><thp>
$shortSiteURL = '<?php echo shortSiteURL(); ?>';
$moduleURL = $shortSiteURL.'backlight/modules/module-cart/';
</thp>
<script>
;(function ( $, window, undefined ) {
var cartOptions = {
rewrite_enabled : <?php echo URLHelper::rewriteEnabled() ? 'true' : 'false'; ?>,
cart_url : '<?php echo CartUtility::getCartURI(); ?>',
<thp>echo isset($album) && $album instanceof Album ? "\t\tpricing_scheme : '".$album->getPricingScheme()."',\n" : "";</thp>
local_js_path : '', // Prevents Cart from attempting to load hooks
log_messages : <thp>echo isset($_REQUEST['logMessages']) ? 'true' : 'false';</thp>,
};
cartOptions['cart_url'] += (cartOptions['cart_url'][cartOptions['cart_url'].length-1])!='/'?'/':'';
$(function() {
jQuery.getScript('<thp>echo $moduleURL;</thp>lib/js/jquery.ttgcart-pangolin.js', function() {
if ("TTGCart" in window) {
TTGCart.loadedHooks = true;
$('body').ttgcart(cartOptions);
cartOptions['cart_button_selector'] = '.add-package-to-cart';
$('body').ttgpackage(cartOptions);
}
});
});
}(jQuery, window));
</script>
You'll then need to clear your template cache (found under the Designer menu in the Backlight admin).
And maybe Reset the customer's cart in this browser (found under the Cart menu in Backlight admin)
So Ben has to update this file for the next update
Maybe I made mistakes, I'm not expert in php coding!
Thank you Rod for the help
Nico
Offline
Nico3939 wrote:
I say that because when I go to Backlight-->Top-level Galleries and View album, Cart work
But when I go to my page with embed gallery, Cart don't workIt’s been working in my testing
there is a strange thing about my installation, the version of the Backlight update module does not indicate the same version as Cart
In Backlight update module: Cart 5.0.5
In Cart 5.0.0
Offline
Probably just an oversight
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
probably yes
Offline
Pages: 1