web page error in Admin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
On my local machine ( I don't get it in a production environment ??? )

In admin,
when dynamic price update: enabled,

when I edit a product variant I get the following Web Page Error


Line: 1618
Error: 'priceValForDynUpd_1' is undefined


_______________________



I get this error even if there is no product attributes for the product

I wonder if this could be related to the issue that some user have found when some admin pages appear blank in a production environment ?
13 years ago
Have you customized Administration\Modules\ProductVariantAttributes.ascx control? This issue can be caused if you removed (or set to 'false') 'HidePrices' property of 'ctrlSelectProductAttributes' control.

<nopCommerce:SelectProductAttributes ID="ctrlSelectProductAttributes" runat="server"
                                HidePrices="true"></nopCommerce:SelectProductAttributes>
13 years ago
<nopCommerce:SelectProductAttributes ID="ctrlSelectProductAttributes" runat="server"
      HidePrices="true"></nopCommerce:SelectProductAttributes>

no, I made no changes to this



but get your head round this ...

tonight I tried this out again with my database ( similar issue Line: 1580     Error: 'priceValForDynUpd_8' is undefined  )

so i created a fresh database with nop sample data and connected to it - checked out the product variants and no problems

I reconnected to my database and, well the problem reappears - is it safe to assume the problem is related to information already in the database?

If it helps to narrow things down,

The problem appears when i click any products 'product variant' page - even if that product has no attributes.

The database I'm using was a fresh install ( with no sample data ) i've only created 6 items, two of these items had attributes with price alterations (6 attribute values altogether). I've deleted a couple of these attribute values ( I can't remember if I deleted the values individually or if i just deleted the attribute)


One thing I will have to check out - both the products with the variants have a starting price of 0.00


other than the error message, there are no ill effects, it all seems to be working fine
13 years ago
haydie wrote:
One thing I will have to check out - both the products with the variants have a starting price of 0.00


ok, I repriced the items so they were not 0.00 but the problem is still there so it's not that.

like i said, i deleted a couple of the attributes / values -

I can't remember if the problem existed before i deleted them, I'll check this out
13 years ago
ok, i connected to the clean database, added 3 price adjusting attributes to 'adobe photoshop elements 7'

deleted 1 of the attribute values - navigated to the product variant - no issue

clicked to delete the attribute ( which still had two attribute price altering values  ) and got the webpage error:
Line: 2
Error: Sys.WebForms.PageRequestManagerServerErrorException: The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted.

so, then deleted the values individually, deleted the product attribute and renavigated to the product variant - no further issue

so, no conclusions to the first question ( i can't replicate the original issue ) just a new one to consider
13 years ago
Here is what I can suggest:
1. Open \Modules\ProductAttributes.ascx.cs
2. Set breakpoint in CreateAttributeControls() method
3. Go to product variant details page (admin area)
4. As you're getting this error becase of dynamic price update which should not be rendered in admin area. See when and why this JavaScript code is rendered. It looks like:

adjustmentTableScripts.AppendFormat(CultureInfo.InvariantCulture, "{0}['{1}_{2}'] = {3};\n", AdjustmentTableName, cblAttributes.ClientID, cblAttributes.Items.Count, (float)priceAdjustment);

or
attributeScripts.AppendFormat("$('#{0}_{1}').click(function(){{{2}();}});\n", cblAttributes.ClientID, cblAttributes.Items.Count, AdjustmentFuncName);

or
lblAdjustmentTableScripts.Text = adjustmentTableScripts.ToString();
lblAttributeScripts.Text = attributeScripts.ToString();
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.