Zen Follower
- Join Date:
- Oct 2007
- Posts:
- 414
- Plugin Contributions:
- 0
Views: 1,121
Zen Follower
Totally Zenned
is that the bootstrap template? what version of the template?
Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!
Zen Follower
Yes Bootstrap 3.7.4
Zen Follower
DML73:
Yes Bootstrap 3.7.4
Which version of zc did you upgrade from and how old is your database?
I had the same issue and ended up putting in the recursive classic template file with a few embellishments copied in from the bootstrap version as a workaround.
My db is 10 years old and I swear it's something to do with it because if I use the test db it works fine.
Zen Follower
That's what I was afraid of. I upgraded from v1.5.7, but the database is even older, from 1.3.x I believe.
Do you remember which files fixed this? or did you use the full classic template file-set?
zennedOut
i would open the dev tools and look at the console.
i have a feeling you have an error there that is causing the problem.
i would think it unlikely to be a db problem. although i could be wrong…
best.
Totally Zenned
If you followed the upgrade process and upgraded your database during your upgrade process, then your database is not from v1.3.x - it's now an upgraded database and you're free to say it's from 2.1.0
I upgraded a 1.2.4 site recently (yup, you read it right) and it's currently on 2.1.0 and everything works just fine so it's very unlikely that this is a database issue.
A URL would help for sure... Maybe your form element is closing before the update button?
My site - Pro ZC Help
My portfolio | My plugins
Zen Follower
Sounds good regarding the database.
The url is: https://nordfield.com/
Any ideas would be great.
Totally Zenned
I'm not familiar with that template, but do check your includes/templates/bootstrap/templates/tpl_shopping_cart_default.php
You're missing one line:
echo zen_draw_hidden_field('products_id[]', $product['id']);
When you click the update button, quantities are POSTed, but there's no products_id array, and I don't see the hidden products_id field anywhere in the form...
My site - Pro ZC Help
My portfolio | My plugins
Zen Follower
DML73:
That's what I was afraid of. I upgraded from v1.5.7, but the database is even older, from 1.3.x I believe.
Do you remember which files fixed this? or did you use the full classic template file-set?
Sorry, overseas at present so can't be too precise.
Try replacing tpl_shopping_cart.php with the version from recursive classic. But you'll need to comment out some lines referring to mobil usage. If the functionality works then you have the same issue I have.
I can send you my file if you want. Pm me your email and I can send to you.
Totally Zenned
Also, just realized - check your includes/modules/pages/shopping_cart/header_php.php and make sure you have the following lines:
$buttonUpdate = '';
if (SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) {
if (!$showFixedQuantity) {
$buttonUpdate = zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT);
} else {
$buttonUpdate = zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT, 'style="opacity: 0.25" disabled="disabled"');
}
}
$buttonUpdate .= zen_draw_hidden_field('products_id[]', $products[$i]['id']);
$productArray[$i] = [
'attributeHiddenField' => $attributeHiddenField,
'flagStockCheck' => $flagStockCheck,
'flagShowFixedQuantity' => $showFixedQuantity,
'linkProductsImage' => $linkProductsImage,
'linkProductsName' => $linkProductsName,
'productsImage' => $productsImage,
'productsName' => $productsName,
'productsModel' => $productsModel,
'showFixedQuantity' => $showFixedQuantity,
'showFixedQuantityAmount' => $showFixedQuantityAmount,
'showMinUnits' => $showMinUnits,
'quantityField' => $quantityField,
'buttonUpdate' => $buttonUpdate,
'productsPrice' => $productsPriceTotal,
'productsPriceEach' => $productsPriceEach,
'rowClass' => $rowClass,
'buttonDelete' => $buttonDelete,
'checkBoxDelete' => $checkBoxDelete,
'id' => $products[$i]['id'],
'attributes' => empty($attrArray) ? false : $attrArray,
];
My site - Pro ZC Help
My portfolio | My plugins
Zen Follower
Thanks for all suggestions, I found that if I replace tpl_shopping_cart_default.php in the Bootstrap template with the same file from the default template then it's working. So now I guess I just have to find exactly what is missing/wrong in that file.
Totally Zenned
Warning to those who know how to dig around. Stay out of the stylesheets.
You have lots of problems on the site other than just the update.
One category's products all result in 404
A non-zencart stylesheet is placing the add to cart form on top of all your product descriptions.
One of them is dangerous and not a part of a standard ZC load.
All of this could have been discovered earlier if you had followed the Posting Tips.
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Zen Follower
Yes indeed this is a work in progress. The site is not live yet, I just took it out of maintenance mode so people here could take a look at it regarding the update problem.
The add to cart form is on top of the description on all product pages right now I believe.
But I'm surprised about "One category's products all result in 404", on which category do you see that?
Also, "One of them is dangerous and not a part of a standard ZC load", please let me know which one you mean and why it's dangerous.
"Posting Tips" please let me know what you are referring to here, thanks.
Much appreciated, thanks a lot!
Totally Zenned
dbltoe:
Warning to those who know how to dig around. Stay out of the stylesheets.
Do you mind clarifying this? What dangers lurk, other than a misaligned element?
One category's products all result in 404
I'll assume it's USB To Serial where the descriptions link to static URLs which probably just haven't been enabled yet.
A non-zencart stylesheet is placing the add to cart form on top of all your product descriptions.
You mean the bootstrap template stylesheets? I believe Cindy made it like that for easier updating...
I don't see any other stylesheets being loaded other than the ones that are distributed with the template...
One of them is dangerous and not a part of a standard ZC load.
A dangerous stylesheet? :blink:
With all due respect, such vague and misleading posts don't benefit anyone. If you think something's DANGEROUS (and we all know what that word means), elaborate it straight away and help the person fix it, don't leave them hanging. If it breaks layout, it's not dangerous, it's just something that needs to be fixed.
For example, product page for model STE-232 (I won't post the link so search engines don't pick it up) shows the CSS error, but it's a simple fix - for some reason there's an added line in stylesheet.css:
.productDescription {
width: 210%;
margin-top: 25px;
}
Removing that line will fix the overlap. These are simple mistakes, but not something I'd call dangerous...
My site - Pro ZC Help
My portfolio | My plugins
Totally Zenned
It's not included in the bootstrap mod and, if you access using the basic URL of the stylesheet, a trojan is launched.
Being grouped with the cloudflare files, one might assume....
As far as Posting Tips, every time you start or answer a thread, you are presented with the Posting Tips. When you started this thread, you actually had to delete the reminder to use them.
Also, USB to Serial Adapter
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Totally Zenned
dbltoe:
It's not included in the bootstrap mod and, if you access using the basic URL of the stylesheet, a trojan is launched.
Being grouped with the cloudflare files, one might assume....
The bootstrap css file is being loaded from cdn.jsdeliver.net (one of the most trusted sources), the npm indicates it's coming directly from the official npm registry and the integrity SRI hash exists and is valid.
I don't know where you got the trojan alert form, but it's definitely not from that CSS file.
As far as Posting Tips, every time you start or answer a thread, you are presented with the Posting Tips. When you started this thread, you actually had to delete the reminder to use them.
Yeah, but most has been said, at least the information that matters... PHP version is the only thing we don't know, but even if it were php 10.5 and MySQL 11.3 running on CentOS 17 that was released in 2050, it wouldn't change the fact that the form doesn't contain products_id hidden field(s) so there's nothing to process.
My money is on includes/modules/pages/shopping_cart/header_php.php :wink:
My site - Pro ZC Help
My portfolio | My plugins
Totally Zenned
My money's with you on this one as well.
I still wonder why the .net is resolving to .com.
And, the more posting tips the easier for some of us to help.
Not everyone here is as familiar with an area without "looking" at it. Didn't someone say, "knowledge is power"?
IMHO, if the Posting Tips are included with at least the opening of a post, the answer can be reached much faster.
Likewise, if someone joins a thread with a "similiar" problem, we know from the start that the likelihood of similar is not always true. Again, in such cases, posting tips answers would probably get us to a resolution quicker.
Don't make me research all the times you have asked for a display log. ;-) (smilies are down apparently)
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Zen Follower
balihr:
The bootstrap css file is being loaded from cdn.jsdeliver.net (one of the most trusted sources), the npm indicates it's coming directly from the official npm registry and the integrity SRI hash exists and is valid.
I don't know where you got the trojan alert form, but it's definitely not from that CSS file.Yeah, but most has been said, at least the information that matters... PHP version is the only thing we don't know, but even if it were php 10.5 and MySQL 11.3 running on CentOS 17 that was released in 2050, it wouldn't change the fact that the form doesn't contain products_id hidden field(s) so there's nothing to process.
My money is on includes/modules/pages/shopping_cart/header_php.php :wink:
Thanks, that answered all my questions and concerns, except solving the actual problem of course :D
I do see:
$buttonUpdate .= zen_draw_hidden_field('products_id[]', $products[$i]['id']);
and
'buttonUpdate' => $buttonUpdate,
in
includes/modules/pages/shopping_cart/header_php.php
so apparently that isn't the problem.
But as I mentioned earlier, when I replace:
includes/templates/bootstrap/templates/tpl_shopping_cart_default.php
with
includes/templates/template_default/templates/tpl_shopping_cart_default.php
Then the update button works, but the layout gets mixed up. So there must be something missing/wrong in that file. I guess? Just can't seem to find the exact missing link.
Zen Follower
Seems like I found a solution, not sure if it's the correct way of fixing this, but in tpl_shopping_cart_default.php it looks like the update action function was in the wrong table cell, so I moved:
<span class="qtyUpdateCell text-center d-none d-sm-table-cell"><?php echo (!empty($product['buttonUpdate'])) ? $product['buttonUpdate'] : ''; ?></span>
in line 121 to line 116. So line 116 no looks like this:
<span class="qtyUpdateCell text-center d-none d-sm-table-cell"><?php echo (!empty($product['buttonUpdate'])) ? $product['buttonUpdate'] : ''; ?></span></div>
Tell staff why this post should be reviewed.