News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[Bug] Can't remove 'Related Items'

Started by terp, April 09, 2012, 21:14:25 PM

Previous topic - Next topic

terp

Because the related items selector us pulling some descriptive text other than the product name, I accidently selected the wrong items to use for the 'related items.'

We need a 'remove' "X" button much like with image selection when adding additional images, as the only way I could remove the related items I had selected is via. DB edits.


terp

...will take a look in the code, as within the boxes with the graphics used for the 'related products," I see some stray ">, so it might just be a little issue with syntax....

terp


Milbo

I am sorry, I dont get the point. I can remove a related category/product.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

terp

Quote from: Milbo on April 15, 2012, 17:34:10 PM
I am sorry, I dont get the point. I can remove a related category/product.

Thanks for the response, sir.  I'll try with some other browsers again, but this is what I see:

edit: ..and I'll go through all my product data, as that stray closing tag might be from me and not the code base?


[attachment cleanup by admin]

lipes

Maybe you dont have the "X" image in your folder?! Try to see if you find in code this:
<div class="vmicon vmicon-16-remove"></div>
with Firebug...
Or install the latetest VM 2.0.6 . I've got the close buttom.
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

terp

Quote from: lipes on April 17, 2012, 11:37:40 AM
Maybe you dont have the "X" image in your folder?! Try to see if you find in code this:
<div class="vmicon vmicon-16-remove"></div>
with Firebug...
Or install the latetest VM 2.0.6 . I've got the close buttom.

Thanks a lot for the lead!

You reminded me - I did change the graphic for the frontend close button, but left the css (#sbox-btn-close)  and file name the same. :)

However, I didn't think of checking to see if the close-button was being compiled with the page...I'm on the right track now. I'm figuring out where that "> is coming from, then removing some of those nested links in the description, and cleaning it all up and seeing if I can get it to function normally. If not, I'll just tweak the css for a short-term fix. :)

Thanks much...here's what it was doing (I'll figure out why this morning):



[attachment cleanup by admin]

terp

#7
Yea, the short description is what's causing the problem.  When I remove the short description for one of them, the close appears.



You will receive <b>nine (9) packets</b> of Shakeology in your choice of flavors - Chocolate, Greenberry or Tropical Strawberry! <br />

<p>For information, please visit: <a href="beachbody-shakeology-meal-replacement/shakeology-3-day-cleanse-diet-detox" title="Shakeology Shake: Shakeology 3-Day Cleanse" target="_blank">Shakeology 3-Day Cleanse</a></p>


I then started to see if it was having a problem parsing something in there, but it is fine. Turns out the long 'short description' was pushing the close button way down...VM is pulling more than it really needs to to identify the related items and the link in the short description is causing problems.

Put simply, VM is using my entire short description as the "title" for the A HREF link to related product!!!


Here's what it looks like:



<a href="/dev/administrator/index.php?option=com_virtuemart&amp;view=product&amp;task=edit&amp;virtuemart_product_id=2" title="Shakeology Single-Serving Sample&lt;br/&gt;You will receive &lt;b&gt;one (1) packet&lt;/b&gt; of Shakeology in your choice of flavor - Chocolate, Greenberry or Tropical Strawberry!
&lt;p&gt;To learn more about Shakeology and what is in Shakeology, please visit: &lt;a href=" beachbody-shakeology-meal-replacement"="" target="_blank">What is Shakeology?</a>



I can work around this, of course, but perhaps we can use the actual related product name for the "title" within the link rather than pull the entire short description?

Thanks again for the lead, lipes...

jpreskitt

I just solved this (sort of  :P).
Open up Firebug (in firefox) and select the <div> named ".vm_thumb_image" and increase the height. I put mine to 150px.
Could just be a CSS fix.
John

____
J 2.5 VM 2.0.0

Genius WebDesign

Had the same problem and my solution was to change the CSS the following way:

go to /administrator/components/com_virtuemart/assets/css  and open menu_images.css

change:
vmicon-16-remove{ background: url(../images/icone16.png) -66px -1202px;}

to
vmicon-16-remove{ background: url(../images/icone16.png) -66px -1202px; position: absolute; top: 5px; left: 115px;}

This places the remove-icon at the top right corner of the thumbnail.


Rayjak

I fixed mine by removing the "displayed image subtitle" from the product image, which after migration was the .jpg name.  Then all that displayed in admin was the product name and red "x".

Stonedfury

#11
Seems this is still an issue in the current VM 2.0.20b. Seriously guys! Took me all of 3 seconds to put in. Update the core.
Thank you fabelmik as your solution works perfectly. To bad it will get overwritten in the next update. :(

UPDATE: I had to remove this hack as it moved the price button up to top and that's not good. I just turned the box vm_thumb_image into height 200 width 200 in the css giving enough room. However I am still unable to actually have the remove button take effect. I mouse over and it changes but it is not removing the objects. :(
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

chicago25or6to4

#12
Using Fabelmik's solution put me in the ballpark. However, his solution also causes the Delete button to vanish from any custom fields added to a product (in my case cart variants).

The solution I have used is to 'target' the specific occurrence of the 'vmicon-16-remove' image by using multiple selectors.

Here's the extra code I used:

.vm_thumb_image .vmicon-16-remove{ background: url(../images/icone16.png) -66px -1202px; position: absolute; top: 5px; right: 5px;}

Seems to work  :)

Milbo

I am sorry, I dont see the problem
we use the product name, please describe exactly your problem, maybe with an image. and yeh please try of course the new 2.0.21b
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Stonedfury

#14
Here is an image of the problem that still persist without custom edits.

I see that you have tried to fix the issue in the admin.styles.css however it's not necessarily the image that is the problem It is the text. Just as before, if the name is too long then it pushes the remove button down and under. Maybe moving the button to the top left or top right of that box would be best so that if the name is too long, OH WELL, the button still shows. :) Myself I just set the box size to be 200px and that is on average large enough. :)

[attachment cleanup by admin]
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.