Forum Replies Created

Viewing 6 replies - 211 through 216 (of 216 total)
  • I am now able to return to the product page from the cart with WC Factory Fields additional options. Here are some of the steps to accomplish this to give the basic idea:

    • Create your own single product page (My product requires a custom product page to customize the product)
    • Override the product name hyperlink in the shopping cart to direct user to custom product page using add_filter( ‘woocommerce_cart_item_name’…
    • Override the product thumbnail hyperlink in the shopping cart to direct the user to the custom product page using add_filter( ‘woocommerce_cart_item_thumbnail’…
    • pass WC Factory Fields options to the product page using $cart_item[‘wccpf_slug’], where slug is the WC Fields Factory slug for each WC Fields Factory option
    • Use <?php $_GET…?> in custom product page to retrieve WC Fields factory options passed from the cart

    There are probably better ways to do this, but this method works great. User can then modify product, add it to the cart and delete the original product from the cart if necessary.

    Thanks for a great plug-in. Nice work!

    Thread Starter deeveedee

    (@deeveedee)

    I think I may have just answered one of my own questions – I’m guessing that $link_text is the default argument and that any other arguments passed are in addition to $link_text. Correct? If you are able to point me in the right direction for a list of the methods available to $cart_item[‘data’], that would be very helpful. Thank you very much for your help.

    Thread Starter deeveedee

    (@deeveedee)

    Thank you for your quick reply. I’ve just started looking at WooCommerce yesterday and am a WordPress novice, so forgive me for what are probably remedial questions. I was able to get your suggestion to work with a minor modification: I added the argument $link_text as shown below. Can you help me to understand why I need to pass $link_text? Also, where would I look to see the methods ( like get_title() ) available to $cart_item[‘data’]? My WC version is 2.4.13. Thank you for your help.

    function wc_cart_item_name_hyperlink( $link_text, $cart_item ) {
        return sprintf( '<a href="%s">%s </a>','example.com/mypage/', $cart_item['data']->get_title() );
    }
    /* Filter to override cart_item_name */
    add_filter( 'woocommerce_cart_item_name', 'wc_cart_item_name_hyperlink', 10, 2 );

    fitmealat – I’m still testing this plugin, but it appears that your add-to-cart URL works for custom ‘select’ fields, too. Haven’t tried to get it working for checkboxes and radio buttons.

    Thanks again for this great plugin! As of version 1.2.4, I do not believe that the WC Fields Factory plugin supports austenozzy’s suggestion to be able to edit customized items after they are added to the cart. If it does support this capability, please let us know. If it does not, do you have plans to add the ability to edit customized items after they are added to the cart? Thank you!

    I added these css lines to my child theme’s style.css. Worked perfectly. Allows changes to background color, font-size, etc. For example,

    body.woocommerce table.wccpf_fields_table td.wccpf_label label { font-size: 14px; }
    body.woocommerce table.wccpf_fields_table td.wccpf_value input[type=text],
    body.woocommerce table.wccpf_fields_table td.wccpf_value input[type=email],
    body.woocommerce table.wccpf_fields_table td.wccpf_value input[type=number],
    body.woocommerce table.wccpf_fields_table td.wccpf_value select { font-size: 14px; background: none; }

    Thank you. Still evaluating this plugin and so far, this looks like a great addition to WooCommerce.

Viewing 6 replies - 211 through 216 (of 216 total)