News:

Looking for documentation? Take a look on our wiki

Main Menu

Product Details not showing add to cart

Started by norgan, September 18, 2011, 01:29:48 AM

Previous topic - Next topic

norgan

Use as catalogue in config not set, tried ticking, applying then unticking and applying. no change.

Tried other templates, no change.

There is a product price, quantity and manufacturer. Still no products show as being able to add to cart.

Add to cart text not found anywhere, only ask a question about this product.

I must be missing something but i cannot for the life of me find out what.

site is http://threewhiterabbits.com.au/shop

Any assistance would be greatly appreciated as we are going live with this.

Milbo

Maybe you have the catalogue mode or simular activated. Take a look on the shopconfig please
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

norgan

"Use as catalogue in config not set" could it be in a config file when it is showing as off in the gui?

Milbo

The config file is only read one time to create the database entry. After that time, it uses only the db.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

norgan

So any idea why this is not working? it's time critical and i have tried everything i know and can find on the forums. Is there a db table dump i could provide that may help?

PRO

norgan, open the default.php file in the productdetails folder and see if the add to card code is there


norgan

#6
Quote from: BanquetTables.pro on September 21, 2011, 16:39:35 PM
norgan, open the default.php file in the productdetails folder and see if the add to card code is there


This is the add to cart code i have:


<?php // Add To Cart Button
if (!VmConfig::get('use_as_catalog',0)) { ?>

<div class="addtocart-area">

<form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $this->product->virtuemart_product_id ?>">
<?php // Product custom_fields
if (!empty($this->product->customfieldsCart)) {  ?>

<div class="product-fields">
<?php foreach ($this->product->customfieldsCart as $field)
?>
<div style="display:inline-block;" class="product-field product-field-type-<?php echo $field->field_type ?>">
<span class="product-fields-title" ><b><?php echo  JText::_($field->custom_title?></b></span>
<?php echo JHTML::tooltip($field->custom_tip,  JText::_($field->custom_title), 'tooltip.png'); ?>
<span class="product-field-display"><?php echo $field->display ?></span>

<span class="product-field-desc"><?php echo $field->custom_field_desc ?></span>
</div><br/ >
<?php
}
?>

</div>
<?php }
 /* Product custom Childs
  * to display a simple link use $field->virtuemart_product_id as link to child product_id
  * custom_value is relation value to child
  */

if (!empty($this->product->customsChilds)) {  ?>

<div class="product-fields">
<?php foreach ($this->product->customsChilds as $field) {  ?>
<div style="display:inline-block;" class="product-field product-field-type-<?php echo $field->field->field_type ?>">
<span class="product-fields-title" ><b><?php echo JText::_($field->field->custom_title?></b></span>
<span class="product-field-desc"><?php echo JText::_($field->field->custom_value?></span>
<span class="product-field-display"><?php echo $field->display ?></span>

</div><br/ >
<?php
?>

</div>
<?php ?>

<div class="addtocart-bar">

<?php // Display the quantity box ?>
<label for="quantity<?php echo $this->product->virtuemart_product_id;?>" class="quantity_box"><?php echo JText::_('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label>
<span class="quantity-box">
<input type="text" class="quantity-input" name="quantity[]" value="1" />
</span>
<span class="quantity-controls">
<input type="button" class="quantity-controls quantity-plus" />
<input type="button" class="quantity-controls quantity-minus" />
</span>
<?php // Display the quantity box END ?>

<?php // Add the button
$button_lbl JText::_('COM_VIRTUEMART_CART_ADD_TO');
$button_cls ''//$button_cls = 'addtocart_button';
if (VmConfig::get('check_stock') == '1' && !$this->product->product_in_stock) {
$button_lbl JText::_('COM_VIRTUEMART_CART_NOTIFY');
$button_cls 'notify-button';
?>


<?php // Display the add to cart button ?>
<span class="addtocart-button">
<input type="submit" name="addtocart"  class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
</span>

<div class="clear"></div>
</div>

<?php // Display the add to cart button END ?>
<input type="hidden" class="pname" value="<?php echo $this->product->product_name ?>">
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="cart" />
<noscript><input type="hidden" name="task" value="add" /></noscript>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $this->product->virtuemart_product_id ?>" />
<?php /** @todo Handle the manufacturer view */ ?>
<input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $this->product->virtuemart_manufacturer_id ?>" />
<input type="hidden" name="virtuemart_category_id[]" value="<?php echo $this->product->virtuemart_category_id ?>" />
</form>

<div class="clear"></div>
</div>
<?php }  // Add To Cart Button END ?>

jjk

Probably this info won't help either, but what I see at your provided link is this:


  • The "Add to cart" css stuff is there (I can see the buttons with firebug)
  • The "Add to cart" script is not being loaded
  • You are using the Beez template including "Hide js" (perhaps this is hiding the buttons too?)

Line 429 Piwik is not defined (probably not related to your problem)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

norgan

Quote from: jjk on September 22, 2011, 09:09:12 AM
Probably this info won't help either, but what I see at your provided link is this:


  • The "Add to cart" css stuff is there (I can see the buttons with firebug)
  • The "Add to cart" script is not being loaded
  • You are using the Beez template including "Hide js" (perhaps this is hiding the buttons too?)

Line 429 Piwik is not defined (probably not related to your problem)

Piwik is the tracking code for Piwik web stats.

Where is the Hide JS defined? I did try another template i'm sure that it also didn't work on.

Is there somewhere else i need to look for js being disabled?

norgan

This is pretty frustrating, i get one reply per day lol

I don't mind compensating someone for thier time if they think they could fix it.

jjk

#10
Just in case you encounter a js conflict with other extensions, did you try to disable other extensions already?

BTW - did you notice this already: http://threewhiterabbits.com.au/component/virtuemart/hand_tools/Hand-Shovel
See srcreenshot taken 5 minutes before posting this below.  ;D

[attachment cleanup by admin]
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

norgan

Quote from: jjk on September 23, 2011, 11:27:15 AM
Just in case you encounter a js conflict with other extensions, did you try to disable other extensions already?

BTW - did you notice this already: http://threewhiterabbits.com.au/component/virtuemart/hand_tools/Hand-Shovel
See srcreenshot taken 5 minutes before posting this below.  ;D

lol yeah that is because if i reset the vm tables back to default with sample data, all products show with add to cart.
if i then remove all but one (the hand trowel) it still shows as add to cart BUT

if i then add a new category, then move the trowel to that category, BANG add to cart gone!

If i move trowel back to default category, still no add to cart!

Interesting no?

norgan

So i managed to be able to do the following:

Reset all vm tables, with sample data.

verify all sample products can be added to cart

remove all but one product and category

rename manufacturer

all still works when adding to cart

then add new category

move item to new category

no more add to cart

There must be something with the categories playing up but i cannot figure what. or why for that matter on a fresh install!

norgan

ok verified on two seperate sites running same jm and vm versions

Milbo

oha, interesting. We will take a look on that
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/