Author Topic: Custom Field not saving some data to front end  (Read 292 times)

bpos

  • Beginner
  • *
  • Posts: 17
  • Mid level user
  • VirtueMart Version: 3.2.3
Custom Field not saving some data to front end
« on: May 05, 2018, 23:22:51 pm »
I am using 3.2.12 and have upgraded to 3.2.14. Neither save in this particular field. I have tried 2 different browsers and local copy and live site. Nothing seems to save the info to the database?

I have been using virtuemart for about 4 years with pretty much no problem. until now

Problem: When creating a new product with custom fields added no longer saves one of the fields to the front end?  The backend shows some of the information as saved but does not show on the front end?  Oddly if I fiddle with this and delete the field and re add the field a few times while cleaning cache I may get lucky and it might save.
This has worked flawlessly for years until perhaps a few recent upgrades?
The field in question is a string variant with a clickable pic with a video address attached. Nothing shows on the front end when saving but the information appears to be there in the backend?

I have cleared all cache on browser and joomla? Its like the database will not accept any info or something?

I have also noticed saving problems with the ratings and reviews section as well? I have to add ratings several times before it will save one?

Any help would be appreciated.

Thanks

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2974
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Custom Field not saving some data to front end
« Reply #1 on: May 06, 2018, 00:40:31 am »
Hi, what you see on edit the product in the back-end, is what is saved in the database.
So perhaps the plugin have a bug or need some code changes to get the values, or you use a cloud cache or Joomla cache, in this case it's possible that you need to manually clear the cache, to be sure the front-end display is updated.

bpos

  • Beginner
  • *
  • Posts: 17
  • Mid level user
  • VirtueMart Version: 3.2.3
Re: Custom Field not saving some data to front end
« Reply #2 on: May 06, 2018, 04:06:04 am »
I clear joomla cache and browser cache but nothing helps. I have tried in 3 different browsers and nothing shows on front end in any browser. I have deleted the field and re added it. I don't think the entire field actually saves. I think there is info missing when I save. Sometimes I get this pic symbol after saving when it actually saves. All new product creations do not save the entire field.

I am scratching my head on this one.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2974
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Custom Field not saving some data to front end
« Reply #3 on: May 06, 2018, 08:54:01 am »
Your plugin is bugged, you should not see some HTML
" name="field[3].... should be hidden, so certainly a part of information are missing. This is not a Virtuemart problem, contact the plugin développer, i'm wondered it worked before.

bpos

  • Beginner
  • *
  • Posts: 17
  • Mid level user
  • VirtueMart Version: 3.2.3
Re: Custom Field not saving some data to front end
« Reply #4 on: May 06, 2018, 09:16:58 am »
Thanks for responding
Ok I just found a link to the problem. Product pricing must be enabled for custom field to work correctly.
This may sound dumb but I use virtuemart as a catalogue with no pricing. Up till now I have been just disabling the actual price but I got this bright idea to disable the product pricing field.
There must be a connection between the product price field and the custom field. Both need to be enabled for both to work?

I had another question about the product pricing field while we are on that subject. I disabled the product prices so I figure the prices should be hidden from public. Google has a way of picking up the price and showing it along with the product!
Because I use my shop as a catalogue all of my prices are default set to $100 (and disabled).  I have had several calls from people asking my why my product is $100! The product price is disabled!

Maybe I am doing something wrong?  Has anyone else had this type of problem?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2974
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Custom Field not saving some data to front end
« Reply #5 on: May 06, 2018, 13:23:57 pm »
If you set price to 100, then the Google Product Structured Data get this price.
You should not add any price at all!
You customfield dont need to have price, so you should use in your declared custom field(Video) :
Cart Input : NO
Cart Attribute : NO
So you don't see any price
If you need to display it at the cart position, then fill
Layout position :  addtocart

bpos

  • Beginner
  • *
  • Posts: 17
  • Mid level user
  • VirtueMart Version: 3.2.3
Re: Custom Field not saving some data to front end
« Reply #6 on: May 07, 2018, 10:06:20 am »
I may be explaining this wrong. I do not set a price in custom fields.  There is already a Product Pricing area on the Product Information page? Also a shopper group?

If I change the price to "0" then the product pricing area goes away automatically. Once a price above "0" is entered it will keep the price and then you can set the base price, final price and such?
Google picks this price up no matter if you disable the product pricing or not. This makes it difficult to use virtuemart as a catalogue. Perhaps because I use my "add to cart" area for my video? I suppose it makes sense. No need to add to cart if there is no price? So basically a custom field cannot be added to the add to cart spot and no price at the same time.

Maybe someone can explain to me what the disabled button is suppose to do in the product pricing? Is it to disable the override price?

Thanks

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2974
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Custom Field not saving some data to front end
« Reply #7 on: May 07, 2018, 10:14:34 am »
You can do an override in the template and use another layout position but "ontop" position is loaded in the category view and in the product.
So on changing your PHP in the files override, you can have same render as before and dont need any price.
I have understand your problem, i think, but you search a bad way to solve it.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26813
  • Always on vacation
    • Jenkin Hill Internet
Re: Custom Field not saving some data to front end
« Reply #8 on: May 07, 2018, 11:30:32 am »
The "disabled" under Override price is to fdisable/enable that override. A lot of products can have an override set, but disabled. They can then be enabled all at once with simple sql.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.14.9808 on Joomla 3.8.8 PHP 7.0.30

Testing VM3.2.15.9840 on J3.8.8

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9561
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Custom Field not saving some data to front end
« Reply #9 on: May 07, 2018, 18:53:06 pm »
I would set a shoppergroup restriction for that case. Then you just empty the whole "price shoppergroup relation table" and your prices become active for any visitor
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/